Documentation ¶
Index ¶
- type GenericMQTT
- func (i *GenericMQTT) Close() error
- func (i *GenericMQTT) Connect() (err error)
- func (i *GenericMQTT) ReceiveData(data interface{}) error
- func (i *GenericMQTT) Record() *common.ConnectionRecord
- func (i *GenericMQTT) SendData(data map[string]interface{}) error
- func (i *GenericMQTT) SendState(data *common.SystemState) error
- func (i *GenericMQTT) SetRecord(record common.ConnectionRecord)
- type InitialState
- func (i *InitialState) Close() error
- func (i *InitialState) Connect() (err error)
- func (i *InitialState) ReceiveData(data interface{}) error
- func (i *InitialState) Record() *common.ConnectionRecord
- func (i *InitialState) SendData(data map[string]interface{}) error
- func (i *InitialState) SendState(data *common.SystemState) error
- func (i *InitialState) SetRecord(record common.ConnectionRecord)
- type Integration
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericMQTT ¶
type GenericMQTT struct {
// contains filtered or unexported fields
}
GenericMQTT implements an integration with MQTT brokers
func (*GenericMQTT) Close ¶
func (i *GenericMQTT) Close() error
Close the connection to the MQTT broker
func (*GenericMQTT) Connect ¶
func (i *GenericMQTT) Connect() (err error)
Connect attempts a connection to the GenericMQTT broker
func (*GenericMQTT) ReceiveData ¶
func (i *GenericMQTT) ReceiveData(data interface{}) error
ReceiveData is not implemented
func (*GenericMQTT) Record ¶
func (i *GenericMQTT) Record() *common.ConnectionRecord
Record returns the associated connection information
func (*GenericMQTT) SendData ¶
func (i *GenericMQTT) SendData(data map[string]interface{}) error
SendData transmits telemetry and operations data to the MQTT broker
func (*GenericMQTT) SendState ¶
func (i *GenericMQTT) SendState(data *common.SystemState) error
SendState transmits Device state to the MQTT broker
func (*GenericMQTT) SetRecord ¶
func (i *GenericMQTT) SetRecord(record common.ConnectionRecord)
SetRecord associates the passed connection record
type InitialState ¶
type InitialState struct {
// contains filtered or unexported fields
}
InitialState implements an integration with the InitialState service (initialstate.com)
Bucket keys: -- for Device state: state|<entity>/<location>/<machineId>
The value pairs in this bucket are fixed to memory and disk consumption along with system load status
-- for Device telemetry and ops: ops|<entity>/<location>/<machineId>
The value pairs in this bucket are dependent on the registerName entries for each field bus entry in the machineIntegration section of the equipment configuration object.
func (*InitialState) Connect ¶
func (i *InitialState) Connect() (err error)
Connect attempts a connection to the InitialState service Returns an error if the connection experiences a problem
func (*InitialState) ReceiveData ¶
func (i *InitialState) ReceiveData(data interface{}) error
ReceiveData is not implemented
func (*InitialState) Record ¶
func (i *InitialState) Record() *common.ConnectionRecord
Record returns the associated connection information
func (*InitialState) SendData ¶
func (i *InitialState) SendData(data map[string]interface{}) error
SendData transmits telemetry and operations data to the Initial State service
func (*InitialState) SendState ¶
func (i *InitialState) SendState(data *common.SystemState) error
SendState transmits Device state to the Initial State Service
func (*InitialState) SetRecord ¶
func (i *InitialState) SetRecord(record common.ConnectionRecord)
SetRecord sets the passed connection record
type Integration ¶
type Integration interface { SetRecord(common.ConnectionRecord) Record() *common.ConnectionRecord Connect() error Close() error SendState(*common.SystemState) error SendData(map[string]interface{}) error ReceiveData(interface{}) error }
Integration defines an interface for all external integrations with IIoT providers
func CreateIntegration ¶
func CreateIntegration(provider string) Integration
CreateIntegration instantiates a new Integration based on the supplied provider string
func GetDeviceOperationsAndTelemetryIntegrations ¶
func GetDeviceOperationsAndTelemetryIntegrations() []Integration
GetDeviceOperationsAndTelemetryIntegrations loads all defined device operations and telemetry integrations from the 'Connections' configuration object
func GetDeviceStateIntegrations ¶
func GetDeviceStateIntegrations() []Integration
GetDeviceStateIntegrations loads all defined device state integrations from the 'Connections' configuration object