Beispiel #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();
        }
Beispiel #2
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();
        }
Beispiel #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();
        }
Beispiel #4
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();
        }
Beispiel #5
0
 public ATRequestDataStream(ATProtocol protocol)
 {
     this.protocol = protocol;
 }
Beispiel #6
0
            public static ATRequestDataStream GetInstance(ATProtocol protocol)
            {
                instance.protocol = protocol;

                return(instance);
            }
Beispiel #7
0
            public static ATRequestDataStream GetInstance(ATProtocol protocol)
            {
                instance.protocol = protocol;

                return instance;
            }
Beispiel #8
0
 public ATRequestDataStream(ATProtocol protocol)
 {
     this.protocol = protocol;
 }