• Nenhum resultado encontrado

Frame formats

No documento ZigBee Specification (páginas 195-198)

APS IB

2.4 Frame formats

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 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

2.4.1.1.1 Frame type sub-field

The frame type sub-field is two bits in length and shall be set to one of the non-reserved values listed in Table 127.

2.4.1.1.2 Protocol version sub-field

The protocol version sub-field is four bits in length and shall be set to a number reflecting the ZigBee NWK protocol version in use. The protocol version in use on a particular device shall be made available as the value of the NWK constant nwkcProtocolVersion, and shall have the value of 0x01 for all implementations based on this specification draft version.

2.4.1.1.3 Discover route sub-field

The DiscoverRoute parameter may be used to control route discovery operations for the transit of this frame (see sub-clause 2.7.3.4).106.

2.4.1.1.4 Security sub-field

The security sub-field shall have a value of 1 if and only if the frame is to have NWK security operations enabled. If security for this frame is implemented at another layer or disabled entirely, it shall have a value of 0.

2.4.1.2 Destination address field

The destination address field shall always be present. It shall be 2 octets in length and shall hold the 16-bit network address of the destination device or the broadcast address (0xffff). Note that the network address of a device shall always be the same as its IEEE 802.15.4-2003 MAC short address.

Table 127 Values of the frame type sub-field Frame type value

b1 b0 Frame type name

00 Data

01 NWK command

10 – 11 Reserved

Table 128 Values of the discover route sub-fielda

aCCB Comment #256

Discover route field value

b7 b6 Field meaning

0x00 Suppress route discovery

0x01 Enable route discovery

0x02 Force route discovery

0x03 Reserved

106CCB Comment #256

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 2.4.1.3 Source address field

The source address field shall always be present. It will always be 2 octets in length and shall hold the network address of the source device of the frame. Note that the network address of a device shall always be the same as its IEEE 802.15.4-2003 MAC short address.

2.4.1.4 Radius field107

The radius field shall always be present. It will be one octet in length and specifies the range of a radius transmission. The field shall be decremented by 1 by each receiving device.108

2.4.1.5 Sequence number field109

The sequence number field is present in every frame and is 1 octet in length. The sequence number value will be incremented by 1 with each new transmitted frame and the values of the source address field and the sequence number field of a frame, taken as a pair, may be used to uniquely identify a frame within the constraints imposed by the sequence number's 1-octet range. For more detail on the use of the sequence number field see sub-clause 2.7.2.110

2.4.1.6 Frame payload field

The frame payload field has a variable length and contains information specific to individual frame types.

2.4.2 Format of individual frame types

There are two defined NWK frame types: data and NWK command. Each of these frame types is discussed in the following sub-clauses.

2.4.2.1 Data frame format

The data frame shall be formatted as illustrated in Figure 38.

Figure 38 Data frame format

The order of the fields of the data frame shall conform to the order of the general NWK frame format as illustrated in Figure 36.

2.4.2.1.1 Data frame NWK header field

The NWK header field of a data frame shall contain the frame control field and an appropriate combination of routing fields as required.

In the frame control field, the frame type sub-field shall contain the value that indicates a data frame, as shown in Table 127. All other sub-fields shall be set according to the intended use of the data frame.

107CCB Comment #125 108Ibid

109CCB Comment #111 110CCB Comment #111, 113, 114

Octets: 2 See Figure 36 Variable Frame control Routing fields Data payload

NWK header NWK payload

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

The routing fields shall contain an appropriate combination of address and broadcast fields, depending on the settings in the frame control field (see Figure 37).

2.4.2.1.2 Data payload field

The data payload field of a data frame shall contain the sequence of octets, which the next higher layer has requested the NWK layer to transmit.

2.4.2.2 NWK command frame format

The NWK command frame shall be formatted as illustrated in Figure 39.

Figure 39 NWK command frame format

The order of the fields of the NWK command frame shall conform to the order of the general NWK frame as illustrated in Figure 36.

2.4.2.2.1 NWK command frame NWK header field

The NWK header field of a NWK command frame shall contain the frame control field and an appropriate combination of routing fields as required.

In the frame control field, the frame type sub-field shall contain the value that indicates a NWK command frame, as shown in Table 127. All other sub-fields shall be set according to the intended use of the NWK command frame.

The routing fields shall contain an appropriate combination of address and broadcast fields, depending on the settings in the frame control field.

2.4.2.2.2 NWK command identifier field

The NWK command identifier field indicates the NWK command being used. This field shall be set to one of the non-reserved values listed in Table 129.

2.4.2.2.3 NWK command payload field

The NWK command payload field of a NWK command frame shall contain the NWK command itself.

No documento ZigBee Specification (páginas 195-198)