示例#1
0
        /// <summary>
        /// 发送数据(未使用)
        /// </summary>
        //public event EventHandler<SendDataEventArgs> OnSendData;

        /// <summary>
        /// 有一个客户端连接上来
        /// </summary>
        //public event EventHandler<ConnectedEventArgs> OnConnected;

        /// <summary>
        /// 断开释放
        /// </summary>
        //public event EventHandler<DisconnectedEventArgs> OnDisconnected;
        #endregion

        public ComServer(string Portname, int Baudrate, string serviceID)
        {
            PortName  = Portname;
            BaudRate  = Baudrate;
            ServiceID = serviceID;

            Cs = ComBussiness.GetComSatelliteList();
            CQ = new ComQueue();
            CT = new ComThread(this);
        }
示例#2
0
        /// <summary>
        /// 发送数据(未使用)
        /// </summary>
        //public event EventHandler<SendDataEventArgs> OnSendData;

        /// <summary>
        /// 有一个客户端连接上来
        /// </summary>
        //public event EventHandler<ConnectedEventArgs> OnConnected;

        /// <summary>
        /// 断开释放
        /// </summary>
        //public event EventHandler<DisconnectedEventArgs> OnDisconnected;
        #endregion

        public ComServer(string Portname, int Baudrate, string satellite, string serviceID)
        {
            PortName  = Portname;
            BaudRate  = Baudrate;
            ServiceID = serviceID;
            Satellite = satellite;
            Cs        = ComBussiness.GetComSatelliteList();
            CQ        = new ComQueue();
            CT        = new ComThread(this);

            //原版本卫星协议的卫星状态
            CState = new ComState();
            //新版本卫星协议4.0的卫星状态
            CStateFor4 = new ComStateFor4();
        }