node

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2021 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name            = "node"
	EntityNode      = common.EntityType("node")
	TopicPluginNode = "plugin.node"
)
View Source
const (
	AttrThread    = "thread"
	AttrRps       = "rps"
	AttrMin       = "min"
	AttrMax       = "max"
	AttrStartedAt = "started_at"
	AttrNodeLogin = "node_login"
	AttrNodePass  = "node_pass"
)

Variables

This section is empty.

Functions

func New

func New() plugins.Plugable

func NewAttr

func NewAttr() m.Attributes

func NewSettings

func NewSettings() m.Attributes

func NewStates

func NewStates() (states map[string]entity_manager.ActorState)

Types

type Actor

type Actor struct {
	entity_manager.BaseActor
	// contains filtered or unexported fields
}

func NewActor

func NewActor(entity *m.Entity,
	entityManager entity_manager.EntityManager,
	adaptors *adaptors.Adaptors,
	scriptService scripts.ScriptService,
	eventBus event_bus.EventBus,
	mqttClient mqtt.MqttCli) (actor *Actor)

func (*Actor) Spawn

func (e *Actor) Spawn() entity_manager.PluginActor

type DeviceType

type DeviceType string

DeviceType ...

type MessageRequest

type MessageRequest struct {
	EntityId   common.EntityId `json:"entity_id"`
	DeviceType DeviceType      `json:"device_type"`
	Properties json.RawMessage `json:"properties"`
	Command    json.RawMessage `json:"command"`
}

MessageRequest ...

type MessageResponse

type MessageResponse struct {
	EntityId   common.EntityId `json:"entity_id"`
	DeviceType DeviceType      `json:"device_type"`
	Properties json.RawMessage `json:"properties"`
	Response   json.RawMessage `json:"response"`
	Status     string          `json:"status"`
}

MessageResponse ...

type MessageStatus

type MessageStatus struct {
	Status    string    `json:"status"`
	Thread    int       `json:"thread"`
	Rps       int64     `json:"rps"`
	Min       int64     `json:"min"`
	Max       int64     `json:"max"`
	StartedAt time.Time `json:"started_at"`
}

type MqttMessage

type MqttMessage struct {
	Dup      bool
	Qos      uint8
	Retained bool
	Topic    string
	PacketID uint16
	Payload  []byte
}

MqttMessage ...

Jump to

Keyboard shortcuts

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