...
SubID(7bits) | type(7bits) | Function | source |
0x1a | Short | TSCH synchronization IE – containing ASN, used to synchronize to the network | IEEE802.15.4e |
0x1b | Short | TSCH slotframe and link IE – containing slotframe definition and definition of links, used to join network and link reservation | IEEE802.15.4e |
0x1c | Short | TSCH Timeslot Template IE --containing only the ID of the template | IEEE802.15.4e |
0x9 | Long | TSCH Channel hopping IE --containing only the ID of the sequence | IEEE802.15.4e |
0x40 | Short | uResLinkType IE – containing slotframe definition, links definition and link type definition, used to join network | uRes |
0x41 | Short | uRes command IE --containing command ID | uRes |
0x42 | Short | uResBandwidth IE –containing SlotframeID and number of slots to be reserved, used in link reservation request | uRes |
0x43 | Short | uResGeneral Schedule IE –containing compressed schedule, e.g. BitMap | uRes |
(1)
TSCH Synchronization IE (Sync IE)
Descriptor (2B):- b0-7, length = 6
- b8-14, subID = 0x1a
- b15, type = 0 (short)
- IE Content (6B):
- ASN (5B), little endian
- Join priority (1B)
...
...
TSCH slotframe and link IE (Frame&Link IE)
Descriptor (2B):- b0-7, length = variable
- b8-14, subID = 0x1b
- b15, type = 0 (short)
- IE Content (variable):
- Number of Slotframes (1B) = variable
- Slotframe Info. and Links for each Slotframe
...
- Slotframe ID (1B)
...
- Size (2B)
...
- # of links (1B)
...
- Link(s)
...
- Channel Offset (2B)
...
- Timeslot (2B)
...
- Link Options (1B)
- Bit 0: TX = 1
- Bit 1: RX = 1
- Bit 2: shared = 1
- Bit 3: Timekeeping = 1
- Bits 3-7: 0
- Link Options (1B)
...
TSCH Timeslot Template IE (Timeslot IE)
Descriptor (2B):- b0-7, length = 1
- b8-14, subID = 0x1c
- b15, type = 0 (short)
- IE Content (1B):
- Timeslot template ID (1B) = 0x00, the 10 ms default slot defined in the spec.
- Other fields elided
...
...
Channel hopping IE (Ch-Hopping IE)
Descriptor (2B):- b0-10, length = 1
- b11-14, subID = 0x9
- b15, type = 1 (long)
- IE Content (1B/8B):
- Hopping sequence ID (1B) = 0x01 – this is taken to mean channels 11-25 in order, such that for offset 0, the channel used at ASN=0 is channel 11.
...
LinkType IE
Descriptor (2B):- b0-7, length = variable
- b8-14, subID = 0x40
- b15, type = 0 (short)
- IE Content (variable):
- Number of Slotframes (1B) = variable
- Slotframe Info. and Links for each Slotframe
...
- Slotframe ID (1B), same as that in Frame&Link IE in the same Advertisement BEACON
...
- # of links (1B), , same as that in Frame&Link IE in the same Advertisement BEACON
- # of links (1B), , same as that in Frame&Link IE in the same Advertisement BEACON
...
- Link(s)
...
- Channel Offset (2B), same as that in Frame&Link IE in the same Advertisement BEACON
...
- Timeslot (2B), , same as that in Frame&Link IE in the same Advertisement BEACON
...
- LinkType (1B)
Link Type
0x00
Advertisement
0x01
TX
0x02
RX
0x03
TXRX
...
...
uRes command IE (uRes-Cmd IE)
Descriptor (2B):- b0-7, length = 1
- b8-14, subID = 0x41
- b15, type = 0 (short)
- IE Content (1B):
- uRes command ID (1B)
Command ID
function
0x00
Reserve Link Request
0x01
Reserve Link Response
0x02
Remove Link Request
0x03
Schedule Request
0x04
Schedule Response
...
uRes Bandwidth IE
Descriptor (2B):- b0-7, length = 2
- b8-14, subID = 0x42
- b15, type = 0 (short)
- IE Content (2B):
- Slotframe ID (1B)
- # of links (1B)
...
...
uResGeneral Schedule IE (Schedule IE)
Descriptor (2B):- b0-7, length = variable
- b8-14, subID = 0x43
- b15, type = 0 (short)
- IE Content (variable):
- Compression Type (1B)
When Compression Type =0x00, i.e. BitMap
- Slotframe ID (1B)
- Size (2B)
- StartSlotOffset (2B)
- # of Slot (1B)
- BitsOnOneSlot(s)
- BitMap ofchannel 11-18 (1B)
- BitMap of channel 19-26 (1B)
uRes Packets
The IEs in each packet are summarized as follows.
...
For example, type=0x00, i.e. BItMap.Since a mote may use multiple Slotframes, BitMap will be the results of overlapping the link usage in every Slotframe. Thus, SlotframeID must be set as 0xFF. Here is an example. Assume number of channel is 8, and there are two Slotframes, the first one size=12, and the second one size=36, the BitMap IE example is shown as follows.
...
FSM of reservation and related functions
...
The figure below illustrates the finite-state machine of reservation. Res circles indicate state; green rounded rectangles indicate reservation commands and notification of command reception. Blue rectangles indicate middle procedures of reservation.
Reservation module starts with an “IDLE” state. Reservation module is driven by button interrupt. When you press button, reservation module will check variable “button_event”.
(You can find reservation code at "https://github.com/openwsn-berkeley/openwsn-fw/blob/uRes_branch_2545/openwsn/02b-MAChigh/reservation.c" and "https://github.com/openwsn-berkeley/openwsn-fw/blob/uRes_branch_2545/openwsn/02b-MAChigh/reservation.h"
pseudo-code:
Switch button_event:
pseudo-code:
Switch button_event:
Case 0:
Case 1:sending “Link Request” command.
Case 2:sending “remove links” command.
Default: sending a data at a TX slot, not at a TXRX slot.
Button_event++;
"Link Request" command
When a “Link Request” command is triggered, reservation module will do serial procedures to generate a “Link Request” message.
...
When calling “res_send()”, res module will check the creator of msg.
pseudo-code:-code:
If(msg->creater == COMPONENT_RESERVATION)
Send data at TXRX slot
If(msg->creater== COMPONENT_RESERVATIONUPPERLAYER)
Send data at TXRX slot
If(msg->creater== COMPONENT_UPPERLAYER)
Send data at TX slot
Call res_send_interval()
TX slot
Call res_send_interval()
Reservation code url:
Failsafe Components
In the implementation of uRES, a number of failsafe components are added to uRES.
...