devices

package
Version: v0.0.0-...-efdff95 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2018 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TemperaturePeriodHigh   = 0x32  // 500 ms,
	TemperaturePeriodMedium = 0x64  // 1000 ms,
	TemperaturePeriodLow    = 0x128 // 2000 ms,
)

Period =[Input*10]ms,(lowerlimit 300 ms, max 2500ms),default 1000 ms

Variables

This section is empty.

Functions

This section is empty.

Types

type BarometricSensor

type BarometricSensor struct {
	// contains filtered or unexported fields
}

func (*BarometricSensor) Disable

func (s *BarometricSensor) Disable() error

func (*BarometricSensor) Enable

func (s *BarometricSensor) Enable() error

func (BarometricSensor) GetName

func (s BarometricSensor) GetName() string

func (*BarometricSensor) IsEnabled

func (s *BarometricSensor) IsEnabled() (bool, error)

func (*BarometricSensor) IsNotifying

func (s *BarometricSensor) IsNotifying() (bool, error)

func (*BarometricSensor) Read

func (s *BarometricSensor) Read() (float64, error)

func (*BarometricSensor) StartNotify

func (s *BarometricSensor) StartNotify(macAddress string) error

func (*BarometricSensor) StopNotify

func (s *BarometricSensor) StopNotify() error

type HumiditySensor

type HumiditySensor struct {
	// contains filtered or unexported fields
}

func (*HumiditySensor) Disable

func (s *HumiditySensor) Disable() error

func (*HumiditySensor) Enable

func (s *HumiditySensor) Enable() error

func (HumiditySensor) GetName

func (s HumiditySensor) GetName() string

func (*HumiditySensor) IsEnabled

func (s *HumiditySensor) IsEnabled() (bool, error)

func (*HumiditySensor) IsNotifying

func (s *HumiditySensor) IsNotifying() (bool, error)

func (*HumiditySensor) Read

func (s *HumiditySensor) Read() (float64, error)

func (*HumiditySensor) StartNotify

func (s *HumiditySensor) StartNotify(macAddress string) error

func (*HumiditySensor) StopNotify

func (s *HumiditySensor) StopNotify() error

type LuxometerSensor

type LuxometerSensor struct {
	// contains filtered or unexported fields
}

func (*LuxometerSensor) Disable

func (s *LuxometerSensor) Disable() error

func (*LuxometerSensor) Enable

func (s *LuxometerSensor) Enable() error

func (LuxometerSensor) GetName

func (s LuxometerSensor) GetName() string

func (*LuxometerSensor) IsEnabled

func (s *LuxometerSensor) IsEnabled() (bool, error)

func (*LuxometerSensor) IsNotifying

func (s *LuxometerSensor) IsNotifying() (bool, error)

func (*LuxometerSensor) Read

func (s *LuxometerSensor) Read() (float64, error)

func (*LuxometerSensor) StartNotify

func (s *LuxometerSensor) StartNotify(macAddress string) error

func (*LuxometerSensor) StopNotify

func (s *LuxometerSensor) StopNotify() error

type MpuSensor

type MpuSensor struct {
	// contains filtered or unexported fields
}

func (*MpuSensor) Disable

func (s *MpuSensor) Disable() error

func (*MpuSensor) Enable

func (s *MpuSensor) Enable() error

func (MpuSensor) GetName

func (s MpuSensor) GetName() string

func (*MpuSensor) IsEnabled

func (s *MpuSensor) IsEnabled() (bool, error)

func (*MpuSensor) IsNotifying

func (s *MpuSensor) IsNotifying() (bool, error)

func (*MpuSensor) Read

func (s *MpuSensor) Read() (float64, error)

func (*MpuSensor) StartNotify

func (s *MpuSensor) StartNotify(macAddress string) error

func (*MpuSensor) StopNotify

func (s *MpuSensor) StopNotify() error

type Sensor

type Sensor interface {
	GetName() string
	IsEnabled() (bool, error)
	Enable() error
	Disable() error
}

Sensor generic sensor interface

type SensorTag

type SensorTag struct {
	*api.Device
	Temperature TemperatureSensor
	Humidity    HumiditySensor
	Mpu         MpuSensor
	Barometric  BarometricSensor
	Luxometer   LuxometerSensor
	DeviceInfo  SensorTagDeviceInfo
}

SensorTag a SensorTag object representation

func NewSensorTag

func NewSensorTag(d *api.Device) (*SensorTag, error)

type SensorTagDeviceInfo

type SensorTagDeviceInfo struct {
	// contains filtered or unexported fields
}

func (*SensorTagDeviceInfo) Read

func (s *SensorTagDeviceInfo) Read() (api.DataEvent, error)

type TemperatureSensor

type TemperatureSensor struct {
	// contains filtered or unexported fields
}

func (*TemperatureSensor) Disable

func (s *TemperatureSensor) Disable() error

Disable measurements

func (*TemperatureSensor) Enable

func (s *TemperatureSensor) Enable() error

Enable measurements

func (TemperatureSensor) GetName

func (s TemperatureSensor) GetName() string

GetName return the sensor name

func (*TemperatureSensor) IsEnabled

func (s *TemperatureSensor) IsEnabled() (bool, error)

IsEnabled check if measurements are enabled

func (*TemperatureSensor) IsNotifying

func (s *TemperatureSensor) IsNotifying() (bool, error)

IsNotifying check if notyfing

func (*TemperatureSensor) Read

func (s *TemperatureSensor) Read() (float64, error)

Read value from the sensor

func (*TemperatureSensor) StartNotify

func (s *TemperatureSensor) StartNotify(macAddress string) error

func (*TemperatureSensor) StopNotify

func (s *TemperatureSensor) StopNotify() error

StopNotify disable temperature DataChannel

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL