Documentation
¶
Index ¶
Constants ¶
View Source
const ( Enabled = StatusType("enabled") Disabled = StatusType("disabled") )
View Source
const ( DevTypeModBusRtu = DeviceType("modbus_rtu") DevTypeModBusTcp = DeviceType("modbus_tcp") DevTypeDefault = DeviceType("default") DevTypeCommand = DeviceType("command") )
View Source
const ( ThreadOk = ThreadState("ok") ThreadBusy = ThreadState("busy") ThreadDevNotFound = ThreadState("port by device not found") ThreadNotFound = ThreadState("port not found") ThreadAllBusy = ThreadState("all ports busy") )
View Source
const ( StatusEnabled = ClientStatus("enabled") StatusDisabled = ClientStatus("disabled") StatusError = ClientStatus("error") StatusBusy = ClientStatus("busy") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ClientStatus ¶
type ClientStatus string
type ClientStatusModel ¶
type DeviceType ¶
type DeviceType string
type MessageRequest ¶
type MessageRequest struct {
EntityId string `json:"entity_id"`
DeviceType DeviceType `json:"device_type"`
Properties json.RawMessage `json:"properties" valid:"Required"`
Command json.RawMessage `json:"command"`
}
type MessageResponse ¶
type MessageResponse struct {
EntityId string `json:"entity_id"`
DeviceType DeviceType `json:"device_type"`
Properties json.RawMessage `json:"properties"`
Response json.RawMessage `json:"response"`
Status string `json:"status"`
}
type StatusType ¶
type StatusType string
type ThreadCaller ¶
type ThreadCaller interface {
Exec(t Thread) (resp *MessageResponse, err error)
Send(entityId string, data interface{})
EntityId() string
}
type ThreadState ¶
type ThreadState string
Click to show internal directories.
Click to hide internal directories.