Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Accelerometer ¶
Accelerometer defines the accelerometer data.
type CayenneLPP ¶
type CayenneLPP struct { DigitalInput map[byte]uint8 `json:"digitalInput,omitempty" influxdb:"digital_input"` DigitalOutput map[byte]uint8 `json:"digitalOutput,omitempty" influxdb:"digital_output"` AnalogInput map[byte]float64 `json:"analogInput,omitempty" influxdb:"analog_input"` AnalogOutput map[byte]float64 `json:"analogOutput,omitempty" influxdb:"analog_output"` IlluminanceSensor map[byte]uint16 `json:"illuminanceSensor,omitempty" influxdb:"illuminance_sensor"` PresenceSensor map[byte]uint8 `json:"presenceSensor,omitempty" influxdb:"presence_sensor"` TemperatureSensor map[byte]float64 `json:"temperatureSensor,omitempty" influxdb:"temperature_sensor"` HumiditySensor map[byte]float64 `json:"humiditySensor,omitempty" influxdb:"humidity_sensor"` Accelerometer map[byte]Accelerometer `json:"accelerometer,omitempty" influxdb:"accelerometer"` Barometer map[byte]float64 `json:"barometer,omitempty" influxdb:"barometer"` Gyrometer map[byte]Gyrometer `json:"gyrometer,omitempty" influxdb:"gyrometer"` GPSLocation map[byte]GPSLocation `json:"gpsLocation,omitempty" influxdb:"gps_location"` }
CayenneLPP defines the Cayenne LPP data structure.
func (*CayenneLPP) DecodeBytes ¶
func (c *CayenneLPP) DecodeBytes(data []byte) error
DecodeBytes decodes the payload from a slice of bytes.
func (CayenneLPP) EncodeToBytes ¶
func (c CayenneLPP) EncodeToBytes() ([]byte, error)
EncodeToBytes encodes the payload to a slice of bytes.
func (CayenneLPP) Object ¶
func (c CayenneLPP) Object() interface{}
Object returns the CayenneLPP data object.
type GPSLocation ¶
type GPSLocation struct { Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude float64 `json:"altitude"` }
GPSLocation defines the GPS location data.
Click to show internal directories.
Click to hide internal directories.