integrations

package
v0.0.0-...-475e089 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2017 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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) Close

func (i *InitialState) Close() error

Close the connection

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

Jump to

Keyboard shortcuts

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