package component import ( "joylink.club/ecs" ) // DoorSensor 门磁 // 具体异常-故障、异常、通信中断 type DoorSensor struct { State DsState //门磁状态 } // DsState 门磁状态 type DsState = uint8 const ( DsOpen DsState = iota //门打开 DsNormallyOpen //门常开 DsForceOpen //门强行打开 DsClosed //门关闭 DsNormallyClose //门常闭 ) var ( DoorSensorType = ecs.NewComponentType[DoorSensor]() //门磁 )