28 lines
684 B
Go
28 lines
684 B
Go
|
package sysEvent
|
||
|
|
||
|
import "joylink.club/ecs"
|
||
|
|
||
|
//继电器动作事件
|
||
|
//由继电器实体系统产生,表示继电器吸合落下动作
|
||
|
type RelayActionEvent struct {
|
||
|
//继电器id
|
||
|
Id string
|
||
|
//true -吸合
|
||
|
Xh bool
|
||
|
}
|
||
|
|
||
|
//继电器状态须改变事件
|
||
|
//由电路系统运算发现某个继电器需要改变,则由电路系统产生该事件来通知对应继电器产生对应动作
|
||
|
type RelayNeedChangeEvent struct {
|
||
|
//继电器id
|
||
|
Id string
|
||
|
//true -吸合
|
||
|
Xh bool
|
||
|
}
|
||
|
|
||
|
//继电器动作事件总线
|
||
|
var RelayActionEventBus = ecs.NewEventType[RelayActionEvent]()
|
||
|
|
||
|
//继电器状态须改变事件总线
|
||
|
var RelayNeedChangeEventBus = ecs.NewEventType[RelayNeedChangeEvent]()
|