コード例 #1
0
        public ESP8266ATModem(Stream stream)
        {
            this.protocol                = new ATProtocol(stream, ESP8266ATParser.GetInstance());
            this.protocol.EchoEnabled    = false;
            this.protocol.FrameReceived += protocol_FrameReceived;

            this.openingConnectionId = -1;
            this.sendingConnectionId = -1;
            this.connectionEvent     = new ManualResetEvent(false);
            this.sendEvent           = new ManualResetEvent(false);
            this.sendPromptEvent     = new ManualResetEvent(false);

            this.connectionSyncRoot = new object();
            this.connectionStatus   = new bool[4];
            for (int i = 0; i < this.connectionStatus.Length; i++)
            {
                this.connectionStatus[i] = false;
            }
            this.previousConnectionStatus = new bool[4];
            for (int i = 0; i < this.previousConnectionStatus.Length; i++)
            {
                this.previousConnectionStatus[i] = this.connectionStatus[i];
            }

            this.Initialize();
        }
コード例 #2
0
ファイル: SIM900ATModem.cs プロジェクト: cins/ATModem
        public SIM900ATModem(Stream stream)
        {
            this.protocol = new ATProtocol(stream, SIM900ATParser.GetInstance());
            this.protocol.EchoEnabled = false;
            this.protocol.FrameReceived += protocol_FrameReceived;

            this.openingConnectionId = -1;
            this.sendingConnectionId = -1;
            this.connectionEvent = new ManualResetEvent(false);
            this.dnsQueryEvent = new ManualResetEvent(false);
            this.sendEvent = new ManualResetEvent(false);
            this.sendPromptEvent = new ManualResetEvent(false);

            this.connectionSyncRoot = new object();

            this.Initialize();
        }
コード例 #3
0
        public SIM900ATModem(Stream stream)
        {
            this.protocol                = new ATProtocol(stream, SIM900ATParser.GetInstance());
            this.protocol.EchoEnabled    = false;
            this.protocol.FrameReceived += protocol_FrameReceived;

            this.openingConnectionId = -1;
            this.sendingConnectionId = -1;
            this.connectionEvent     = new ManualResetEvent(false);
            this.dnsQueryEvent       = new ManualResetEvent(false);
            this.sendEvent           = new ManualResetEvent(false);
            this.sendPromptEvent     = new ManualResetEvent(false);

            this.connectionSyncRoot = new object();

            this.Initialize();
        }
コード例 #4
0
ファイル: ESP8266ATModem.cs プロジェクト: cins/ATModem
        public ESP8266ATModem(Stream stream)
        {
            this.protocol = new ATProtocol(stream, ESP8266ATParser.GetInstance());
            this.protocol.EchoEnabled = false;
            this.protocol.FrameReceived += protocol_FrameReceived;

            this.openingConnectionId = -1;
            this.sendingConnectionId = -1;
            this.connectionEvent = new ManualResetEvent(false);
            this.sendEvent = new ManualResetEvent(false);
            this.sendPromptEvent = new ManualResetEvent(false);

            this.connectionSyncRoot = new object();
            this.connectionStatus = new bool[4];
            for (int i = 0; i < this.connectionStatus.Length; i++)
                this.connectionStatus[i] = false;
            this.previousConnectionStatus = new bool[4];
            for (int i = 0; i < this.previousConnectionStatus.Length; i++)
                this.previousConnectionStatus[i] = this.connectionStatus[i];

            this.Initialize();
        }
コード例 #5
0
 public ATRequestDataStream(ATProtocol protocol)
 {
     this.protocol = protocol;
 }
コード例 #6
0
            public static ATRequestDataStream GetInstance(ATProtocol protocol)
            {
                instance.protocol = protocol;

                return(instance);
            }
コード例 #7
0
ファイル: ATProtocol.cs プロジェクト: cins/ATModem
            public static ATRequestDataStream GetInstance(ATProtocol protocol)
            {
                instance.protocol = protocol;

                return instance;
            }
コード例 #8
0
ファイル: ATProtocol.cs プロジェクト: cins/ATModem
 public ATRequestDataStream(ATProtocol protocol)
 {
     this.protocol = protocol;
 }