Documentation
¶
Index ¶
- Constants
- Variables
- func NewInvalidParameterValueError(text string) error
- func NewParameterError(text string) error
- func NewTimeoutError(text string) error
- func NewValueMismatchError(text string) error
- func ParameterValueString(dpt DeviceParameterType, value []byte) (string, error)
- func ParseParameterValue(tpt DeviceParameterType, tval string) ([]byte, error)
- type DeviceParameter
- type DeviceParameterManager
- func (self *DeviceParameterManager) Close() error
- func (self *DeviceParameterManager) GetList() (chan *DeviceParameter, error)
- func (self *DeviceParameterManager) GetValue(name string) (*DeviceParameter, error)
- func (self *DeviceParameterManager) SetRetries(retries int)
- func (self *DeviceParameterManager) SetTimeout(timeout time.Duration)
- func (self *DeviceParameterManager) SetValue(name string, value []byte) (*DeviceParameter, error)
- type DeviceParameterType
- type DpErrorParameterId
- type DpErrorParameterSeqnum
- type DpGetParameterId
- type DpGetParameterSeqnum
- type DpHeartbeat
- type DpParameter
- type DpSetParameterId
- type DpSetParameterSeqnum
- type InvalidParameterValueError
- type ParameterError
- type TimeoutError
- type ValueMismatchError
Constants ¶
View Source
const AMID_DEVICE_PARAMETERS = 0x82
View Source
const DP_ERROR_PARAMETER_ID = 0xF0
View Source
const DP_ERROR_PARAMETER_SEQNUM = 0xF1
View Source
const DP_GET_PARAMETER_WITH_ID = 0x21
View Source
const DP_GET_PARAMETER_WITH_SEQNUM = 0x22
View Source
const DP_HEARTBEAT = 0x00
View Source
const DP_PARAMETER = 0x10
View Source
const DP_SET_PARAMETER_WITH_ID = 0x31
View Source
const DP_SET_PARAMETER_WITH_SEQNUM = 0x32
View Source
const TOS_SERIAL_DEVICE_PARAMETERS_ID = 0x80
Variables ¶
View Source
var DeviceParameterStringToType = map[string]DeviceParameterType{}
View Source
var DeviceParameterTypeToString = map[DeviceParameterType]string{ DP_TYPE_RAW: "raw", DP_TYPE_UINT8: "u8", DP_TYPE_UINT16: "u16", DP_TYPE_UINT32: "u32", DP_TYPE_UINT64: "u64", DP_TYPE_STRING: "str", DP_TYPE_INT8: "i8", DP_TYPE_INT16: "i16", DP_TYPE_INT32: "i32", DP_TYPE_INT64: "i64", DP_TYPE_NIL: "nil", }
Functions ¶
func NewParameterError ¶
func NewTimeoutError ¶
func NewValueMismatchError ¶
func ParameterValueString ¶
func ParameterValueString(dpt DeviceParameterType, value []byte) (string, error)
func ParseParameterValue ¶
func ParseParameterValue(tpt DeviceParameterType, tval string) ([]byte, error)
Types ¶
type DeviceParameter ¶
type DeviceParameter struct { Name string Type DeviceParameterType Seqnum uint8 Value []byte Timestamp time.Time Error error }
func (*DeviceParameter) String ¶
func (self *DeviceParameter) String() string
type DeviceParameterManager ¶
type DeviceParameterManager struct { loggers.DIWEloggers // contains filtered or unexported fields }
func NewDeviceParameterActiveMessageManager ¶
func NewDeviceParameterActiveMessageManager(sfc moteconnection.MoteConnection, group moteconnection.AMGroup, address moteconnection.AMAddr, destination moteconnection.AMAddr) *DeviceParameterManager
func NewDeviceParameterManager ¶
func NewDeviceParameterManager(sfc moteconnection.MoteConnection) *DeviceParameterManager
func (*DeviceParameterManager) Close ¶
func (self *DeviceParameterManager) Close() error
func (*DeviceParameterManager) GetList ¶
func (self *DeviceParameterManager) GetList() (chan *DeviceParameter, error)
func (*DeviceParameterManager) GetValue ¶
func (self *DeviceParameterManager) GetValue(name string) (*DeviceParameter, error)
func (*DeviceParameterManager) SetRetries ¶
func (self *DeviceParameterManager) SetRetries(retries int)
func (*DeviceParameterManager) SetTimeout ¶
func (self *DeviceParameterManager) SetTimeout(timeout time.Duration)
func (*DeviceParameterManager) SetValue ¶
func (self *DeviceParameterManager) SetValue(name string, value []byte) (*DeviceParameter, error)
type DeviceParameterType ¶
type DeviceParameterType uint8
const ( DP_TYPE_RAW DeviceParameterType = 0x00 DP_TYPE_UINT8 DeviceParameterType = 0x01 DP_TYPE_UINT16 DeviceParameterType = 0x02 DP_TYPE_UINT32 DeviceParameterType = 0x04 DP_TYPE_UINT64 DeviceParameterType = 0x08 DP_TYPE_STRING DeviceParameterType = 0x80 DP_TYPE_INT8 DeviceParameterType = 0x81 DP_TYPE_INT16 DeviceParameterType = 0x82 DP_TYPE_INT32 DeviceParameterType = 0x84 DP_TYPE_INT64 DeviceParameterType = 0x88 DP_TYPE_NIL DeviceParameterType = 0xFF )
func ParseDeviceParameterType ¶
func ParseDeviceParameterType(name string) (DeviceParameterType, error)
func (DeviceParameterType) String ¶
func (dpt DeviceParameterType) String() string
type DpErrorParameterId ¶
type DpErrorParameterSeqnum ¶
type DpGetParameterId ¶
type DpGetParameterSeqnum ¶
type DpHeartbeat ¶
type DpParameter ¶
type DpSetParameterId ¶
type DpSetParameterSeqnum ¶
type InvalidParameterValueError ¶
type InvalidParameterValueError struct {
// contains filtered or unexported fields
}
func (InvalidParameterValueError) Error ¶
func (self InvalidParameterValueError) Error() string
type ParameterError ¶
type ParameterError struct {
// contains filtered or unexported fields
}
func (ParameterError) Error ¶
func (self ParameterError) Error() string
type TimeoutError ¶
type TimeoutError struct {
// contains filtered or unexported fields
}
func (TimeoutError) Error ¶
func (self TimeoutError) Error() string
type ValueMismatchError ¶
type ValueMismatchError struct {
// contains filtered or unexported fields
}
func (ValueMismatchError) Error ¶
func (self ValueMismatchError) Error() string
Click to show internal directories.
Click to hide internal directories.