lora-parser
v1.0.1
Published
Nodejs module to parse UDP packet forwarded by Semtech packet_forwarder
Downloads
16
Readme
Lora-Parser
Nodejs module to parse UDP datagrams forwarded by semtech packet_forwarder
#API Reference
Packet
Construct an instance of RF packet by using UDP datagrams forwarded by the LoRaWAN gateway.
Kind: global class
Summary: RF Packet forwarded by gateway
- Packet
- new Packet(raw)
- .protocolVersion ⇒ ProtocolVersion
- .token ⇒ Buffer
- .identifier ⇒ PacketIdentifier
- .message ⇒ PushData | *
- .raw ⇒ Buffer
new Packet(raw)
| Param | Type | Description | | --- | --- | --- | | raw | Buffer | data packet |
packet.protocolVersion ⇒ ProtocolVersion
Return Protocol version
Kind: instance property of Packet
packet.token ⇒ Buffer
Return packet random token
Kind: instance property of Packet
Returns: Buffer - of 2 bytes
packet.identifier ⇒ PacketIdentifier
Data identifier
Kind: instance property of Packet
packet.message ⇒ PushData | *
Kind: instance property of Packet
packet.raw ⇒ Buffer
Return raw data
Kind: instance property of Packet
Returns: Buffer - raw data
<a name="ProtocolVersion"></a>
ProtocolVersion
Construct an instance of RF packet by using UDP datagrams forwarded by the LoRaWAN gateway.
Kind: global class
Summary: RF Packet forwarded by gateway
new ProtocolVersion(raw)
| Param | Type | | --- | --- | | raw | Buffer |
<a name="PacketIdentifier"></a>
PacketIdentifier
Kind: global class
Throw: Error
- PacketIdentifier
- new PacketIdentifier(raw)
- .raw ⇒ Buffer | *
- .value ⇒ Number
new PacketIdentifier(raw)
| Param | Type | | --- | --- | | raw | Buffer |
packetIdentifier.raw ⇒ Buffer | *
Returns raw data
Kind: instance property of PacketIdentifier
packetIdentifier.value ⇒ Number
Return the integer value of this packet identifier
Kind: instance property of PacketIdentifier