Portability | portable |
---|---|
Stability | experimental |
Maintainer | David Joyner <david@joynerhome.net> |
Safe Haskell | Safe-Infered |
XBee ZNet 2.5 (ZigBee) frame types
- data Frame
- = ApiIdNotImplemented Word8
- | ModemStatus ModemStatusByte
- | ATCommand FrameId CommandName ByteString
- | ATCommandQueueParameterValue FrameId CommandName ByteString
- | ATCommandResponse FrameId CommandName CommandStatus ByteString
- | RemoteCommandRequest FrameId Address NetworkAddress CommandOptions CommandName ByteString
- | RemoteCommandResponse FrameId Address NetworkAddress CommandName CommandStatus ByteString
- | ZigBeeTransmitRequest FrameId Address NetworkAddress BroadcastRadius TransmitOptions ByteString
- | ExplicitAddressingZigBeeCommandFrame FrameId Address NetworkAddress SourceEndpoint DestinationEndpoint ClusterId ProfileId BroadcastRadius TransmitOptions ByteString
- | ZigBeeTransmitStatus FrameId NetworkAddress TransmitRetryCount DeliveryStatus DiscoveryStatus
- | ZigBeeReceivePacket Address NetworkAddress ReceiveOptions ByteString
- | ZigBeeExplicitRxIndicator Address NetworkAddress SourceEndpoint DestinationEndpoint ClusterId ProfileId ReceiveOptions ByteString
- | ZigBeeIODataSampleIndicator Address NetworkAddress ReceiveOptions SampleCount DigitalChannelMask AnalogChannelMask ByteString
- | XBeeSensorReadIndicator Address NetworkAddress ReceiveOptions XBeeSensorMask ByteString
- | NodeIdentificationIndicator Address NetworkAddress ReceiveOptions RemoteNetworkAddress RemoteAddress String ParentNetworkAddress DeviceType SourceAction ProfileId ManufacturerId
- data CommandName
- commandName :: String -> CommandName
- unCommandName :: CommandName -> String
- data Address
- address :: ByteString -> Address
- unAddress :: Address -> ByteString
- data NetworkAddress
- networkAddress :: ByteString -> NetworkAddress
- unNetworkAddress :: NetworkAddress -> ByteString
- type AnalogChannelMask = Word8
- type BroadcastRadius = Word8
- type ClusterId = Word8
- type CommandOptions = Word8
- type CommandStatus = Word8
- type DeviceType = Word8
- type DeliveryStatus = Word8
- type DestinationEndpoint = Word8
- type DigitalChannelMask = Word16
- type DiscoveryStatus = Word8
- type FrameId = Word8
- type ManufacturerId = Word8
- type ModemStatusByte = Word8
- type ParentNetworkAddress = NetworkAddress
- type ProfileId = Word8
- type ReceiveOptions = Word8
- type RemoteAddress = Address
- type RemoteNetworkAddress = NetworkAddress
- type SampleCount = Word8
- type SourceAction = Word8
- type SourceEndpoint = Word8
- type TransmitOptions = Word8
- type TransmitRetryCount = Word8
- type XBeeSensorMask = Word8
The Frame type
API frame types. See Section 6 of the XBee ZNet 2.5 Product Manual (ftp://ftp1.digi.com/support/documentation/90000866_C.pdf) for frame type-specific documentation.
AT-style command names
data CommandName Source
AT
command names. These are limited to two bytes, e.g. ND
for
neightbor discovery.
commandName :: String -> CommandNameSource
Construct a CommandName
. Beware that this function will error
if
the name is not exactly two bytes long.
unCommandName :: CommandName -> StringSource
Deconstruct a CommandName
.
Node addressing
All XBee ZNet 2.5 modules are identified by a unique (and static) 64-bit address.
address :: ByteString -> AddressSource
Construct an Address
. Beware that this function will error
if
the address is not exactly eight bytes long.
unAddress :: Address -> ByteStringSource
Deconstruct an Address
.
data NetworkAddress Source
When XBee ZNet 2.5 modules join the network they are assigned a 16-bit
address. Note that unlike Address
which is unique and static for a
given node, a node's NetworkAddress
is dynamic and may change over
time.
networkAddress :: ByteString -> NetworkAddressSource
Construct a NetworkAddress
. Beware that this function will error
if
the address is not exactly two bytes long.
unNetworkAddress :: NetworkAddress -> ByteStringSource
Deconstruct a NetworkAddress
.
Type aliases
type AnalogChannelMask = Word8Source
type BroadcastRadius = Word8Source
type CommandOptions = Word8Source
type CommandStatus = Word8Source
type DeviceType = Word8Source
type DeliveryStatus = Word8Source
type DestinationEndpoint = Word8Source
type DigitalChannelMask = Word16Source
type DiscoveryStatus = Word8Source
type ManufacturerId = Word8Source
type ModemStatusByte = Word8Source
type ReceiveOptions = Word8Source
type RemoteAddress = AddressSource
type SampleCount = Word8Source
type SourceAction = Word8Source
type SourceEndpoint = Word8Source
type TransmitOptions = Word8Source
type TransmitRetryCount = Word8Source
type XBeeSensorMask = Word8Source