deviceshifumqtt

package
v0.38.0 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultUpdateIntervalInMS int64 = 3000
)

Str and default value

Variables

View Source
var (
	MQTTTopic string
)

Functions

func ConfigFiniteStateMachine added in v0.10.0

func ConfigFiniteStateMachine(minsts map[string]string)

func MutexProcess added in v0.10.0

func MutexProcess(topic string, message string)

Types

type DeviceCommandHandlerMQTT

type DeviceCommandHandlerMQTT struct {
	// client                         *rest.RESTClient
	HandlerMetaData *HandlerMetaData
}

DeviceCommandHandlerMQTT handler for Mqtt

type DeviceShifu

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

DeviceShifu implemented from deviceshifuBase

func New

func New(deviceShifuMetadata *deviceshifubase.DeviceShifuMetaData) (*DeviceShifu, error)

New new MQTT Deviceshifu

func (*DeviceShifu) Start

func (ds *DeviceShifu) Start(stopCh <-chan struct{}) error

Start start Mqtt Telemetry

func (*DeviceShifu) Stop

func (ds *DeviceShifu) Stop() error

Stop Stop Http Server

type HandlerMetaData

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

HandlerMetaData MetaData for EdgeDevice Setting

type MQTTInstruction added in v0.8.0

type MQTTInstruction struct {
	MQTTProtocolProperty *MQTTProtocolProperty
}

MQTTInstruction MQTT Instruction

type MQTTInstructions added in v0.8.0

type MQTTInstructions struct {
	Instructions map[string]*MQTTInstruction
}

MQTTInstructions MQTT Instructions

func CreateMQTTInstructions added in v0.8.0

func CreateMQTTInstructions(dsInstructions *deviceshifubase.DeviceShifuInstructions) *MQTTInstructions

CreateMQTTInstructions Create MQTT Instructions

type MQTTProtocolProperty added in v0.8.0

type MQTTProtocolProperty struct {
	MQTTTopic string
}

MQTTProtocolProperty MQTT Instruction's Property

type RequestBody added in v0.6.0

type RequestBody string

RequestBody Body of mqtt's request by POST method

type ReturnBody

type ReturnBody struct {
	MQTTMessage   string `json:"mqtt_message"`
	MQTTTimestamp string `json:"mqtt_receive_timestamp"`
}

ReturnBody Body of mqtt's reply

Jump to

Keyboard shortcuts

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