node

package
v0.5.5 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

Functions

func New

func New() plugins.Plugable

New ...

func NewAttr

func NewAttr() m.Attributes

NewAttr ...

func NewSettings

func NewSettings() m.Attributes

NewSettings ...

func NewStates

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

NewStates ...

Types

type Actor

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

Actor ...

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)

NewActor ...

func (*Actor) Spawn

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

Spawn ...

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"`
}

MessageStatus ...

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