Exemplo n.º 1
0
        /// <summary> Initialises this object. </summary>
        /// <param name="communications">   The Serial port object. </param>
        /// <param name="fieldSeparator">   The field separator. </param>
        /// <param name="commandSeparator"> The command separator. </param>
        /// <param name="escapeCharacter">  The escape character. </param>
        private void Init(SerialPortManager communications, char fieldSeparator, char commandSeparator,
                          char escapeCharacter)
        {
            _controlToInvokeOn = null;
            _communications    = communications;
            _communications    = communications;
            _fieldSeparator    = fieldSeparator;
            _commandSeparator  = commandSeparator;
            _escapeCharacter   = escapeCharacter;

            communications.EolDelimiter = _commandSeparator;
            Escaping.EscapeChars(fieldSeparator, commandSeparator, escapeCharacter);
            _callbackList = new Dictionary <int, MessengerCallbackFunction>();
            PrintLfCr     = false;
            _communications.NewLineReceived += NewSerialDataReceived;
        }
Exemplo n.º 2
0
 /// <summary> Constructor. </summary>
 /// <param name="communications"> The Serial port object. </param>
 /// <param name="fieldSeparator"> The field separator. </param>
 public CmdMessenger(SerialPortManager communications, char fieldSeparator)
 {
     Init(communications, fieldSeparator, ';', '/');
 }
Exemplo n.º 3
0
        private Control _controlToInvokeOn; // The control to invoke the callback on

        /// <summary> Constructor. </summary>
        /// <param name="communications"> The Serial port object. </param>
        public CmdMessenger(SerialPortManager communications)
        {
            Init(communications, ',', ';', '/');
        }
Exemplo n.º 4
0
 /// <summary> Constructor. </summary>
 /// <param name="communications">   The Serial port object. </param>
 /// <param name="fieldSeparator">   The field separator. </param>
 /// <param name="commandSeparator"> The command separator. </param>
 /// <param name="escapeCharacter">  The escape character. </param>
 public CmdMessenger(SerialPortManager communications, char fieldSeparator, char commandSeparator,
                     char escapeCharacter)
 {
     Init(communications, fieldSeparator, commandSeparator, escapeCharacter);
 }