Exemplo n.º 1
0
 public RspDataInThread(DeviceForm deviceForm)
 {
     ExtCmdStatus = new ExtCmdStatus();
     AttErrorRsp = new AttErrorRsp();
     m_attFindInfoRsp = new AttFindInfoRsp(deviceForm);
     m_attFindByTypeValueRsp = new AttFindByTypeValueRsp(deviceForm);
     m_attReadByTypeRsp = new AttReadByTypeRsp(deviceForm);
     AttReadRsp = new AttReadRsp(deviceForm);
     AttReadBlobRsp = new AttReadBlobRsp(deviceForm);
     m_attReadByGrpTypeRsp = new AttReadByGrpTypeRsp(deviceForm);
     AttWriteRsp = new AttWriteRsp();
     AttPrepareWriteRsp = new AttPrepareWriteRsp();
     AttExecuteWriteRsp = new AttExecuteWriteRsp();
     AttHandleValueNotification = new AttHandleValueNotification(deviceForm);
     AttHandleValueIndication = new AttHandleValueIndication(deviceForm);
     m_taskThread = new Thread(new ParameterizedThreadStart(TaskThread));
     m_taskThread.Name = moduleName;
     m_taskThread.Start(m_threadData);
     Thread.Sleep(0);
     while (!m_taskThread.IsAlive)
     { }
 }
Exemplo n.º 2
0
 public RspDataInThread(DeviceForm deviceForm)
 {
     ExtCmdStatus            = new ExtCmdStatus();
     AttErrorRsp             = new AttErrorRsp();
     m_attFindInfoRsp        = new AttFindInfoRsp(deviceForm);
     m_attFindByTypeValueRsp = new AttFindByTypeValueRsp(deviceForm);
     m_attReadByTypeRsp      = new AttReadByTypeRsp(deviceForm);
     AttReadRsp                 = new AttReadRsp(deviceForm);
     AttReadBlobRsp             = new AttReadBlobRsp(deviceForm);
     m_attReadByGrpTypeRsp      = new AttReadByGrpTypeRsp(deviceForm);
     AttWriteRsp                = new AttWriteRsp();
     AttPrepareWriteRsp         = new AttPrepareWriteRsp();
     AttExecuteWriteRsp         = new AttExecuteWriteRsp();
     AttHandleValueNotification = new AttHandleValueNotification(deviceForm);
     AttHandleValueIndication   = new AttHandleValueIndication(deviceForm);
     m_taskThread               = new Thread(new ParameterizedThreadStart(TaskThread));
     m_taskThread.Name          = moduleName;
     m_taskThread.Start(m_threadData);
     Thread.Sleep(0);
     while (!m_taskThread.IsAlive)
     {
     }
 }
Exemplo n.º 3
0
 public void ExtCmdStatus(ExtCmdStatus.RspInfo rspInfo)
 {
     ClearRspDelegates();
     if (!rspInfo.Success)
     {
         string msg = "Command Failed\n";
         if (DisplayMsgCallback != null)
             DisplayMsgCallback(SharedAppObjs.MsgType.Error, msg);
         msgBox.UserMsgBox(SharedObjects.MainWin, MsgBox.MsgTypes.Error, msg);
     }
     else
     {
         string msg = "Command Failed\n" + "Status = " + devUtils.GetStatusStr(rspInfo.Header.EventStatus) + "\n" + "Event = " + devUtils.GetOpCodeName(rspInfo.Header.EventCode) + "\n";
         if (DisplayMsgCallback != null)
             DisplayMsgCallback(SharedAppObjs.MsgType.Error, msg);
         msgBox.UserMsgBox(SharedObjects.MainWin, MsgBox.MsgTypes.Error, msg);
     }
     RestoreFormInput();
 }