Documentation
¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
func (*Conn) ReadMessage ¶
type Message ¶
type Message struct {
SourceAddr *net.UDPAddr
Conn *Conn
Header *MessageHeader
GatewayEui []byte
Payload interface{}
}
type MessageHeader ¶
type PHYPayload ¶
type PHYPayload struct {
MHDR byte
MACPayload []byte
MIC []byte
FCtrl byte
FCnt uint16
FOpts []byte
FPort byte
DevAddr uint32
}
func ParsePHYPayload ¶
func ParsePHYPayload(buf []byte) (*PHYPayload, error)
func (*PHYPayload) DecryptPayload ¶
func (d *PHYPayload) DecryptPayload(key []byte) ([]byte, error)
func (*PHYPayload) TestIntegrity ¶
func (d *PHYPayload) TestIntegrity(key []byte) (bool, error)
type PushMessagePayload ¶
type RXPK ¶
type RXPK struct {
Time time.Time `json:"time"`
Tmst uint `json:"tmst"`
Chan uint `json:"chan"`
Rfch uint `json:"rfch"`
Freq float64 `json:"freq"`
Stat int `json:"stat"`
Modu string `json:"modu"`
Datr string `json:"datr"`
Codr string `json:"codr"`
Rssi int `json:"rssi"`
Lsnr float64 `json:"lsnr"`
Size uint `json:"size"`
Data string `json:"data"`
}
func (*RXPK) ParseData ¶
func (rxpk *RXPK) ParseData() (*PHYPayload, error)
Click to show internal directories.
Click to hide internal directories.