package FLXDevice import ( log "github.com/sirupsen/logrus" ) type SeatChangeData struct { EventSource EventArgSource EventType EventArgType SeatInfos []SeatChangeEventArg } type JsonData struct { EventType string DeviceID string Channel int Address int Status string Spare string SeatID int } type SeatChangeEventArg struct { ChannelAddr byte UnitAddr byte CardNo int CMD byte DeviceGUID string IsOnline bool Data []byte IPAddress string EventValue EventArgValue Value_ExtraInt int Value_ExtraStr string } func newSeatChangeEventArg(deviceGUID string, channelAddr byte, unitAddr byte, online bool, cardNo int, value EventArgValue) SeatChangeEventArg { defer func() { if r := recover(); r != nil { log.Error("newSeatChangeEventArg:", r) } }() var newSeatevent SeatChangeEventArg newSeatevent.DeviceGUID = deviceGUID newSeatevent.ChannelAddr = channelAddr newSeatevent.UnitAddr = unitAddr newSeatevent.IsOnline = online newSeatevent.CardNo = cardNo newSeatevent.EventValue = value return newSeatevent } func newSeatChangeEventArgSimple(deviceGUID string, channelAddr byte, unitAddr byte) SeatChangeEventArg { defer func() { if r := recover(); r != nil { log.Error("newSeatChangeEventArgSimple:", r) } }() var newSeatevent SeatChangeEventArg newSeatevent.DeviceGUID = deviceGUID newSeatevent.ChannelAddr = channelAddr newSeatevent.UnitAddr = unitAddr return newSeatevent } type SeatInfo struct { IsAttendance bool EnabledBrowse bool EnabledCall bool EnabledCheckedIn bool EnabledSpeak bool IsChairman bool IsSpeakHighPriority bool EnabledVote bool SeatChangeEventArg } type TopicType int const ( /// 表决 Vote TopicType = 1 /// 讨论 Speak TopicType = 2 /// 审议 Report TopicType = 3 /// 选举 Election TopicType = 4 /// 测评 Evaluation TopicType = 5 /// 专题询问 Asked TopicType = 6 /// 通过会议议程 PassAgenda TopicType = 7 /// 打分测评 Scoring TopicType = 8 /// 报告 Presentation TopicType = 9 ) type VoteShow int const ( /// /// 不显示结果 /// VoteShow_Default VoteShow = 1 /// /// 简单结果 /// VoteShow_Simple VoteShow = 2 /// /// 详细结果 /// VoteShow_Detailed VoteShow = 3 ) type SpeakMothod int const ( /// 申请发言 SpeakMothod_ApplySpeak SpeakMothod = 1 /// 抢答发言 SpeakMothod_RobSpeak SpeakMothod = 2 /// 排队发言 SpeakMothod_QueueSpeak SpeakMothod = 3 /// 自由发言 SpeakMothod_FreeSpeak SpeakMothod = 4 ) type ReportMethod int const ( /// 插卡报到(指定就坐) ReportMethod_SPECIFY_IC ReportMethod = 37 /// 按键报到 ReportMethod_Presskey ReportMethod = 38 /// 门口报到 ReportMethod_Door ReportMethod = 40 /// 发言键报到 ReportMethod_SpeakKey ReportMethod = 41 /// 唤醒即报到 ReportMethod_Active ReportMethod = 42 ///// IC卡自由就座 ReportMethod_Free_IC ReportMethod = 43 ) type VoteMethod int const ( /// 最后一次键盘有效的不公开表决 VoteMethod_LastKeyValid VoteMethod = 0 /// 第一次按键有效的不公开表决 VoteMethod_FirstKeyValid VoteMethod = 1 /// 最后一次键盘有效的公开表决 VoteMethod_AllowModify VoteMethod = 2 /// 第一次按键有效的公开表决 VoteMethod_NotAllowModify VoteMethod = 3 ) type SeatMethod int const ( /// 指定座席 SeatMethod_FixedSeat SeatMethod = 44 /// 自由就坐 SeatMethod_FreeSeat SeatMethod = 43 ) type RunStatus int const ( /// 未开始 RunStatus_UnStart RunStatus = -1 /// 开始 RunStatus_Start RunStatus = 0 /// 暂停 RunStatus_Pause RunStatus = 1 /// 继续 RunStatus_Resume RunStatus = 2 /// 停止 RunStatus_Stop RunStatus = 3 ) type EventArgSource int const ( /// 报到机 EventArgSource_SivtChecker = 0 //报道门 /// 表决器 EventArgSource_SivtVoiceDevice = 1 //表决器 /// 设备查询 EventArgSource_SivtDelegateDevice = 2 //设备查询 /// 服务器 EventArgSource_SeverDevice = 3 //服务器 /// 客户端 EventArgSource_ClientDevice = 4 //客户端 /// 智能设备 EventArgSource_SivtPadDevice = 5 //会务机 ) type EventArgType int const ( /// 设备查询事件 EventArgType_DeviceQueryEvent = 0 /// 呼叫事件 EventArgType_CallServiceEvent = 1 /// 表决事件 EventArgType_VoteEvent = 2 /// 发言事件 EventArgType_SpeakEvent = 3 /// 报到事件 EventArgType_RegisterEvent = 4 /// 下线事件 EventArgType_OnlineOffEvent = 5 /// 消息事件 EventArgType_InfoMessage = 6 /// 响应读输入端口状态 EventArgType_ReaderStatus = 7 /// 控制器回送输入端口状态数据 EventArgType_InputPortStatus = 8 /// 文件上传事件 EventArgType_FileUpload = 9 /// 服务器发送客户端事件 EventArgType_ServerToClient = 10 /// 客户端发送服务器事件 /// 视频事件 EventArgType_ClientToServer = 11 ) type EventArgValue int const ( /// 未知 EventArgValue_Unknown = 0 /// 未报到 EventArgValue_UnRegister = 1 /// 已报到 EventArgValue_Register = 2 /// 销报 EventArgValue_UnBackReg = 3 /// 补报 EventArgValue_BackReg = 4 /// 赞成 EventArgValue_Vote1Key = 5 /// 反对 EventArgValue_Vote2Key = 6 /// 弃权 EventArgValue_Vote3Key = 7 /// 加权 EventArgValue_Vote4Key = 8 /// 减权 EventArgValue_Vote5Key = 9 /// 未按键 EventArgValue_NoPress = 10 /// 正在发言 EventArgValue_SpeakOn = 11 /// 关闭发言 EventArgValue_SpeakOff = 12 /// 申请发言 EventArgValue_ApplyOn = 13 /// 取消申请发言 EventArgValue_ApplyOff = 14 /// ??? EventArgValue_MicLedAlarm = 15 /// ??? EventArgValue_MicLedNoAlarm = 16 /// 呼叫 EventArgValue_CallService = 17 /// 销呼 EventArgValue_UnCallService = 18 /// 报到机响应读输入端口状态 EventArgValue_RegistrStatus = 19 /// 报到机回送输入端口状态数据 EventArgValue_RegistrInputPortStatus = 20 /// Pad会标 EventArgValue_PadTitle = 21 /// Pad消息 EventArgValue_PadMessage = 22 ) type CongressStep int const ( CongressStep_UnStart = 0 CongressStep_Start = 1 CongressStep_StartAttendance = 2 CongressStep_EndAttendance = 3 CongressStep_StartTopic = 4 CongressStep_StartVote = 5 CongressStep_EndVote = 6 CongressStep_EndTopic = 7 )