• Nenhum resultado encontrado

End Device Bind, Bind and Unbind client services

No documento ZigBee Specification (páginas 100-104)

APS IB

1.4 The ZigBee device profile

1.4.3 Client services

1.4.3.2 End Device Bind, Bind and Unbind client services

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

1.4.3.1.12.3 Effect on receipt

On receipt of this command, the remote device shall configure the user descriptor with the supplied data.

The results of this command shall be communicated back to the local device through the User_Desc_conf command.

If this command is not supported or if a user descriptor does not exist, the return status provided with the User_Desc_conf command shall be set to NOT_SUPPORTED. If a user descriptor exists, the remote device shall configure it with the data supplied in the UserDescription field of the User_Desc_set command and the return status provided with the User_Desc_conf command shall be set to SUCCESS.45

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 Table 52 specifies the parameters for the End_Device_Bind_req primitive.

1.4.3.2.1.2 When generated

The End_Device_Bind_req is generated from Local Device devices wishing to perform End Device Bind with a Remote Device. The End_Device_Bind_req is generated, typically based on some user action like a button press. The destination addressing on this primitive shall be unicast and the destination address shall be that of the ZigBee Coordinator.

1.4.3.2.1.3 Effect on receipt

The ZigBee Coordinator shall retain the End_Device_Bind_req for a pre-configured timeout duration awaiting a second End_Device_Bind_req. If the second request does not appear within the timeout period, the ZigBee Coordinator shall generate a TIMEOUT status and return it with the End_Device_Bind_rsp to the originating Local Device. Assuming the second End_Device_Bind_req is received within the timeout period, it shall be matched with the first request on the basis of the ProfileID, InClusterList and OutClusterList.

If no match of the ProfileID is detected or if the ProfileID matches but none of the InClusterList or OutClusterList elements match, a status of NO_MATCH shall be supplied to both Local Devices via

Table 52 End_Device_Bind_req parameters

Name Type Valid range Description

BindingTarget

Device Address 16 bit address

The address of the target for the binding. This can be either the ZigBee coordinator or the device itself if it is a router.a

aCCB Comment #171

Endpoint 8 bits 1-240 The endpoint on the generating

device.b

bCCB Comment #211 ProfileID

Integer 0x0000-0xffff

ProfileID which is to be matched between two End_Device_Bind_req received at the ZigBee Coordinator within the timeout value pre-configured in the ZigBee Coordinator.

NumInClusters

Integer 0x00-0xff

The number of Input Clusters provided for end device binding within the InClusterList.

InClusterList

1 byte * NumInClusters

List of Input ClusterIDs to be used for matching. The InClusterList is the desired list to be matched by the Remote Device (the elements of the InClusterList are the supported output clusters of the Local Device).

NumOutClusters

Integer 0x00-0xff

The number of Output Clusters pro-vided for matching within OutCluster-List.

OutClusterList

1 byte * NumOutClusters

List of Output ClusterIDs to be used for matching. The OutClusterList is the desired list to be matched by the Remote Device (the elements of the InClusterList are the supported output clusters of the Remote Device).

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

End_Device_Bind_rsp to each device. If a match of Profile ID and at least one input or output clusterID is detected, an End_Device_Bind_rsp with status SUCCESS shall be issued to each Local Device which generated the End_Device_Bind_req.

The ZigBee coordinator shall then determine the 64-bit IEEE address of each local device. If these addresses are not known, the ZigBee coordinator shall determine them by using the IEEE_Addr_req command and corresponding IEEE_Addr_rsp command.

In order to facilitate a toggle action the ZigBee Coordinator shall then issue an Unbind_req command to the BindingTarget, specifying any one of the matched ClusterID values. If the returned status value is NO_ENTRY then the ZigBee Coordinator shall issue a Bind_req command for each matched ClusterID value. Otherwise the ZigBee Coordinator shall conclude that the binding records are instead to be removed and shall issue an Unbind_req command for any further matched ClusterID values.

The initial Unbind_req and any subsequent Bind_reqs or Unbind_reqs, containing the matched clusters, shall be directed to the BindingTarget, specified in the first End_Device_Bind_req command, and constructed as follows. The SrcAddress and DstAddress fields shall contain the 64-bit IEEE addresses derived, as described above, from the network addresses of the originators of the first and second End_Device_Bind_req commands, respectively. Similarly, the SrcEndp and DstEndp fields shall contain the endpoints contained in the first and second End_Device_Bind_req commands, respectively.46

1.4.3.2.2 Bind_req

1.4.3.2.2.1 Semantics of the service primitive This semantics of this primitive are as follows:

Table 53 specifies the parameters for the Bind_req primitive.

46CCB Comment #171, 233, 236

ClusterID=0x21 Bind_req (

SrcAddress, SrcEndp, ClusterID, DstAddress, DstEndp )

Table 53 Bind_req parameters

Name Type Valid range Description

SrcAddress IEEE

Address A valid 64-bit IEEE address The IEEE address for the source.

SrcEndp

Integer 0x01-0xf0 The source endpoint for the binding entry.

ClusterID

Integer 0x00-0xff

The identifier of the cluster on the source device that is bound to the des-tination.

DstAddress IEEE

Address A valid 64-bit IEEE address The IEEE address for the destination.

DstEndp

Integer 0x01-0xf0 The destination endpoint for the bind-ing entry.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 1.4.3.2.2.2 When generated

The Bind_req is generated from Local Device devices wishing to create a Binding Table entry for the source and destination addresses contained as parameters. The destination addressing on this primitive shall be unicast only and the destination address must be that of the ZigBee Coordinator or to the SrcAddress itself.

The Binding Manager is optionally supported on the source device (unless that device is also the ZigBee Coordinator) so that device shall issue a NOT_SUPPORTED status to the Bind_req if not supported.

1.4.3.2.2.3 Effect on receipt

Upon receipt, a Remote Device (ZigBee Coordinator or the device designated by SrcAddress) shall create a Binding Table entry based on the parameters supplied in the Bind_req if the Binding Manager is supported.

The Remote Device shall then respond with SUCCESS if the entry has been created by the Binding Manager, else the Remote Device shall respond with NOT_SUPPORTED.

1.4.3.2.3 Unbind_req

1.4.3.2.3.1 Semantics of the service primitive This semantics of this primitive are as follows:

Table 54 specifies the parameters for the Unbind_req primitive.

1.4.3.2.3.2 When generated

The Unbind_req is generated from Local Device devices wishing to remove a Binding Table entry for the source and destination addresses contained as parameters. The destination addressing on this primitive shall be unicast only and the destination address must be that of the ZigBee Coordinator or the SrcAddress.

ClusterID=0x22 Unbind_req (

SrcAddress, SrcEndp, ClusterID, DstAddress, DstEndp )

Table 54 Unbind_req parameters

Name Type Valid range Description

SrcAddress IEEE

Address A valid 64-bit IEEE address The IEEE address for the source.

SrcEndp

Integer 0x01-0xf0 The source endpoint for the binding entry.

ClusterID

Integer 0x00-0xff

The identifier of the cluster on the source device that is bound to the des-tination.

DstAddress IEEE

Address A valid 64-bit IEEE address The IEEE address for the destination.

DstEndp

Integer 0x01-0xf0 The destination endpoint for the bind-ing entry.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54

1.4.3.2.3.3 Effect on receipt

The Remote Device shall evaluate whether this request is supported. If the request is not supported, a Status of NOT_SUPPORTED shall be returned. If the request is supported, the Remote Device (ZigBee Coordinator or the SrcAddress) shall remove a Binding Table entry based on the parameters supplied in the Unbind_req. If the SrcAddress is specified and the Binding Manager is unsupported on that remote device, a status of NOT_SUPPORTED shall be returned. If a Binding Table entry for the SrvAddress, SrcEndp, ClusterID, DstAddress, DstEndp contained as parameters does not exist, the Remote Device shall respond with NO_ENTRY. Otherwise, the Remote Device shall delete the indicated Binding Table entry and respond with SUCCESS.

No documento ZigBee Specification (páginas 100-104)