Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Drivers = make(map[string]*glua.LState)
Functions ¶
Types ¶
type DeviceDecodeRequest ¶
type DeviceDecodeRequest struct {
DeviceId string `json:"id"` // 设备ID
Points []plugin.PointData `json:"points"`
}
设备驱动解码请求
type DeviceDecodeResult ¶
type DeviceDecodeResult struct {
//解码结果
Points []plugin.PointData `json:"points"`
//解码错误信息
Error error `json:"error"`
}
设备驱动解码结果
func DeviceDecode ¶
func DeviceDecode(driverKey string, req DeviceDecodeRequest) *DeviceDecodeResult
设备上行数据解码,该接口主要功能如下: 1. 对读到的数据进行点位值加工 2. 将读到的点位值,同步到本设备的另外一个点位上
type DeviceEncodeRequest ¶
type DeviceEncodeRequest struct {
DeviceId string // 设备ID
Mode plugin.EncodeMode
Points []plugin.PointData
}
设备驱动编码请求
type DeviceEncodeResult ¶
设备驱动编码结果
func DeviceEncode ¶
func DeviceEncode(driverKey string, req DeviceEncodeRequest) *DeviceEncodeResult
设备下行指令编码,该接口试下如下功能: 1. 写操作时,对点位值进行加工 2. 针对点位A发起的读写操作,通过编码可变更为点位B 3. 对单点位发起的读写请求,通过编码可扩展为多点位。例如:执行空开的开关操作,会先触发解锁,再执行开关行为。
Click to show internal directories.
Click to hide internal directories.