Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CodecMaxExecTime = 10 * time.Millisecond
CodecMaxExecTime holds the max. time the (custom) codec is allowed to run.
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 CustomJS ¶
type CustomJS struct { Data interface{} // contains filtered or unexported fields }
CustomJS is a scriptable JS codec.
func NewCustomJS ¶
NewCustomJS creates a new custom JS codec.
func (*CustomJS) DecodeBytes ¶
DecodeBytes decodes the payload from a slice of bytes.
func (CustomJS) EncodeToBytes ¶
EncodeToBytes encodes the payload to a slice of bytes.
func (CustomJS) MarshalJSON ¶
MarshalJSON implements json.Marshaler.
func (*CustomJS) UnmarshalJSON ¶
UnmarshalJSON implement json.Unmarshaler.
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.