Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeviceUplinkResponse ¶
type DeviceUplinkResponse struct { Result ExtendedUplinkResponse `json:"result"` Error string `json:"error"` }
DeviceUplinkResponse contains the uplink response and the error if applicable.
type DeviceUplinkResponses ¶
type DeviceUplinkResponses map[EUI]DeviceUplinkResponse
DeviceUplinkResponses maps the device EUIs to the DeviceUplinkResponse.
func (DeviceUplinkResponses) UnmarshalJSON ¶
func (d DeviceUplinkResponses) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Unmarshaler.
type DeviceUplinks ¶
type DeviceUplinks map[EUI]*LoRaUplink
DeviceUplinks maps device EUIs to LoRaUplink
func (DeviceUplinks) MarshalJSON ¶
func (u DeviceUplinks) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler.
type EUI ¶
EUI represents a dash-separated EUI64.
func (EUI) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*EUI) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type ExtendedUplinkResponse ¶ added in v3.10.1
type ExtendedUplinkResponse struct { UplinkResponse Raw *json.RawMessage }
ExtendedUplinkResponse extends UplinkResponse with the raw JSON payload.
func (ExtendedUplinkResponse) MarshalJSON ¶ added in v3.10.1
func (r ExtendedUplinkResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler. Note that the Raw representation takes precedence in the marshaling process, if it is available.
func (*ExtendedUplinkResponse) UnmarshalJSON ¶ added in v3.10.1
func (r *ExtendedUplinkResponse) UnmarshalJSON(b []byte) error
UnmarshalJSON implements json.Marshaler.
type Hex ¶
type Hex []byte
Hex represents hex encoded bytes.
func (Hex) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*Hex) UnmarshalJSON ¶
UnmarshalJSON implements json.Unmarshaler.
type LoRaDnlink ¶
LoRaDnlink is a specification for a modem device.
func (LoRaDnlink) Fields ¶
func (u LoRaDnlink) Fields() map[string]interface{}
Fields implements log.Fielder.
type LoRaUplink ¶
type LoRaUplink struct { Type LoRaUplinkType `json:"msgtype"` FCnt *uint32 `json:"fcnt,omitempty"` Port *uint8 `json:"port,omitempty"` Payload *Hex `json:"payload,omitempty"` DR *uint8 `json:"dr,omitempty"` Freq *uint32 `json:"freq,omitempty"` Timestamp *float64 `json:"timestamp,omitempty"` DownlinkMTU *uint32 `json:"dn_mtu,omitempty"` GNSSCaptureTime *float64 `json:"gnss_capture_time,omitempty"` GNSSCaptureTimeAccuracy *float64 `json:"gnss_capture_time_accuracy,omitempty"` GNSSAssistPosition []float64 `json:"gnss_assist_position,omitempty"` GNSSAssistAltitude *float64 `json:"gnss_assist_altitude,omitempty"` GNSSUse2DSolver *bool `json:"gnss_use_2D_solver,omitempty"` }
LoRaUplink encapsulates the information of a LoRa message.
type LoRaUplinkType ¶ added in v3.9.0
type LoRaUplinkType uint8
const ( // UplinkUplinkType is LoRaWAN Message Type. UplinkUplinkType LoRaUplinkType = iota // ModemUplinkType is DAS Protocol Message Type. ModemUplinkType // JoiningUplinkType is Session Reset Message Type. JoiningUplinkType // GNSSUplinkType is DAS GNSS Message Type. GNSSUplinkType )
func (LoRaUplinkType) MarshalJSON ¶ added in v3.9.0
func (t LoRaUplinkType) MarshalJSON() ([]byte, error)
MarshalJSON implements the json.Marshaler interface.
func (*LoRaUplinkType) UnmarshalJSON ¶ added in v3.9.0
func (t *LoRaUplinkType) UnmarshalJSON(b []byte) error
UnmarshalJSON implements the json.Unarmshaler.
type UplinkResponse ¶
type UplinkResponse struct {
Downlink *LoRaDnlink `json:"dnlink"`
}
UplinkResponse contains the state changes and completed items due to an uplink message.