Documentation ¶
Index ¶
- Variables
- func LoadDt()
- func NewAISDeviceMaster(e typex.RuleX) typex.XDevice
- func NewCustomProtocolDevice(e typex.RuleX) typex.XDevice
- func NewGenericBacnetIpDevice(e typex.RuleX) typex.XDevice
- func NewGenericHttpDevice(e typex.RuleX) typex.XDevice
- func NewGenericModbusDevice(e typex.RuleX) typex.XDevice
- func NewGenericOpcuaDevice(e typex.RuleX) typex.XDevice
- func NewGenericSnmpDevice(e typex.RuleX) typex.XDevice
- func NewGenericUartDevice(e typex.RuleX) typex.XDevice
- func NewIRDevice(e typex.RuleX) typex.XDevice
- func NewIcmpSender(e typex.RuleX) typex.XDevice
- func NewSIEMENS_PLC(e typex.RuleX) typex.XDevice
- func NewVideoCamera(e typex.RuleX) typex.XDevice
- func NewWSStdInOut() wsInOut
- func ParseADDR_I(s string) string
- func ParseADDR_Q(s string) string
- func ParseDB_D(s string) string
- func ParseDB_X(s string) string
- type AISDeviceMaster
- func (aism *AISDeviceMaster) Details() *typex.Device
- func (aism *AISDeviceMaster) Driver() typex.XExternalDriver
- func (aism *AISDeviceMaster) Init(devId string, configMap map[string]interface{}) error
- func (aism *AISDeviceMaster) OnCtrl(cmd []byte, args []byte) ([]byte, error)
- func (aism *AISDeviceMaster) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
- func (aism *AISDeviceMaster) OnRead(cmd []byte, data []byte) (int, error)
- func (aism *AISDeviceMaster) OnWrite(cmd []byte, _ []byte) (int, error)
- func (aism *AISDeviceMaster) Property() []typex.DeviceProperty
- func (aism *AISDeviceMaster) SetState(status typex.DeviceState)
- func (aism *AISDeviceMaster) Start(cctx typex.CCTX) error
- func (aism *AISDeviceMaster) Status() typex.DeviceState
- func (aism *AISDeviceMaster) Stop()
- type AddressInfo
- type AuthType
- type BacnetIpConfig
- type BaseSentence
- type CustomProtocolDevice
- func (mdev *CustomProtocolDevice) Details() *typex.Device
- func (mdev *CustomProtocolDevice) Driver() typex.XExternalDriver
- func (mdev *CustomProtocolDevice) Init(devId string, configMap map[string]interface{}) error
- func (mdev *CustomProtocolDevice) OnCtrl(cmd []byte, _ []byte) ([]byte, error)
- func (mdev *CustomProtocolDevice) OnDCACall(_ string, Command string, Args interface{}) typex.DCAResult
- func (mdev *CustomProtocolDevice) OnRead(cmd []byte, data []byte) (int, error)
- func (mdev *CustomProtocolDevice) OnWrite(cmd []byte, data []byte) (int, error)
- func (mdev *CustomProtocolDevice) Property() []typex.DeviceProperty
- func (mdev *CustomProtocolDevice) SetState(status typex.DeviceState)
- func (mdev *CustomProtocolDevice) Start(cctx typex.CCTX) error
- func (mdev *CustomProtocolDevice) Status() typex.DeviceState
- func (mdev *CustomProtocolDevice) Stop()
- type Date
- type GNS
- type GenericBacnetIpDevice
- func (dev *GenericBacnetIpDevice) Details() *typex.Device
- func (dev *GenericBacnetIpDevice) Driver() typex.XExternalDriver
- func (dev *GenericBacnetIpDevice) Init(devId string, configMap map[string]interface{}) error
- func (dev *GenericBacnetIpDevice) OnCtrl(cmd []byte, args []byte) ([]byte, error)
- func (dev *GenericBacnetIpDevice) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
- func (dev *GenericBacnetIpDevice) OnRead(cmd []byte, data []byte) (int, error)
- func (dev *GenericBacnetIpDevice) OnWrite(cmd []byte, data []byte) (int, error)
- func (dev *GenericBacnetIpDevice) Property() []typex.DeviceProperty
- func (dev *GenericBacnetIpDevice) SetState(state typex.DeviceState)
- func (dev *GenericBacnetIpDevice) Start(cctx typex.CCTX) error
- func (dev *GenericBacnetIpDevice) Status() typex.DeviceState
- func (dev *GenericBacnetIpDevice) Stop()
- type GenericHttpDevice
- func (hd *GenericHttpDevice) Details() *typex.Device
- func (hd *GenericHttpDevice) Driver() typex.XExternalDriver
- func (hd *GenericHttpDevice) Init(devId string, configMap map[string]interface{}) error
- func (hd *GenericHttpDevice) OnCtrl(cmd []byte, args []byte) ([]byte, error)
- func (hd *GenericHttpDevice) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
- func (hd *GenericHttpDevice) OnRead(cmd []byte, data []byte) (int, error)
- func (hd *GenericHttpDevice) OnWrite(cmd []byte, b []byte) (int, error)
- func (hd *GenericHttpDevice) Property() []typex.DeviceProperty
- func (hd *GenericHttpDevice) SetState(status typex.DeviceState)
- func (hd *GenericHttpDevice) Start(cctx typex.CCTX) error
- func (hd *GenericHttpDevice) Status() typex.DeviceState
- func (hd *GenericHttpDevice) Stop()
- type IR
- func (ird *IR) Details() *typex.Device
- func (ird *IR) Driver() typex.XExternalDriver
- func (ird *IR) Init(devId string, configMap map[string]interface{}) error
- func (ird *IR) OnCtrl(cmd []byte, args []byte) ([]byte, error)
- func (ird *IR) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
- func (ird *IR) OnRead(cmd []byte, data []byte) (int, error)
- func (ird *IR) OnWrite(cmd []byte, b []byte) (int, error)
- func (ird *IR) Property() []typex.DeviceProperty
- func (ird *IR) SetState(status typex.DeviceState)
- func (ird *IR) Start(cctx typex.CCTX) error
- func (ird *IR) Status() typex.DeviceState
- func (ird *IR) Stop()
- type IcmpSender
- func (sender *IcmpSender) Details() *typex.Device
- func (sender *IcmpSender) Driver() typex.XExternalDriver
- func (sender *IcmpSender) Init(devId string, configMap map[string]interface{}) error
- func (sender *IcmpSender) OnCtrl(cmd []byte, args []byte) ([]byte, error)
- func (sender *IcmpSender) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
- func (sender *IcmpSender) OnRead(cmd []byte, data []byte) (int, error)
- func (sender *IcmpSender) OnWrite(cmd []byte, _ []byte) (int, error)
- func (sender *IcmpSender) Property() []typex.DeviceProperty
- func (sender *IcmpSender) SetState(status typex.DeviceState)
- func (sender *IcmpSender) Start(cctx typex.CCTX) error
- func (sender *IcmpSender) Status() typex.DeviceState
- func (sender *IcmpSender) Stop()
- type ModbusPoint
- type OpcuaNode
- type PolicyFlag
- type RMC
- type S1200CommonConfig
- type S1200Config
- type SIEMENS_PLC
- func (s1200 *SIEMENS_PLC) Details() *typex.Device
- func (s1200 *SIEMENS_PLC) Driver() typex.XExternalDriver
- func (s1200 *SIEMENS_PLC) Init(devId string, configMap map[string]interface{}) error
- func (s1200 *SIEMENS_PLC) OnCtrl(cmd []byte, args []byte) ([]byte, error)
- func (s1200 *SIEMENS_PLC) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
- func (s1200 *SIEMENS_PLC) OnRead(cmd []byte, data []byte) (int, error)
- func (s1200 *SIEMENS_PLC) OnWrite(cmd []byte, data []byte) (int, error)
- func (s1200 *SIEMENS_PLC) Property() []typex.DeviceProperty
- func (s1200 *SIEMENS_PLC) Read(cmd []byte, data []byte) (int, error)
- func (s1200 *SIEMENS_PLC) SetState(status typex.DeviceState)
- func (s1200 *SIEMENS_PLC) Start(cctx typex.CCTX) error
- func (s1200 *SIEMENS_PLC) Status() typex.DeviceState
- func (s1200 *SIEMENS_PLC) Stop()
- func (s1200 *SIEMENS_PLC) Write(cmd []byte, data []byte) (int, error)
- type SecurityMode
- type SiemensDataPoint
- type TagBlock
- type Time
- type VDMVDO
Constants ¶
This section is empty.
Variables ¶
View Source
var DM typex.DeviceRegistry
Functions ¶
func NewAISDeviceMaster ¶ added in v0.6.3
* * AIS 数据解析服务器 *
func NewGenericBacnetIpDevice ¶ added in v0.6.1
func NewGenericHttpDevice ¶ added in v0.6.5
* * 通用串口透传 *
func NewSIEMENS_PLC ¶ added in v0.6.5
* * 西门子 S1200 系列 PLC *
func NewWSStdInOut ¶ added in v0.6.4
func NewWSStdInOut() wsInOut
Types ¶
type AISDeviceMaster ¶ added in v0.6.3
type AISDeviceMaster struct { typex.XStatus RuleEngine typex.RuleX // session DevicesSessionMap map[string]*__AISDeviceSession // contains filtered or unexported fields }
func (*AISDeviceMaster) Details ¶ added in v0.6.3
func (aism *AISDeviceMaster) Details() *typex.Device
真实设备
func (*AISDeviceMaster) Driver ¶ added in v0.6.3
func (aism *AISDeviceMaster) Driver() typex.XExternalDriver
驱动
func (*AISDeviceMaster) Init ¶ added in v0.6.3
func (aism *AISDeviceMaster) Init(devId string, configMap map[string]interface{}) error
初始化
func (*AISDeviceMaster) OnCtrl ¶ added in v0.6.3
func (aism *AISDeviceMaster) OnCtrl(cmd []byte, args []byte) ([]byte, error)
* * OnCtrl 接口可以用来向外广播数据 *
func (*AISDeviceMaster) OnDCACall ¶ added in v0.6.3
func (aism *AISDeviceMaster) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
func (*AISDeviceMaster) OnRead ¶ added in v0.6.3
func (aism *AISDeviceMaster) OnRead(cmd []byte, data []byte) (int, error)
从设备里面读数据出来
func (*AISDeviceMaster) OnWrite ¶ added in v0.6.3
func (aism *AISDeviceMaster) OnWrite(cmd []byte, _ []byte) (int, error)
把数据写入设备
func (*AISDeviceMaster) Property ¶ added in v0.6.3
func (aism *AISDeviceMaster) Property() []typex.DeviceProperty
设备属性,是一系列属性描述
func (*AISDeviceMaster) SetState ¶ added in v0.6.3
func (aism *AISDeviceMaster) SetState(status typex.DeviceState)
状态
func (*AISDeviceMaster) Start ¶ added in v0.6.3
func (aism *AISDeviceMaster) Start(cctx typex.CCTX) error
启动
func (*AISDeviceMaster) Status ¶ added in v0.6.3
func (aism *AISDeviceMaster) Status() typex.DeviceState
设备当前状态
type AddressInfo ¶ added in v0.6.5
type AddressInfo struct { DataBlockNumber int // 数据块号 DataType string // 数据类型 ElementNumber int // 元素号 }
AddressInfo 包含解析后的地址信息
type BacnetIpConfig ¶ added in v0.6.1
type BacnetIpConfig struct { CommonConfig bacnetIpCommonConfig `json:"commonConfig"` NodeConfig []bacnetIpNodeConfig `json:"nodeConfig"` }
type BaseSentence ¶ added in v0.6.4
type BaseSentence struct { Talker string `json:"talker"` // The talker id (e.g GP) Type string `json:"type"` // The data type (e.g GSA) }
func (BaseSentence) DataType ¶ added in v0.6.4
func (s BaseSentence) DataType() string
DataType returns the type of the message
func (BaseSentence) Prefix ¶ added in v0.6.4
func (s BaseSentence) Prefix() string
Prefix returns the talker and type of message
func (BaseSentence) TalkerID ¶ added in v0.6.4
func (s BaseSentence) TalkerID() string
TalkerID returns the talker of the message
type CustomProtocolDevice ¶
type CustomProtocolDevice struct { typex.XStatus RuleEngine typex.RuleX // contains filtered or unexported fields }
func (*CustomProtocolDevice) Details ¶
func (mdev *CustomProtocolDevice) Details() *typex.Device
真实设备
func (*CustomProtocolDevice) Driver ¶
func (mdev *CustomProtocolDevice) Driver() typex.XExternalDriver
驱动
func (*CustomProtocolDevice) Init ¶
func (mdev *CustomProtocolDevice) Init(devId string, configMap map[string]interface{}) error
初始化
func (*CustomProtocolDevice) OnCtrl ¶
func (mdev *CustomProtocolDevice) OnCtrl(cmd []byte, _ []byte) ([]byte, error)
* * 外部指令交互, 常用来实现自定义协议等 *
func (*CustomProtocolDevice) OnDCACall ¶
func (mdev *CustomProtocolDevice) OnDCACall(_ string, Command string, Args interface{}) typex.DCAResult
* * 设备服务调用 *
func (*CustomProtocolDevice) OnRead ¶
func (mdev *CustomProtocolDevice) OnRead(cmd []byte, data []byte) (int, error)
* * 数据读出来,对数据结构有要求, 其中Key必须是个数字或者数字字符串, 例如 1 or "1" *
func (*CustomProtocolDevice) OnWrite ¶
func (mdev *CustomProtocolDevice) OnWrite(cmd []byte, data []byte) (int, error)
把数据写入设备
func (*CustomProtocolDevice) Property ¶
func (mdev *CustomProtocolDevice) Property() []typex.DeviceProperty
设备属性,是一系列属性描述
func (*CustomProtocolDevice) SetState ¶
func (mdev *CustomProtocolDevice) SetState(status typex.DeviceState)
状态
func (*CustomProtocolDevice) Start ¶
func (mdev *CustomProtocolDevice) Start(cctx typex.CCTX) error
启动
func (*CustomProtocolDevice) Status ¶
func (mdev *CustomProtocolDevice) Status() typex.DeviceState
设备当前状态
type Date ¶ added in v0.6.4
type Date struct { Valid bool `json:"valid"` DD int `json:"dd"` MM int `json:"mm"` YY int `json:"yy"` }
Date type
type GNS ¶ added in v0.6.4
type GNS struct { BaseSentence Time Time // UTC of position Latitude float64 Longitude float64 // FAA mode indicator for each satellite navigation system (constellation) supported by device. // // May be up to six characters (according to GPSD). // '1' - GPS // '2' - GLONASS // '3' - Galileo // '4' - BDS // '5' - QZSS // '6' - NavIC (IRNSS) Mode []string SVs int64 // Total number of satellites in use, 00-99 HDOP float64 // Horizontal Dilution of Precision Altitude float64 // Antenna altitude, meters, re:mean-sea-level(geoid). Separation float64 // Geoidal separation meters Age float64 // Age of differential data Station int64 // Differential reference station ID }
type GenericBacnetIpDevice ¶ added in v0.6.1
type GenericBacnetIpDevice struct { typex.XStatus RuleEngine typex.RuleX // contains filtered or unexported fields }
func (*GenericBacnetIpDevice) Details ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Details() *typex.Device
func (*GenericBacnetIpDevice) Driver ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Driver() typex.XExternalDriver
func (*GenericBacnetIpDevice) Init ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Init(devId string, configMap map[string]interface{}) error
func (*GenericBacnetIpDevice) OnCtrl ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) OnCtrl(cmd []byte, args []byte) ([]byte, error)
func (*GenericBacnetIpDevice) OnDCACall ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
func (*GenericBacnetIpDevice) OnRead ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) OnRead(cmd []byte, data []byte) (int, error)
func (*GenericBacnetIpDevice) OnWrite ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) OnWrite(cmd []byte, data []byte) (int, error)
func (*GenericBacnetIpDevice) Property ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Property() []typex.DeviceProperty
func (*GenericBacnetIpDevice) SetState ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) SetState(state typex.DeviceState)
func (*GenericBacnetIpDevice) Start ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Start(cctx typex.CCTX) error
func (*GenericBacnetIpDevice) Status ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Status() typex.DeviceState
func (*GenericBacnetIpDevice) Stop ¶ added in v0.6.1
func (dev *GenericBacnetIpDevice) Stop()
type GenericHttpDevice ¶ added in v0.6.5
type GenericHttpDevice struct { typex.XStatus RuleEngine typex.RuleX // contains filtered or unexported fields }
func (*GenericHttpDevice) Details ¶ added in v0.6.5
func (hd *GenericHttpDevice) Details() *typex.Device
真实设备
func (*GenericHttpDevice) Driver ¶ added in v0.6.5
func (hd *GenericHttpDevice) Driver() typex.XExternalDriver
驱动
func (*GenericHttpDevice) Init ¶ added in v0.6.5
func (hd *GenericHttpDevice) Init(devId string, configMap map[string]interface{}) error
初始化
func (*GenericHttpDevice) OnCtrl ¶ added in v0.6.5
func (hd *GenericHttpDevice) OnCtrl(cmd []byte, args []byte) ([]byte, error)
func (*GenericHttpDevice) OnDCACall ¶ added in v0.6.5
func (hd *GenericHttpDevice) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
func (*GenericHttpDevice) OnRead ¶ added in v0.6.5
func (hd *GenericHttpDevice) OnRead(cmd []byte, data []byte) (int, error)
func (*GenericHttpDevice) OnWrite ¶ added in v0.6.5
func (hd *GenericHttpDevice) OnWrite(cmd []byte, b []byte) (int, error)
把数据写入设备
func (*GenericHttpDevice) Property ¶ added in v0.6.5
func (hd *GenericHttpDevice) Property() []typex.DeviceProperty
设备属性,是一系列属性描述
func (*GenericHttpDevice) SetState ¶ added in v0.6.5
func (hd *GenericHttpDevice) SetState(status typex.DeviceState)
状态
func (*GenericHttpDevice) Start ¶ added in v0.6.5
func (hd *GenericHttpDevice) Start(cctx typex.CCTX) error
启动
func (*GenericHttpDevice) Status ¶ added in v0.6.5
func (hd *GenericHttpDevice) Status() typex.DeviceState
设备当前状态
type IR ¶ added in v0.6.3
type IR struct { typex.XStatus // irFd syscall.Handle windows RuleEngine typex.RuleX // contains filtered or unexported fields }
func (*IR) Property ¶ added in v0.6.3
func (ird *IR) Property() []typex.DeviceProperty
设备属性,是一系列属性描述
type IcmpSender ¶
type IcmpSender struct { typex.XStatus RuleEngine typex.RuleX // contains filtered or unexported fields }
func (*IcmpSender) Init ¶
func (sender *IcmpSender) Init(devId string, configMap map[string]interface{}) error
初始化
func (*IcmpSender) OnCtrl ¶
func (sender *IcmpSender) OnCtrl(cmd []byte, args []byte) ([]byte, error)
func (*IcmpSender) OnDCACall ¶
func (sender *IcmpSender) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
func (*IcmpSender) OnRead ¶
func (sender *IcmpSender) OnRead(cmd []byte, data []byte) (int, error)
从设备里面读数据出来
func (*IcmpSender) OnWrite ¶
func (sender *IcmpSender) OnWrite(cmd []byte, _ []byte) (int, error)
把数据写入设备
func (*IcmpSender) Property ¶
func (sender *IcmpSender) Property() []typex.DeviceProperty
设备属性,是一系列属性描述
type ModbusPoint ¶ added in v0.6.5
type ModbusPoint struct { UUID string `json:"uuid,omitempty"` // 当UUID为空时新建 Tag string `json:"tag"` Alias string `json:"alias"` Function int `json:"function"` SlaverId byte `json:"slaverId"` Address uint16 `json:"address"` Frequency int64 `json:"frequency"` Quantity uint16 `json:"quantity"` Value string `json:"value,omitempty"` }
* * 点位表 *
type OpcuaNode ¶
type OpcuaNode struct { Tag string `json:"tag" validate:"required" title:"数据Tag" info:""` Description string `json:"description" validate:"required"` NodeID string `json:"nodeId" validate:"required" title:"NodeID" example:"ns=1;s=Test"` DataType string `json:"dataType" title:"数据类型" tag:"String" info:""` Value string `json:"value" title:"值" info:"从OPCUA获取的值"` //不需要配置 }
type PolicyFlag ¶
type PolicyFlag string
const ( POLICY_NONE PolicyFlag = "None" POLICY_BASIC128RSA15 PolicyFlag = "Basic128Rsa15" POLICY_BASIC256 PolicyFlag = "Basic256" POLICY_BASIC256SHA256 PolicyFlag = "Basic256Sha256" )
type RMC ¶ added in v0.6.4
type RMC struct { BaseSentence `json:"base"` // base Time Time `json:"time"` // Time Stamp Validity string `json:"validity"` // validity - A-ok, V-invalid Latitude float64 `json:"latitude"` // Latitude Longitude float64 `json:"longitude"` // Longitude Speed float64 `json:"speed"` // Speed in knots Course float64 `json:"course"` // True course Date Date `json:"date"` // Date Variation float64 `json:"variation"` // Magnetic variation FFAMode string `json:"ffa_mode"` // FAA mode indicator (filled in NMEA 2.3 and later) }
type S1200CommonConfig ¶ added in v0.6.5
type S1200CommonConfig struct { Host string `json:"host" validate:"required"` // 127.0.0.1:502 Model string `json:"model" validate:"required"` // s7-200 s7-1500 // https://cloudvpn.beijerelectronics.com/hc/en-us/articles/4406049761169-Siemens-S7 Rack *int `json:"rack" validate:"required"` // 0 Slot *int `json:"slot" validate:"required"` // 1 Timeout *int `json:"timeout" validate:"required"` // 5s IdleTimeout *int `json:"idleTimeout" validate:"required"` // 5s AutoRequest *bool `json:"autoRequest" validate:"required"` // false }
type S1200Config ¶ added in v0.6.5
type S1200Config struct {
CommonConfig S1200CommonConfig `json:"commonConfig" validate:"required"` // 通用配置
}
type SIEMENS_PLC ¶ added in v0.6.5
type SIEMENS_PLC struct { typex.XStatus RuleEngine typex.RuleX SiemensDataPoints map[string]*SiemensDataPoint // contains filtered or unexported fields }
func (*SIEMENS_PLC) Details ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Details() *typex.Device
真实设备
func (*SIEMENS_PLC) Driver ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Driver() typex.XExternalDriver
驱动
func (*SIEMENS_PLC) Init ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Init(devId string, configMap map[string]interface{}) error
初始化
func (*SIEMENS_PLC) OnCtrl ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) OnCtrl(cmd []byte, args []byte) ([]byte, error)
func (*SIEMENS_PLC) OnDCACall ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) OnDCACall(UUID string, Command string, Args interface{}) typex.DCAResult
func (*SIEMENS_PLC) OnRead ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) OnRead(cmd []byte, data []byte) (int, error)
从设备里面读数据出来
func (*SIEMENS_PLC) OnWrite ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) OnWrite(cmd []byte, data []byte) (int, error)
func (*SIEMENS_PLC) Property ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Property() []typex.DeviceProperty
设备属性,是一系列属性描述
func (*SIEMENS_PLC) Read ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Read(cmd []byte, data []byte) (int, error)
func (*SIEMENS_PLC) SetState ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) SetState(status typex.DeviceState)
状态
func (*SIEMENS_PLC) Start ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Start(cctx typex.CCTX) error
启动
func (*SIEMENS_PLC) Status ¶ added in v0.6.5
func (s1200 *SIEMENS_PLC) Status() typex.DeviceState
设备当前状态
type SecurityMode ¶
type SecurityMode string
const ( MODE_NONE SecurityMode = "None" MODE_SIGN SecurityMode = "Sign" MODE_SIGN_AND_ENCRYPT SecurityMode = "SignAndEncrypt" )
type SiemensDataPoint ¶ added in v0.6.5
type SiemensDataPoint struct { UUID string `json:"uuid"` // 当UUID为空时新建 DeviceUuid string `json:"device_uuid"` Tag string `json:"tag,omitempty"` Type string `json:"type,omitempty"` Frequency *int64 `json:"frequency,omitempty"` Address *int `json:"address,omitempty"` Start *int `json:"start"` Size *int `json:"size"` Value string `json:"value"` }
点位表
type TagBlock ¶ added in v0.6.4
type TagBlock struct { Time int64 `json:"time"` // TypeUnixTime unix timestamp (unit is likely to be s, but might be ms, YMMV), parameter: -c RelativeTime int64 `json:"relative_time"` // TypeRelativeTime relative time, parameter: -r Destination string `json:"destination"` // TypeDestinationID destination identification 15 char max, parameter: -d Grouping string `json:"grouping"` // TypeGrouping sentence grouping, parameter: -g LineCount int64 `json:"line_count"` // TypeLineCount line count, parameter: -n Source string `json:"source"` // TypeSourceID source identification 15 char max, parameter: -s Text string `json:"text"` // TypeTextString valid character string, parameter -t }
type Time ¶ added in v0.6.4
type VDMVDO ¶ added in v0.6.4
type VDMVDO struct { BaseSentence `json:"base"` NumFragments int64 `json:"numFragments"` FragmentNumber int64 `json:"fragmentNumber"` MessageID int64 `json:"messageId"` Channel string `json:"channel"` Payload []byte `json:"-"` MessageContent aislib.Packet `json:"messageContent"` }
* * AIS消息结构体 *
func (VDMVDO) PayloadInfo ¶ added in v0.6.4
Source Files ¶
- custom_protocol_device.go
- generic_ais_txrx_device.go
- generic_bacnetip_device.go
- generic_camera_stream.go
- generic_http_device.go
- generic_modbus_device.go
- generic_opcua_device.go
- generic_snmp_device.go
- generic_uart_device.go
- network_icmp_sender.go
- rhinopi_ir_control_device_linux.go
- s1200plc_device.go
- type_loader.go
Click to show internal directories.
Click to hide internal directories.