Versions in this module Expand all Collapse all v0 v0.0.2 Mar 8, 2023 v0.0.1 Mar 8, 2023 Changes in this version + func EncryptFOpts(nwkSEncKey AES128Key, aFCntDown, uplink bool, devAddr DevAddr, fCnt uint32, ...) ([]byte, error) + func EncryptFRMPayload(key AES128Key, uplink bool, devAddr DevAddr, fCnt uint32, data []byte) ([]byte, error) + func GetTXParamSetupEIRP(index uint8) (float32, error) + func GetTXParamSetupEIRPIndex(eirp float32) uint8 + func RegisterProprietaryMACCommand(uplink bool, cid CID, payloadSize int) error + type ADRParam struct + DelayExp uint8 + LimitExp uint8 + func (p *ADRParam) UnmarshalBinary(data []byte) error + func (p ADRParam) MarshalBinary() ([]byte, error) + type ADRParamSetupReqPayload struct + ADRParam ADRParam + func (p *ADRParamSetupReqPayload) UnmarshalBinary(data []byte) error + func (p ADRParamSetupReqPayload) MarshalBinary() ([]byte, error) + type AES128Key [16]byte + func (k *AES128Key) Scan(src interface{}) error + func (k *AES128Key) UnmarshalBinary(data []byte) error + func (k *AES128Key) UnmarshalText(text []byte) error + func (k AES128Key) MarshalBinary() ([]byte, error) + func (k AES128Key) MarshalText() ([]byte, error) + func (k AES128Key) String() string + func (k AES128Key) Value() (driver.Value, error) + type BeaconFreqAnsPayload struct + BeaconFrequencyOK bool + func (p *BeaconFreqAnsPayload) UnmarshalBinary(data []byte) error + func (p BeaconFreqAnsPayload) MarshalBinary() ([]byte, error) + type BeaconFreqReqPayload struct + Frequency uint32 + func (p *BeaconFreqReqPayload) UnmarshalBinary(data []byte) error + func (p BeaconFreqReqPayload) MarshalBinary() ([]byte, error) + type CFList struct + CFListType CFListType + Payload Payload + func (l *CFList) UnmarshalBinary(data []byte) error + func (l CFList) MarshalBinary() ([]byte, error) + type CFListChannelMaskPayload struct + ChannelMasks []ChMask + func (p *CFListChannelMaskPayload) UnmarshalBinary(uplink bool, data []byte) error + func (p CFListChannelMaskPayload) MarshalBinary() ([]byte, error) + type CFListChannelPayload struct + Channels [5]uint32 + func (p *CFListChannelPayload) UnmarshalBinary(uplink bool, data []byte) error + func (p CFListChannelPayload) MarshalBinary() ([]byte, error) + type CFListType uint8 + const CFListChannel + const CFListChannelMask + type CID byte + const ADRParamSetupAns + const ADRParamSetupReq + const BeaconFreqAns + const BeaconFreqReq + const DLChannelAns + const DLChannelReq + const DevStatusAns + const DevStatusReq + const DeviceModeConf + const DeviceModeInd + const DeviceTimeAns + const DeviceTimeReq + const DutyCycleAns + const DutyCycleReq + const ForceRejoinReq + const LinkADRAns + const LinkADRReq + const LinkCheckAns + const LinkCheckReq + const NewChannelAns + const NewChannelReq + const PingSlotChannelAns + const PingSlotChannelReq + const PingSlotInfoAns + const PingSlotInfoReq + const RXParamSetupAns + const RXParamSetupReq + const RXTimingSetupAns + const RXTimingSetupReq + const RejoinParamSetupAns + const RejoinParamSetupReq + const RekeyConf + const RekeyInd + const ResetConf + const ResetInd + const TXParamSetupAns + const TXParamSetupReq + func (c CID) MarshalText() ([]byte, error) + func (i CID) String() string + type ChMask [16]bool + func (m *ChMask) UnmarshalBinary(data []byte) error + func (m ChMask) MarshalBinary() ([]byte, error) + type DLChannelAnsPayload struct + ChannelFrequencyOK bool + UplinkFrequencyExists bool + func (p *DLChannelAnsPayload) UnmarshalBinary(data []byte) error + func (p DLChannelAnsPayload) MarshalBinary() ([]byte, error) + type DLChannelReqPayload struct + ChIndex uint8 + Freq uint32 + func (p *DLChannelReqPayload) UnmarshalBinary(data []byte) error + func (p DLChannelReqPayload) MarshalBinary() ([]byte, error) + type DLSettings struct + OptNeg bool + RX1DROffset uint8 + RX2DataRate uint8 + func (s *DLSettings) UnmarshalBinary(data []byte) error + func (s *DLSettings) UnmarshalText(text []byte) error + func (s DLSettings) MarshalBinary() ([]byte, error) + func (s DLSettings) MarshalText() ([]byte, error) + type DataPayload struct + Bytes []byte + func (p *DataPayload) UnmarshalBinary(uplink bool, data []byte) error + func (p DataPayload) MarshalBinary() ([]byte, error) + type DevAddr [4]byte + func (a *DevAddr) Scan(src interface{}) error + func (a *DevAddr) SetAddrPrefix(netID NetID) + func (a *DevAddr) UnmarshalBinary(data []byte) error + func (a *DevAddr) UnmarshalText(text []byte) error + func (a DevAddr) IsNetID(netID NetID) bool + func (a DevAddr) MarshalBinary() ([]byte, error) + func (a DevAddr) MarshalText() ([]byte, error) + func (a DevAddr) NetIDType() int + func (a DevAddr) NwkID() []byte + func (a DevAddr) String() string + func (a DevAddr) Value() (driver.Value, error) + type DevNonce uint16 + func (n *DevNonce) UnmarshalBinary(data []byte) error + func (n DevNonce) MarshalBinary() ([]byte, error) + type DevStatusAnsPayload struct + Battery uint8 + Margin int8 + func (p *DevStatusAnsPayload) UnmarshalBinary(data []byte) error + func (p DevStatusAnsPayload) MarshalBinary() ([]byte, error) + type DeviceModeClass byte + const DeviceModeClassA + const DeviceModeClassC + const DeviceModeRFU + func (i DeviceModeClass) String() string + type DeviceModeConfPayload struct + Class DeviceModeClass + func (p *DeviceModeConfPayload) UnmarshalBinary(data []byte) error + func (p DeviceModeConfPayload) MarshalBinary() ([]byte, error) + type DeviceModeIndPayload struct + Class DeviceModeClass + func (p *DeviceModeIndPayload) UnmarshalBinary(data []byte) error + func (p DeviceModeIndPayload) MarshalBinary() ([]byte, error) + type DeviceTimeAnsPayload struct + TimeSinceGPSEpoch time.Duration + func (p *DeviceTimeAnsPayload) UnmarshalBinary(data []byte) error + func (p DeviceTimeAnsPayload) MarshalBinary() ([]byte, error) + type DutyCycleReqPayload struct + MaxDCycle uint8 + func (p *DutyCycleReqPayload) UnmarshalBinary(data []byte) error + func (p DutyCycleReqPayload) MarshalBinary() ([]byte, error) + type DwellTime int + const DwellTime400ms + const DwellTimeNoLimit + type EUI64 [8]byte + func (e *EUI64) Scan(src interface{}) error + func (e *EUI64) UnmarshalBinary(data []byte) error + func (e *EUI64) UnmarshalText(text []byte) error + func (e EUI64) MarshalBinary() ([]byte, error) + func (e EUI64) MarshalText() ([]byte, error) + func (e EUI64) String() string + func (e EUI64) Value() (driver.Value, error) + type FCtrl struct + ACK bool + ADR bool + ADRACKReq bool + ClassB bool + FPending bool + func (c *FCtrl) UnmarshalBinary(data []byte) error + func (c FCtrl) MarshalBinary() ([]byte, error) + type FHDR struct + DevAddr DevAddr + FCnt uint32 + FCtrl FCtrl + FOpts []Payload + func (h *FHDR) UnmarshalBinary(uplink bool, data []byte) error + func (h FHDR) MarshalBinary() ([]byte, error) + type ForceRejoinReqPayload struct + DR uint8 + MaxRetries uint8 + Period uint8 + RejoinType uint8 + func (p *ForceRejoinReqPayload) UnmarshalBinary(data []byte) error + func (p ForceRejoinReqPayload) MarshalBinary() ([]byte, error) + type JoinAcceptPayload struct + CFList *CFList + DLSettings DLSettings + DevAddr DevAddr + HomeNetID NetID + JoinNonce JoinNonce + RXDelay uint8 + func (p *JoinAcceptPayload) UnmarshalBinary(uplink bool, data []byte) error + func (p JoinAcceptPayload) MarshalBinary() ([]byte, error) + type JoinNonce uint32 + func (n *JoinNonce) UnmarshalBinary(data []byte) error + func (n JoinNonce) MarshalBinary() ([]byte, error) + type JoinRequestPayload struct + DevEUI EUI64 + DevNonce DevNonce + JoinEUI EUI64 + func (p *JoinRequestPayload) UnmarshalBinary(uplink bool, data []byte) error + func (p JoinRequestPayload) MarshalBinary() ([]byte, error) + type JoinType uint8 + const JoinRequestType + const RejoinRequestType0 + const RejoinRequestType1 + const RejoinRequestType2 + func (i JoinType) String() string + type LinkADRAnsPayload struct + ChannelMaskACK bool + DataRateACK bool + PowerACK bool + func (p *LinkADRAnsPayload) UnmarshalBinary(data []byte) error + func (p LinkADRAnsPayload) MarshalBinary() ([]byte, error) + type LinkADRReqPayload struct + ChMask ChMask + DataRate uint8 + Redundancy Redundancy + TXPower uint8 + func (p *LinkADRReqPayload) UnmarshalBinary(data []byte) error + func (p LinkADRReqPayload) MarshalBinary() ([]byte, error) + type LinkCheckAnsPayload struct + GwCnt uint8 + Margin uint8 + func (p *LinkCheckAnsPayload) UnmarshalBinary(data []byte) error + func (p LinkCheckAnsPayload) MarshalBinary() ([]byte, error) + type MACCommand struct + CID CID + Payload MACCommandPayload + func (m *MACCommand) UnmarshalBinary(uplink bool, data []byte) error + func (m MACCommand) MarshalBinary() ([]byte, error) + type MACCommandPayload interface + MarshalBinary func() (data []byte, err error) + UnmarshalBinary func(data []byte) error + func GetMACPayloadAndSize(uplink bool, c CID) (MACCommandPayload, int, error) + type MACPayload struct + FHDR FHDR + FPort *uint8 + FRMPayload []Payload + func (p *MACPayload) UnmarshalBinary(uplink bool, data []byte) error + func (p MACPayload) MarshalBinary() ([]byte, error) + type MACVersion byte + const LoRaWAN1_0 + const LoRaWAN1_1 + type MHDR struct + MType MType + Major Major + func (h *MHDR) UnmarshalBinary(data []byte) error + func (h MHDR) MarshalBinary() ([]byte, error) + type MIC [4]byte + func (m MIC) MarshalText() ([]byte, error) + func (m MIC) String() string + type MType byte + const ConfirmedDataDown + const ConfirmedDataUp + const JoinAccept + const JoinRequest + const Proprietary + const RejoinRequest + const UnconfirmedDataDown + const UnconfirmedDataUp + func (i MType) String() string + func (m MType) MarshalText() ([]byte, error) + type Major byte + const LoRaWANR1 + func (i Major) String() string + func (m Major) MarshalText() ([]byte, error) + type NetID [3]byte + func (n *NetID) Scan(src interface{}) error + func (n *NetID) UnmarshalBinary(data []byte) error + func (n *NetID) UnmarshalText(text []byte) error + func (n NetID) ID() []byte + func (n NetID) MarshalBinary() ([]byte, error) + func (n NetID) MarshalText() ([]byte, error) + func (n NetID) String() string + func (n NetID) Type() int + func (n NetID) Value() (driver.Value, error) + type NewChannelAnsPayload struct + ChannelFrequencyOK bool + DataRateRangeOK bool + func (p *NewChannelAnsPayload) UnmarshalBinary(data []byte) error + func (p NewChannelAnsPayload) MarshalBinary() ([]byte, error) + type NewChannelReqPayload struct + ChIndex uint8 + Freq uint32 + MaxDR uint8 + MinDR uint8 + func (p *NewChannelReqPayload) UnmarshalBinary(data []byte) error + func (p NewChannelReqPayload) MarshalBinary() ([]byte, error) + type PHYPayload struct + MACPayload Payload + MHDR MHDR + MIC MIC + func (p *PHYPayload) DecodeFOptsToMACCommands() error + func (p *PHYPayload) DecodeFRMPayloadToMACCommands() error + func (p *PHYPayload) DecryptFOpts(nwkSEncKey AES128Key) error + func (p *PHYPayload) DecryptFRMPayload(key AES128Key) error + func (p *PHYPayload) DecryptJoinAcceptPayload(key AES128Key) error + func (p *PHYPayload) EncryptFOpts(nwkSEncKey AES128Key) error + func (p *PHYPayload) EncryptFRMPayload(key AES128Key) error + func (p *PHYPayload) EncryptJoinAcceptPayload(key AES128Key) error + func (p *PHYPayload) SetDownlinkDataMIC(macVersion MACVersion, confFCnt uint32, sNwkSIntKey AES128Key) error + func (p *PHYPayload) SetDownlinkJoinMIC(joinReqType JoinType, joinEUI EUI64, devNonce DevNonce, key AES128Key) error + func (p *PHYPayload) SetUplinkDataMIC(macVersion MACVersion, confFCnt uint32, txDR, txCh uint8, ...) error + func (p *PHYPayload) SetUplinkJoinMIC(key AES128Key) error + func (p *PHYPayload) UnmarshalBinary(data []byte) error + func (p *PHYPayload) UnmarshalText(text []byte) error + func (p PHYPayload) MarshalBinary() ([]byte, error) + func (p PHYPayload) MarshalJSON() ([]byte, error) + func (p PHYPayload) MarshalText() ([]byte, error) + func (p PHYPayload) ValidateDownlinkDataMIC(macVersion MACVersion, confFCnt uint32, sNwkSIntKey AES128Key) (bool, error) + func (p PHYPayload) ValidateDownlinkJoinMIC(joinReqType JoinType, joinEUI EUI64, devNonce DevNonce, key AES128Key) (bool, error) + func (p PHYPayload) ValidateUplinkDataMIC(macVersion MACVersion, confFCnt uint32, txDR, txCh uint8, ...) (bool, error) + func (p PHYPayload) ValidateUplinkDataMICF(fNwkSIntKey AES128Key) (bool, error) + func (p PHYPayload) ValidateUplinkJoinMIC(key AES128Key) (bool, error) + type Payload interface + MarshalBinary func() (data []byte, err error) + UnmarshalBinary func(uplink bool, data []byte) error + type PingSlotChannelAnsPayload struct + ChannelFrequencyOK bool + DataRateOK bool + func (p *PingSlotChannelAnsPayload) UnmarshalBinary(data []byte) error + func (p PingSlotChannelAnsPayload) MarshalBinary() ([]byte, error) + type PingSlotChannelReqPayload struct + DR uint8 + Frequency uint32 + func (p *PingSlotChannelReqPayload) UnmarshalBinary(data []byte) error + func (p PingSlotChannelReqPayload) MarshalBinary() ([]byte, error) + type PingSlotInfoReqPayload struct + Periodicity uint8 + func (p *PingSlotInfoReqPayload) UnmarshalBinary(data []byte) error + func (p PingSlotInfoReqPayload) MarshalBinary() ([]byte, error) + type ProprietaryMACCommandPayload struct + Bytes []byte + func (p *ProprietaryMACCommandPayload) UnmarshalBinary(data []byte) error + func (p ProprietaryMACCommandPayload) MarshalBinary() ([]byte, error) + type RXParamSetupAnsPayload struct + ChannelACK bool + RX1DROffsetACK bool + RX2DataRateACK bool + func (p *RXParamSetupAnsPayload) UnmarshalBinary(data []byte) error + func (p RXParamSetupAnsPayload) MarshalBinary() ([]byte, error) + type RXParamSetupReqPayload struct + DLSettings DLSettings + Frequency uint32 + func (p *RXParamSetupReqPayload) UnmarshalBinary(data []byte) error + func (p RXParamSetupReqPayload) MarshalBinary() ([]byte, error) + type RXTimingSetupReqPayload struct + Delay uint8 + func (p *RXTimingSetupReqPayload) UnmarshalBinary(data []byte) error + func (p RXTimingSetupReqPayload) MarshalBinary() ([]byte, error) + type Redundancy struct + ChMaskCntl uint8 + NbRep uint8 + func (r *Redundancy) UnmarshalBinary(data []byte) error + func (r Redundancy) MarshalBinary() ([]byte, error) + type RejoinParamSetupAnsPayload struct + TimeOK bool + func (p *RejoinParamSetupAnsPayload) UnmarshalBinary(data []byte) error + func (p RejoinParamSetupAnsPayload) MarshalBinary() ([]byte, error) + type RejoinParamSetupReqPayload struct + MaxCountN uint8 + MaxTimeN uint8 + func (p *RejoinParamSetupReqPayload) UnmarshalBinary(data []byte) error + func (p RejoinParamSetupReqPayload) MarshalBinary() ([]byte, error) + type RejoinRequestType02Payload struct + DevEUI EUI64 + NetID NetID + RJCount0 uint16 + RejoinType JoinType + func (p *RejoinRequestType02Payload) UnmarshalBinary(uplink bool, data []byte) error + func (p RejoinRequestType02Payload) MarshalBinary() ([]byte, error) + type RejoinRequestType1Payload struct + DevEUI EUI64 + JoinEUI EUI64 + RJCount1 uint16 + RejoinType JoinType + func (p *RejoinRequestType1Payload) UnmarshalBinary(uplink bool, data []byte) error + func (p RejoinRequestType1Payload) MarshalBinary() ([]byte, error) + type RekeyConfPayload struct + ServLoRaWANVersion Version + func (p *RekeyConfPayload) UnmarshalBinary(data []byte) error + func (p RekeyConfPayload) MarshalBinary() ([]byte, error) + type RekeyIndPayload struct + DevLoRaWANVersion Version + func (p *RekeyIndPayload) UnmarshalBinary(data []byte) error + func (p RekeyIndPayload) MarshalBinary() ([]byte, error) + type ResetConfPayload struct + ServLoRaWANVersion Version + func (p *ResetConfPayload) UnmarshalBinary(data []byte) error + func (p ResetConfPayload) MarshalBinary() ([]byte, error) + type ResetIndPayload struct + DevLoRaWANVersion Version + func (p *ResetIndPayload) UnmarshalBinary(data []byte) error + func (p ResetIndPayload) MarshalBinary() ([]byte, error) + type TXParamSetupReqPayload struct + DownlinkDwelltime DwellTime + MaxEIRP uint8 + UplinkDwellTime DwellTime + func (p *TXParamSetupReqPayload) UnmarshalBinary(data []byte) error + func (p TXParamSetupReqPayload) MarshalBinary() ([]byte, error) + type Version struct + Minor uint8 + func (v *Version) UnmarshalBinary(data []byte) error + func (v Version) MarshalBinary() ([]byte, error)