using System; using System.Collections.Generic; using System.Text; using System.Diagnostics; using System.Data; namespace FPER { //Åë½Å¸í·ÉÁ¤º¸ [UI<----->Tprotocol°£ ] public class CmdInfo { private prt_cmd_define cmd_define; private prt_res_define res_define; private int ReceiverID = 0; //¼ö½Å±âID private int commId = 1; //1-front 2-back,3-io,4-keypad private int LoopNo = 0; //LoopNo private int BoardNo = 0; //BoardNo private int RepeaterNo = 0; //Áß°è±âNo //private int RepeaterType = 0; //Áß°è±âType 0-¾øÀ½,1-2ȸ·Î,2-4ȸ·Î,3-¾Æ³ª·Î±×¿¬°¨Áö±â,4-¾Æ³ª·Î±×¿­°¨Áö±â private int InvorkNo = 0; //¸í·ÉID private object commandData = null; //¼³Á¤¹×¾²±â µ¥ÀÌÅÍ private string devicetype = "C"; //ȸ·Î IN/OUT ŸÀÔ private int deviceId = 0; //ȸ·ÎID //CC-´©ÀûÄ«¿îÆ®, CV-Àü¾Ð private string commandType = null; //¸í·ÉŸÀÔ 2¹®ÀÚ private string subType = "*"; //ȸ·ÎŸÀÔ(ȸ·ÎŸÀÔÂ÷´Ü¿ë) private string applyRange = "A"; //Â÷´Ü·¹º§(ȸ·ÎŸÀÔÂ÷´Ü¿ë) A-All,C-Comm,B-Board,L-Loop,R-Áß°è±â,D-ȸ·Î,I-ÀÔ·Âȸ·Î,O-Ãâ·Âȸ·Î private int status = 0; //ON/OFF // cyim 2015.6.29 ¾Æ³¯·Î±×°¨Áö±â ·¹º§°ª ¾²±â ¸í·É ÇÁ·ÎÅäÄÝ Ãß°¡ private byte analogDetecterFault = 0x00; private byte analogDetecterPreFire = 0x00; private byte analogDetecterFireNight = 0x00; private byte analogDetecterFireDay = 0x00; //ÀÀ´äÀ» À§ÇÑ ¼³Á¤. private Boolean response = false; //ÀÀ´ä¿©ºÎ private Boolean errResponse = false; //¿¡·¯¿©ºÎ private object responseData = null; //ÀÀ´äµ¥ÀÌÅÍ private String errMessage = ""; //¿¡·¯¸Þ¼¼Áö private int timeOut = 3000; //ŸÀӾƿô 3ÃÊ private DateTime cmdDate; private Delegate devent; public CmdInfo(prt_cmd_define cmd_define, int receiverID) { try { this.cmd_define = cmd_define; this.ReceiverID = receiverID; this.devent = null; init(); } catch (Exception ex) { Util.UErrorMessage(ex, 0, 0); } } public CmdInfo(prt_res_define res_define, int receiverID, int loopNo, int boardNo, int repeaterNo) { try { this.res_define = res_define; this.ReceiverID = receiverID; this.commId = 1; this.LoopNo = loopNo; this.BoardNo = boardNo; this.RepeaterNo = repeaterNo; this.devent = null; init(); } catch (Exception ex) { Util.UErrorMessage(ex, 0, 0); } } public CmdInfo(prt_cmd_define cmd_define, int receiverID, int commId, int loopNo, int boardNo, int repeaterNo, Delegate dele) { try { this.cmd_define = cmd_define; this.ReceiverID = receiverID; this.commId = commId; this.LoopNo = loopNo; this.BoardNo = boardNo; this.RepeaterNo = repeaterNo; this.devent = dele; init(); } catch (Exception ex) { Util.UErrorMessage(ex, 0, 0); } } public CmdInfo(prt_cmd_define cmd_define, int receiverID, int commId, int loopNo, int boardNo, Delegate dele) { try { this.cmd_define = cmd_define; this.ReceiverID = receiverID; this.commId = commId; this.LoopNo = loopNo; this.BoardNo = boardNo; this.devent = dele; init(); } catch (Exception ex) { Util.UErrorMessage(ex, 0, 0); } } private void init() { try { this.response = false; this.cmdDate = DateTime.Now; } catch (Exception ex) { Util.UErrorMessage(ex, 0, 0); } } ////Áß°è±â¹øÈ£ & Áß°è±â ŸÀÔ°ª ³Ö±â.. //public void setRepeaterInfo(int repeaterNo,bool CutFlag, int repeaterType) //{ // this.RepeaterNo = repeaterNo; // this.RepeaterType = repeaterType; // //Set_Info_Data //} public prt_cmd_define Command { get { return cmd_define; } } public prt_res_define ResCommand { get { return res_define; } set { this.res_define = value; } } public int TimeOut { get { return this.timeOut; } } public Boolean Response { get { return this.response; } set { this.response = value; } } public int receiverID { get { return this.ReceiverID; } set { this.ReceiverID = value; } } public int CommId { get { return this.commId; } set { this.commId = value; } } public int loopNo { get { return this.LoopNo; } set { this.LoopNo = value; } } public int boardNo { get { return this.BoardNo; } set { this.BoardNo = value; } } public int repeaterNo { get { return this.RepeaterNo; } set { this.RepeaterNo = value; } } public int invorkNo { get { return this.InvorkNo; } } public Delegate dEvent { get { return this.devent; } set { this.devent = value; } } //public int repeaterType { get { return this.RepeaterType; } } public object CommandData { get { return this.commandData; } set { this.commandData = value; } } public object ResponseData { get { return responseData; } set { responseData = value; response = true; } } public object ErrResponseData { get { return this.responseData; } set { this.responseData = value; this.errResponse = true; } } public Boolean ErrResponse { get { return this.errResponse; } } public String ErrMessage { get { return this.errMessage; } } public String Devicetype { get { return this.devicetype; } set { this.devicetype = value; } } public int DeviceId { get { return this.deviceId; } set { this.deviceId = value; } } public String CommandType { get { return this.commandType; } set { this.commandType = value; } } public String SubType { get { return this.subType; } set { this.subType = value; } } public String ApplyRange { get { return this.applyRange; } set { this.applyRange = value; } } public int Status { get { return this.status; } set { this.status = value; } } // cyim 2015.6.29 ¾Æ³¯·Î±×°¨Áö±â ·¹º§°ª ¾²±â ¸í·É ÇÁ·ÎÅäÄÝ Ãß°¡ public byte AnalogDetecterFault { get { return this.analogDetecterFault; } set { this.analogDetecterFault = value; } } public byte AnalogDetecterPreFire { get { return this.analogDetecterPreFire; } set { this.analogDetecterPreFire = value; } } public byte AnalogDetecterFireNight { get { return this.analogDetecterFireNight; } set { this.analogDetecterFireNight = value; } } public byte AnalogDetecterFireDay { get { return this.analogDetecterFireDay; } set { this.analogDetecterFireDay = value; } } } //À̺¥Æ®·Î±× public class EventLogInfo : IDisposable // cyim 2017.01.02 : Memory leak { public bool updated = false; public String eventId; public DateTime eventTime; private String eventType; private String eventTypeName; private MappingStatus eventStatus = MappingStatus.Normal; private int receiverID = 0; //¼ö½Å±âID private int commId = 1; //1-front 2-back,3-io,4-keypad private int loopNo = 0; //LoopNo private int boardNo = 0; //BoardNo private int repeaterNo = 0; //Áß°è±âNo private string inoutType = ""; //ȸ·Î IN/OUT ŸÀÔ private int deviceId = 0; //ȸ·ÎID private string deviceMessage = ""; //ȸ·Î IN/OUT ŸÀÔ private string message = ""; //ȸ·Î IN/OUT ŸÀÔ private int dataValue = 0; private bool liveMsgFlag = false; // cyim 2017.01.02 : Memory leak public void Dispose() { updated = false; eventId = ""; //eventTime eventType = ""; eventTypeName = ""; eventStatus = MappingStatus.Normal; receiverID = 0; //¼ö½Å±âID commId = 1; //1-front 2-back,3-io,4-keypad loopNo = 0; //LoopNo boardNo = 0; //BoardNo repeaterNo = 0; //Áß°è±âNo inoutType = ""; //ȸ·Î IN/OUT ŸÀÔ deviceId = 0; //ȸ·ÎID deviceMessage = ""; //ȸ·Î IN/OUT ŸÀÔ message = ""; //ȸ·Î IN/OUT ŸÀÔ dataValue = 0; liveMsgFlag = false; } public EventLogInfo(string eventId) { try { this.eventId = eventId; //this.Confirm_flag = "N"; this.eventType = eventId.Substring(19, 2); } catch (Exception ex) { Util.UErrorMessage(ex, 0, 0); } } public void UpdateEventLogID(string eventId) { this.eventId = eventId; } public String EventId { get { return this.eventId; } } public DateTime EventTime { get { return this.eventTime; } set { this.eventTime = value; } } public String EventType { get { return this.eventType; } set { this.eventType = value; } } public String EventTypeName { get { return this.eventTypeName; } set { this.eventTypeName = value; } } public MappingStatus EventStatus { get { return this.eventStatus; } set { this.eventStatus = value; } } public String DeviceMessage { get { return this.deviceMessage; } set { this.deviceMessage = value; } } public String Message { get { return this.message; } set { this.message = value; } } public int ReceiverID { get { return this.receiverID; } set { this.receiverID = value; } } public int CommId { get { return this.commId; } set { this.commId = value; } } public int LoopNo { get { return this.loopNo; } set { this.loopNo = value; } } public int BoardNo { get { return this.boardNo; } set { this.boardNo = value; } } public int RepeaterNo { get { return this.repeaterNo; } set { this.repeaterNo = value; } } public String InoutType { get { return this.inoutType; } set { this.inoutType = value; } } public int DeviceId { get { return this.deviceId; } set { this.deviceId = value; } } public int DataValue { get { return this.dataValue; } set { this.dataValue = value; } } //public String Confirm_remark { get { return this.confirm_remark; } set { this.confirm_remark = value; } } //public String Confirm_flag { get { return this.confirm_flag; } set { this.confirm_flag = value; } } //public String Confirm_person { get { return this.confirm_person; } set { this.confirm_person = value; } } //public DateTime Confirm_time { get { return this.confirm_time; } set { this.confirm_time = value; } } public bool LiveMsgFlag { get { return this.liveMsgFlag; } set { this.liveMsgFlag = value; } } //public bool CommandLogFlag { get { return this.commandLogFlag; } set { this.commandLogFlag = value; } } } }