Documentation
¶
Index ¶
Constants ¶
const ( BluetoothAdd string = "Add" BluetoothSubtract string = "Subtract" BluetoothMultiply string = "Multiply" BluetoothDivide string = "Divide" )
Bluetooth Protocol Operation type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataMap ¶
DataMap structure contains a mapping between the value that arrives from the platform (expected value) and the byte value to be written into the device
type DataRead ¶
type DataRead struct {
Actions []ReadAction `yaml:"actions"`
}
dataRead structure contains configuration information specific to data-read
type DataWrite ¶
type DataWrite struct {
Attributes []WriteAttribute `yaml:"attributes"`
}
dataWrite structure contains configuration information specific to data-writes
type ReadAction ¶
type ReadAction struct { ActionName string `yaml:"action-name"` ConversionOperation ReadOperation `yaml:"conversion-operation"` }
ReadAction specifies the name of the action along with the conversion operations to be performed in case of data-read
type ReadOperation ¶
type ReadOperation struct { StartIndex int `yaml:"start-index"` EndIndex int `yaml:"end-index"` ShiftLeft uint `yaml:"shift-left"` ShiftRight uint `yaml:"shift-right"` Multiply float64 `yaml:"multiply"` Divide float64 `yaml:"divide"` Add float64 `yaml:"add"` Subtract float64 `yaml:"subtract"` OrderOfExecution []string `yaml:"order-of-execution"` }
ReadOperation specifies how to convert the data received from the device into meaningful data
func (*ReadOperation) ConvertReadData ¶
func (operation *ReadOperation) ConvertReadData(data []byte) float64
ConvertReadData is the function responsible to convert the data read from the device into meaningful data
type WriteAttribute ¶
type WriteAttribute struct { Name string `yaml:"name"` Operations map[string]DataMap `yaml:"operations"` }
WriteAttribute structure contains the name of the attribute as well as a data-map of values to be written