Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AtrovanGenerator ¶
type AtrovanGenerator struct { }
AtrovanGenerator generates data based on atrovan protocol and atrovan model.
func (AtrovanGenerator) Generate ¶
func (g AtrovanGenerator) Generate(input interface{}) ([]byte, error)
Generate generates atrovan message by converting input into telemetries json and using generator parameters.
func (AtrovanGenerator) Topic ¶
func (g AtrovanGenerator) Topic() string
Topic returns atrovan mqtt topic
type FancoGenerator ¶
type FancoGenerator struct {
ThingID string `mapstructure:"thingID"`
}
FancoGenerator generates data with allthingstalk format and sends them with pure json.
func (FancoGenerator) Generate ¶
func (g FancoGenerator) Generate(input interface{}) ([]byte, error)
Generate generates data message (in thing state format with all of its assets) in pure json.
func (FancoGenerator) Topic ¶
func (g FancoGenerator) Topic() string
Topic returns I1820 thing state topic. this topic sets thing state (with all of its assets) in I1820
type ISRCGenerator ¶
type ISRCGenerator struct { ApplicationID int `mapstructure:"applicationID"` ApplicationName string `mapstructure:"applicationName"` DeviceName string `mapstructure:"deviceName"` DevEUI string `mapstructure:"devEUI"` GatewayMac string `mapstructure:"gatewayMAC"` }
ISRCGenerator generates data based on RxMessage structure as is described above and then encode it with cbor(http://cbor.io/). for historical reasons for refer to it as ISRC protocol
func (ISRCGenerator) Generate ¶
func (g ISRCGenerator) Generate(input interface{}) ([]byte, error)
Generate generates lora message by converting input into cbor and generator parameters.
type RxInfo ¶
type RxInfo struct { Mac string Name string Time time.Time RSSI int `json:"rssi"` LoRaSNR float64 `json:"LoRaSNR"` }
RxInfo contains reception infomation of a lara gateway that payload is received from it.
type RxMessage ¶
type RxMessage struct { ApplicationID string ApplicationName string DeviceName string DevEUI string FPort int FCnt int RxInfo []RxInfo TxInfo TxInfo Data []byte }
RxMessage contains payloads received from your nodes in loraserver.io
type TTNGenerator ¶
type TTNGenerator struct { ApplicationName string `mapstructure:"applicationName"` ApplicationID string `mapstructure:"applicationID"` DevEUI string `mapstructure:"devEUI"` DeviceName string `mapstructure:"deviceName"` }
TTNGenerator generates data based on TheThingsNetwork format for I1820 ttn integration mdoule.
func (TTNGenerator) Generate ¶
func (g TTNGenerator) Generate(input interface{}) ([]byte, error)
Generate generates lora message by converting input into cbor and generator parameters into ttn message format.
func (TTNGenerator) Topic ¶
func (g TTNGenerator) Topic() string
Topic returns ttn integration http topic
type TTNRequest ¶
type TTNRequest struct { AppID string `json:"app_id"` DevID string `json:"dev_id"` HardwareSerial string `json:"hardware_serial"` Port int `json:"port"` Counter int `json:"counter"` IsRetry bool `json:"is_retry"` Confirmed bool `json:"confirmed"` PayloadRaw []byte `json:"payload_raw"` Metadata struct { Time time.Time `json:"time"` Frequency float64 `json:"frequency"` Modulation string `json:"modulation"` DataRate string `json:"data_rate"` BitRate int `json:"bit_rate"` CondingRate string `json:"conding_rate"` Gateways []struct { GatewayID string `json:"gtw_id"` } `json:"gateways"` } `json:"metadata"` }
TTNRequest is a request structure of TTN integration module