Versions in this module Expand all Collapse all v1 v1.0.0 Sep 23, 2021 Changes in this version + const ProtocolVersion1_0 + var ErrAsyncTimeout = errors.New("async timeout") + type Answer interface + GetBasePayload func() BasePayloadResult + type AppSKeyAnsPayload struct + AppSKey *KeyEnvelope + DevEUI lorawan.EUI64 + SessionKeyID HEXBytes + func (p AppSKeyAnsPayload) GetBasePayload() BasePayloadResult + type AppSKeyReqPayload struct + DevEUI lorawan.EUI64 + SessionKeyID HEXBytes + func (p AppSKeyReqPayload) GetBasePayload() BasePayload + type BasePayload struct + MessageType MessageType + ProtocolVersion string + ReceiverID string + ReceiverToken HEXBytes + SenderID string + SenderToken HEXBytes + TransactionID uint32 + VSExtension VSExtension + type BasePayloadResult struct + Result Result + func (p BasePayloadResult) GetBasePayload() BasePayloadResult + type Client interface + GetRandomTransactionID func() uint32 + GetReceiverID func() string + GetSenderID func() string + HandleAnswer func(context.Context, Answer) error + HomeNSReq func(context.Context, HomeNSReqPayload) (HomeNSAnsPayload, error) + IsAsync func() bool + JoinReq func(context.Context, JoinReqPayload) (JoinAnsPayload, error) + PRStartReq func(context.Context, PRStartReqPayload) (PRStartAnsPayload, error) + PRStopReq func(context.Context, PRStopReqPayload) (PRStopAnsPayload, error) + ProfileReq func(context.Context, ProfileReqPayload) (ProfileAnsPayload, error) + RejoinReq func(context.Context, RejoinReqPayload) (RejoinAnsPayload, error) + SendAnswer func(context.Context, Answer) error + XmitDataReq func(context.Context, XmitDataReqPayload) (XmitDataAnsPayload, error) + func NewClient(config ClientConfig) (Client, error) + type ClientConfig struct + AsyncTimeout time.Duration + Authorization string + CACert string + Logger *log.Logger + ReceiverID string + RedisClient redis.UniversalClient + SenderID string + Server string + TLSCert string + TLSKey string + type DLMetaData struct + ClassMode *string + Confirmed bool + DLFreq1 *float64 + DLFreq2 *float64 + DataRate1 *int + DataRate2 *int + DevEUI *lorawan.EUI64 + FCntDown *uint32 + FNSULToken HEXBytes + FPort *uint8 + GWInfo []GWInfoElement + HiPriorityFlag bool + RXDelay1 *int + type DeviceProfile struct + ClassBTimeout int + ClassCTimeout int + DeviceProfileID string + FactoryPresetFreqs []Frequency + MACVersion string + MaxDutyCycle Percentage + MaxEIRP int + PingSlotDR int + PingSlotFreq Frequency + PingSlotPeriod int + RFRegion string + RXDROffset1 int + RXDataRate2 int + RXDelay1 int + RXFreq2 Frequency + RegParamsRevision string + Supports32bitFCnt bool + SupportsClassB bool + SupportsClassC bool + SupportsJoin bool + type Frequency int + func (f *Frequency) UnmarshalJSON(str []byte) error + func (f Frequency) MarshalJSON() ([]byte, error) + type GWInfoElement struct + DLAllowed bool + FineRecvTime *int + ID HEXBytes + Lat *float64 + Lon *float64 + RFRegion string + RSSI *int + SNR *float64 + ULToken HEXBytes + type HEXBytes []byte + func (hb *HEXBytes) UnmarshalText(text []byte) error + func (hb HEXBytes) MarshalText() ([]byte, error) + func (hb HEXBytes) String() string + type HRStartAnsPayload struct + DLMetaData *DLMetaData + DeviceProfile *DeviceProfile + DeviceProfileTimestamp *ISO8601Time + FNwkSIntKey *KeyEnvelope + Lifetime *int + NwkSEncKey *KeyEnvelope + NwkSKey *KeyEnvelope + PHYPayload HEXBytes + SNwkSIntKey *KeyEnvelope + ServiceProfile *ServiceProfile + func (p HRStartAnsPayload) GetBasePayload() BasePayloadResult + type HRStartReqPayload struct + CFList HEXBytes + DLSettings lorawan.DLSettings + DevAddr lorawan.DevAddr + DeviceProfile DeviceProfile + DeviceProfileTimestamp ISO8601Time + MACVersion string + PHYPayload HEXBytes + RxDelay int + ULMetaData ULMetaData + func (p HRStartReqPayload) GetBasePayload() BasePayload + type HRStopAnsPayload struct + func (p HRStopAnsPayload) GetBasePayload() BasePayloadResult + type HRStopReqPayload struct + DevEUI lorawan.EUI64 + func (p HRStopReqPayload) GetBasePayload() BasePayload + type HomeNSAnsPayload struct + HNetID lorawan.NetID + func (p HomeNSAnsPayload) GetBasePayload() BasePayloadResult + type HomeNSReqPayload struct + DevEUI lorawan.EUI64 + func (p HomeNSReqPayload) GetBasePayload() BasePayload + type ISO8601Time time.Time + func (t *ISO8601Time) UnmarshalText(text []byte) error + func (t ISO8601Time) MarshalText() ([]byte, error) + type JoinAnsPayload struct + AppSKey *KeyEnvelope + FNwkSIntKey *KeyEnvelope + Lifetime *int + NwkSEncKey *KeyEnvelope + NwkSKey *KeyEnvelope + PHYPayload HEXBytes + SNwkSIntKey *KeyEnvelope + SessionKeyID HEXBytes + func (p JoinAnsPayload) GetBasePayload() BasePayloadResult + type JoinReqPayload struct + CFList HEXBytes + DLSettings lorawan.DLSettings + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + MACVersion string + PHYPayload HEXBytes + RxDelay int + func (p JoinReqPayload) GetBasePayload() BasePayload + type KeyEnvelope struct + AESKey HEXBytes + KEKLabel string + func NewKeyEnvelope(kekLabel string, kek []byte, key lorawan.AES128Key) (*KeyEnvelope, error) + func (k KeyEnvelope) Unwrap(kek []byte) (lorawan.AES128Key, error) + type MessageType string + const AppSKeyAns + const AppSKeyReq + const HRStartAns + const HRStartReq + const HRStopAns + const HRStopReq + const HomeNSAns + const HomeNSReq + const JoinAns + const JoinReq + const PRStartAns + const PRStartReq + const PRStopAns + const PRStopReq + const ProfileAns + const ProfileReq + const RejoinAns + const RejoinReq + const XmitDataAns + const XmitDataReq + type NetworkActivationRecord struct + ActivationTime time.Time + DeactivationTime time.Time + DevEUI lorawan.EUI64 + IndividualRecord bool + NetID lorawan.NetID + ServiceProfileID string + TotalActiveDevices int + type NetworkTrafficRecord struct + NetID lorawan.NetID + RoamingType RoamingType + ServiceProfileID string + TotalDLBytes int + TotalDLPackets int + TotalOutProfileDLBytes int + TotalOutProfileDLPackets int + TotalOutProfileULBytes int + TotalOutProfileULPackets int + TotalULBytes int + TotalULPackets int + type PRStartAnsPayload struct + DLMetaData *DLMetaData + DevAddr *lorawan.DevAddr + DevEUI *lorawan.EUI64 + FCntUp *uint32 + FNwkSIntKey *KeyEnvelope + Lifetime *int + NwkSKey *KeyEnvelope + PHYPayload HEXBytes + ServiceProfile *ServiceProfile + func (p PRStartAnsPayload) GetBasePayload() BasePayloadResult + type PRStartReqPayload struct + PHYPayload HEXBytes + ULMetaData ULMetaData + func (p PRStartReqPayload) GetBasePayload() BasePayload + type PRStopAnsPayload struct + func (p PRStopAnsPayload) GetBasePayload() BasePayloadResult + type PRStopReqPayload struct + DevEUI lorawan.EUI64 + Lifetime *int + func (p PRStopReqPayload) GetBasePayload() BasePayload + type Percentage int + func (p *Percentage) UnmarshalJSON(str []byte) error + func (p Percentage) MarshalJSON() ([]byte, error) + type ProfileAnsPayload struct + DeviceProfile *DeviceProfile + DeviceProfileTimestamp *ISO8601Time + RoamingActivationType *RoamingType + func (p ProfileAnsPayload) GetBasePayload() BasePayloadResult + type ProfileReqPayload struct + DevEUI lorawan.EUI64 + func (p ProfileReqPayload) GetBasePayload() BasePayload + type RatePolicy string + const Drop + const Mark + type RejoinAnsPayload struct + AppSKey *KeyEnvelope + FNwkSIntKey *KeyEnvelope + Lifetime *int + NwkSEncKey *KeyEnvelope + NwkSKey *KeyEnvelope + PHYPayload HEXBytes + SNwkSIntKey *KeyEnvelope + SessionKeyID HEXBytes + func (p RejoinAnsPayload) GetBasePayload() BasePayloadResult + type RejoinReqPayload struct + CFList HEXBytes + DLSettings lorawan.DLSettings + DevAddr lorawan.DevAddr + DevEUI lorawan.EUI64 + MACVersion string + PHYPayload HEXBytes + RxDelay int + func (p RejoinReqPayload) GetBasePayload() BasePayload + type Request interface + GetBasePayload func() BasePayload + type Result struct + Description string + ResultCode ResultCode + type ResultCode string + const ActivationDisallowed + const Deferred + const DevRoamingDisallowed + const FrameSizeError + const InvalidFPort + const InvalidProtocolVersion + const JoinReqFailed + const MICFailed + const MalformedRequest + const NoRoamingAgreement + const Other + const RoamingActDisallowed + const StaleDeviceProfile + const Success + const UnknownDevAddr + const UnknownDevEUI + const UnknownReceiver + const UnknownSender + const XmitFailed + type RoamingType string + const Handover + const Passive + type RoutingProfile struct + ASID string + RoutingProfileID string + type ServiceProfile struct + AddGWMetadata bool + ChannelMask HEXBytes + DLBucketSize int + DLRate int + DLRatePolicy RatePolicy + DRMax int + DRMin int + DevStatusReqFreq int + HRAllowed bool + MinGWDiversity int + NwkGeoLoc bool + PRAllowed bool + RAAllowed bool + ReportDevStatusBattery bool + ReportDevStatusMargin bool + ServiceProfileID string + TargetPER Percentage + ULBucketSize int + ULRate int + ULRatePolicy RatePolicy + type ULMetaData struct + Battery *int + Confirmed bool + DataRate *int + DevAddr *lorawan.DevAddr + DevEUI *lorawan.EUI64 + FCntDown *uint32 + FCntUp *uint32 + FNSULToken HEXBytes + FPort *uint8 + GWCnt *int + GWInfo []GWInfoElement + Margin *int + RFRegion string + RecvTime ISO8601Time + ULFreq *float64 + type VSExtension struct + Object json.RawMessage + VendorID HEXBytes + type XmitDataAnsPayload struct + DLFreq1 *float64 + DLFreq2 *float64 + func (p XmitDataAnsPayload) GetBasePayload() BasePayloadResult + type XmitDataReqPayload struct + DLMetaData *DLMetaData + FRMPayload HEXBytes + PHYPayload HEXBytes + ULMetaData *ULMetaData + func (p XmitDataReqPayload) GetBasePayload() BasePayload