#include <si_sys/serial.h>
#include <si_sha/autobrg.h>
#include <si_sha/zigbee.h>
Go to the source code of this file.
Classes | |
struct | sc_zigbeeBridge |
ZigBee Bridge driver. More... | |
Functions | |
sc_status | sc_zigbeeBridge_construct (sc_zigbeeBridge *pzb, const TCHAR *name, const TCHAR *devName, const TCHAR *basePath) |
sc_status | sc_zigbeeBridge_destruct (sc_zigbeeBridge *pb) |
sc_status | sc_zigbeeBridge_setMode (sc_zigbeeBridge *pzb, s_uint8 mode) |
sc_status | sc_zigbeeBridge_formNetwork (sc_zigbeeBridge *pzb, s_uint8 channel, s_uint16 panId) |
sc_status | sc_zigbeeBridge_permitJoining (sc_zigbeeBridge *pzb, s_uint8 permitted) |
sc_status | sc_zigbeeBridge_setLeds (sc_zigbeeBridge *pzb, s_uint8 lmask) |
This object is the low level bridge driver for the ZigBee device network. The C member functions of this object encode the binary serial messages to the controller, and follow the bridge <-> host protocol. This object currently works with the Atmel Raven USB stick, with specially modified firmware. It has been assigned the device type 02-00-01.
sc_status sc_zigbeeBridge_construct | ( | sc_zigbeeBridge * | pzb, | |
const TCHAR * | name, | |||
const TCHAR * | devName, | |||
const TCHAR * | basePath | |||
) |
Constructs a ZigBee bridge driver on the serial port with the special filename devName
.
[in,out] | pzb | The bridge object to construct. |
[in] | name | The name of the bridge. Used to name the Unix socket its interface is provided on. |
[in] | devName | The name of the 'special' file for the serial port the bridge is attached to. |
[in] | basePath | The base path for the application. |
sc_status sc_zigbeeBridge_destruct | ( | sc_zigbeeBridge * | pb | ) |
Destructs the given insteon bridge pb
.
sc_status sc_zigbeeBridge_formNetwork | ( | sc_zigbeeBridge * | pzb, | |
s_uint8 | channel, | |||
s_uint16 | panId | |||
) |
Forms the ZigBee network on the specified channel
and with the specified panId
.
The frequency channel can be one of the 16 channels 11-26 inclusive. The panId can be any 16 bit value and is user assigned. It only serves to distinguish networks if there happen to be multiple overlapping networks in a local area.
[in,out] | pzb | The ZigBee bridge. |
[in] | channel | The frequency channel (11-26) for the network. |
[in] | panId | The user assigned 16 bit panId. |
On secure ZigBee networks, each device must know the channel and panId parameters of the network.
sc_status sc_zigbeeBridge_permitJoining | ( | sc_zigbeeBridge * | pzb, | |
s_uint8 | permitted | |||
) |
Sets the bridge to permit new devices to join the network.
Typically left on when configuring the network, and turned off sometime later.
[in,out] | pzb | The ZigBee bridge. |
[in] | permitted | Non-zero to permit joining, zero otherwise. |
sc_status sc_zigbeeBridge_setLeds | ( | sc_zigbeeBridge * | pzb, | |
s_uint8 | lmask | |||
) |
Sets the state of the 4 LEDs available on the Raven USB stick.
This can be a useful debugging tool.
[in,out] | pzb | The ZigBee bridge. |
[in] | lmask | The LED mask, can have any value from 0-15. |
sc_status sc_zigbeeBridge_setMode | ( | sc_zigbeeBridge * | pzb, | |
s_uint8 | mode | |||
) |
Sets the operational mode of the bridge controller.
[in,out] | pzb | The ZigBee bridge. |
[in] | mode | The operating mode of the bridge. Can be either 0 (sniffer) or 3 (network). |