2023-12-15 16:42:45 +08:00
|
|
|
package component
|
|
|
|
|
|
|
|
import (
|
|
|
|
"joylink.club/ecs"
|
|
|
|
)
|
|
|
|
|
|
|
|
// AfcGate AFC闸机
|
2023-12-19 11:11:27 +08:00
|
|
|
// 具体异常-故障、异常、通信中断
|
2023-12-15 16:42:45 +08:00
|
|
|
type AfcGate struct {
|
2023-12-19 11:11:27 +08:00
|
|
|
State AgsState //闸机状态
|
2023-12-15 16:42:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// AgsState AFC闸机状态定义
|
|
|
|
type AgsState = uint8
|
|
|
|
|
|
|
|
const (
|
|
|
|
AgsNormal AgsState = iota //正常
|
|
|
|
AgsOutService //闸机未开放
|
|
|
|
)
|
|
|
|
|
|
|
|
//////////////////////////////////////////
|
|
|
|
|
|
|
|
// TicketMachine 票机(自动售票机、半自动售票机、验票机)
|
2023-12-19 11:11:27 +08:00
|
|
|
// 具体异常-故障、通信中断
|
2023-12-15 16:42:45 +08:00
|
|
|
type TicketMachine struct {
|
2023-12-19 11:11:27 +08:00
|
|
|
State TmState //票机状态
|
2023-12-15 16:42:45 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// TmState 票机状态定义
|
|
|
|
type TmState = uint8
|
|
|
|
|
|
|
|
const (
|
|
|
|
TmNormal TmState = iota //正常
|
|
|
|
TmOutService //暂停服务
|
|
|
|
)
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
var (
|
|
|
|
AfcGateType = ecs.NewComponentType[AfcGate]()
|
|
|
|
|
|
|
|
EntranceGateTag = ecs.NewTag() //进闸机
|
|
|
|
ExitGateTag = ecs.NewTag() //出闸机
|
|
|
|
TwoWayGateTag = ecs.NewTag() //双向闸机
|
|
|
|
|
|
|
|
TicketMachineType = ecs.NewComponentType[TicketMachine]()
|
|
|
|
|
|
|
|
TicketVendingMachineTag = ecs.NewTag() //自动售票机
|
|
|
|
SemiAutoTicketMachineTag = ecs.NewTag() //半自动售票机
|
|
|
|
TicketCheckingMachineTag = ecs.NewTag() //验票机
|
|
|
|
)
|