# Name of the plugin.
name=ZLL Commissioning
category=ZigBee Light Link

# Any string is allowable here.  Generally it is either: Production Ready, Test Tool, or Requires Extending
qualityString=Production Ready
# This must be one of the following:  productionReady, testTool, extensionNeeded
quality=production

introducedIn=zll-1.0-11-0037-10

# Description of the plugin.
description=Ember implementation of the commissioning mechanism used by the ZigBee Light Link profile.

# List of .c files that need to be compiled and linked in.
sourceFiles=zll-commissioning.c,zll-commissioning-cli.c,zll-commissioning-network.c

# List of callbacks implemented by this plugin
implementedCallbacks=emberAfPluginZllCommissioningInitCallback,emberAfPluginZllCommissioningNcpInitCallback,emberAfPluginZllCommissioningStackStatusCallback,emberAfPluginInterpanPreMessageReceivedCallback,emberAfStartSearchForJoinableNetworkCallback,emberAfPluginFormAndJoinNetworkFoundCallback,emberAfPluginFormAndJoinUnusedPanIdFoundCallback,emberAfFindUnusedPanIdAndFormCallback,emberAfUnusedPanIdFoundCallback,emberAfScanErrorCallback,emberAfGetFormAndJoinExtendedPanIdCallback,emberAfSetFormAndJoinExtendedPanIdCallback,emberZllAddressAssignmentHandler,emberZllNetworkFoundHandler,emberZllScanCompleteHandler,emberZllTouchLinkTargetHandler,ezspZllAddressAssignmentHandler,ezspZllNetworkFoundHandler,ezspZllScanCompleteHandler,ezspZllTouchLinkTargetHandler,

# Turn this on by default
includedByDefault=true

# Which clusters does it depend on
dependsOnClusterClient=zll commissioning
dependsOnClusterServer=zll commissioning

# Required plugins
requiredPlugins=interpan,form-and-join

# Required API
requiredApis=zll,network-creator
api.network-creator.condition=zigbee3Support,linkInitiator,zigbee-pro-routing

# Provided API
providedApis=zll-profile
api.zll-profile.header=zll-commissioning.h

additionalMacros=EMBER_AF_DISABLE_FORM_AND_JOIN_TICK

# List of options
options=linkInitiator,touchLinkSecondsDelay,rxOnAtStartupPeriod,rxAlwaysOn,defaultRadioChannel,subDeviceTableSize,scanPowerLevel,radioTxPower,extendedPanId,primaryChannelMask,scanSecondaryChannels,secondaryChannelMask,joinableScanTimeoutMinutes,identifyDuration,zigbee3Support,centralizedNetworkSupport,stealingAllowed

linkInitiator.name=Link initiator
linkInitiator.description=Indicates whether this device is capable of initiating the touch link procedure.  The initiator components of touch linking are disabled in the plugin and the device will only be permitted to act as a target if this option is not set.
linkInitiator.type=BOOLEAN
linkInitiator.default=TRUE

rxOnAtStartupPeriod.name=Rx On at Startup time (in seconds)
rxOnAtStartupPeriod.description=The duration, in seconds, for which the plugin will keep the radio receiver switched on at application startup, in order to listen for incoming scan requests.
rxOnAtStartupPeriod.type=NUMBER:0,3600
rxOnAtStartupPeriod.default=300
rxOnAtStartupPeriod.enabledIf=!rxAlwaysOn

rxAlwaysOn.name=Rx always on
rxAlwaysOn.description=Indicates whether the radio receiver should be permanently on, when the device is available for touchlinking. (Note that the radio will still be switched off for a sleepy end device while it is joined to a network)
rxAlwaysOn.type=BOOLEAN
rxAlwaysOn.default=FALSE

defaultRadioChannel.name=Default radio channel
defaultRadioChannel.description=The radio channel used by a factory new device to listen for incoming scan requests, and, if the device is a router, to form a new network on receipt of a Network Start request.
defaultRadioChannel.type=NUMBER:11,26
defaultRadioChannel.default=11

touchLinkSecondsDelay.name=Touch link delay time (in seconds)
touchLinkSecondsDelay.description=The duration, in seconds, for which the plugin will wait before sending a network form or start to a target device.  The user may abort the touch link procedure during this delay if, for example, the wrong target device has been selected.
touchLinkSecondsDelay.type=NUMBER:1,255
touchLinkSecondsDelay.default=1
touchLinkSecondsDelay.dependsOn=linkInitiator

subDeviceTableSize.name=Sub-device table size
subDeviceTableSize.description=The maximum number of sub-devices discovered on remote nodes.  The plugin will attempt to retrieve device information records from each sub-device on the remote node during touch linking, up to this limit.
subDeviceTableSize.type=NUMBER:1,255
subDeviceTableSize.default=1
subDeviceTableSize.dependsOn=linkInitiator

scanPowerLevel.name=Scan Power Level
scanPowerLevel.description=The power level used to transmit the scan request messages by the initiator device during touch linking.  The ZLL specification requires a nominal output power of 0dBm during touch linking.
scanPowerLevel.type=POWER
scanPowerLevel.default=0
scanPowerLevel.dependsOn=linkInitiator

radioTxPower.name=Radio output power
radioTxPower.description=The radio output power (in dBm) at which the node will operate.
radioTxPower.type=POWER
radioTxPower.default=3

extendedPanId.name=Extended PAN ID
extendedPanId.description=The extended PAN ID to use when forming or joining networks.  If the extended PAN ID is set to all zeros, a random value will be used when forming and any network will be considered when joining.
extendedPanId.type=EUI64
extendedPanId.default=00 00 00 00 00 00 00 00

primaryChannelMask.name=Primary channel mask
primaryChannelMask.description=The primary channel set is used in preference for commissioning and normal operations.  The plugin will always scan the primary channel set during touch linking or when searching for joinable, non-ZLL networks.  The ZLL specification defines the primary channel set as consisting of channels 11, 15, 20 and 25
primaryChannelMask.type=CHANNELS
primaryChannelMask.default=0x02108800UL

scanSecondaryChannels.name=Scan secondary channels
scanSecondaryChannels.description=ZLL networks are generally confined to the primary channel set as defined by the ZLL specification (i.e., 11, 15, 20, and 25).  The plugin will always scan the primary channel set during touch linking or when searching for joinable, non-ZLL networks.  With this option enabled, the plugin will also scan the secondary channel set (i.e., 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, and 26) if the device is operating on a non-ZLL network and performs a touch link or if no networks are found on the primary channels when searching for joinable, non-ZLL networks.  The ZLL specification requires that devices scan the secondary channels in these situations.  This option will increase the scanning time but will potentially find more devices or networks.
scanSecondaryChannels.type=BOOLEAN
scanSecondaryChannels.default=TRUE

secondaryChannelMask.name=Secondary channel mask
secondaryChannelMask.description=The secondary channel set is used as a backup to allow ZLL devices to better interoperate with non-ZLL networks.  If enabled, the plugin will also scan the secondary channel set if the device is operating on a non-ZLL network and performs a touch link or if no networks are found on the primary channels when searching for joinable, non-ZLL networks.  The ZLL specification defines the secondary channel set as consisting of 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, and 26.
secondaryChannelMask.type=CHANNELS
secondaryChannelMask.default=0x05EF7000UL
secondaryChannelMask.dependsOn=scanSecondaryChannels

joinableScanTimeoutMinutes.name=Joinable scan timeout (minutes)
joinableScanTimeoutMinutes.description=The amount of time (in minutes) that the plugin will wait during a joinable network scan for the application to determine if the network joined to by the plugin is correct.  If the application leaves the network during this time, the plugin will automatically continue searching for other joinable networks.  If set to zero, the application will be unable to resume a joinable network search after successfully joining to a network.
joinableScanTimeoutMinutes.type=NUMBER:0,5
joinableScanTimeoutMinutes.default=1

identifyDuration.name=ZLL identify duration
identifyDuration.description=The amount of time (in seconds) the recipient is to remain in identify mode when an identify request command frame, used to request the recipient to identify itself in some application specific way to aid with touchlinking, is received. If set to 0 (0x0000), the recipient will exit identify mode. If set to 65535 (0xFFFF), the recipient will remain in identify mode for a default time known by the receiver. The field is set to 65535 (0xFFFF) by default.
identifyDuration.type=NUMBER:1,65535
identifyDuration.default=65535
identifyDuration.dependsOn=linkInitiator

zigbee3Support.name=ZigBee 3.0 Support
zigbee3Support.description=In ZigBee 3.0, the Base Device Behavior specification mandates that a factory new router initiator shall form a network before it touchlinks a target. Enabling this option will add that functionality to the plugin, whereas disabling the option will sustain legacy behavior. Enabling the option will also set the Profile Interop bit in the Touchlink information field for ZLL commissioning cluster commands for both initiators and targets.
zigbee3Support.type=BOOLEAN
zigbee3Support.default=TRUE

centralizedNetworkSupport.name=Centralized Network Initiator Support
centralizedNetworkSupport.description=Indicates whether or not a device currently on a centralized network is able to act as a touchlink initiator, and thus is able to join other devices to its network. Currently, this would only permitted for a coordinator node. (Note, this feature is experimental, and not Zigbee 3.0 compliant)
centralizedNetworkSupport.type=BOOLEAN
centralizedNetworkSupport.default=FALSE
centralizedNetworkSupport.dependsOn=linkInitiator

stealingAllowed.name=Stealing Allowed
stealingAllowed.description=Indicates whether a non-factory-new device may be touchlinked. (Note, in conformance with the Zigbee 3.0 Base Device Behaviour specification, all joined devices are considered non-factory-new from a touchlink point of view, including devices which automatically form a network on startup, e.g. by using emberZllFormNetwork. For such devices, stealing may be allowed by default at startup, but then subsequently forbidden on a successful touchlink, by calling emberZllSetPolicy.)
stealingAllowed.type=BOOLEAN
stealingAllowed.default=TRUE

events=touchLink,network
