Documentation
¶
Overview ¶
plug 接口定义
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler interface {
Start() // 启动, 加载iot设备
Stop() // 停止iot设备
OnData(string, []byte) // 数据回调 参数1为资源名称, 参数2为接收到的数据
ExecStateChange(state string, value string) // 执行状态变迁
}
IOT 设备输入输出处理模块
type IotDevice ¶
type IotDevice interface {
GetAllResource() map[string]Resource // 获取模型中所有的资源表
GetResource(id string) Resource // 获取指定的资源
StartWork(state string, value string) // 开始状态变迁
StopWork(state string, value string) // 结束状态变迁
UpdateState(state string, value string) // 直接更新状态
GetProperity(prop string) interface{} // 获取自定义属性
GetIotState(state string) (string, bool)
GetSysInfo() []byte // 获取运行设备的基本信息
}
IOT 设备对象
Click to show internal directories.
Click to hide internal directories.