Esempio n. 1
0
        } // TmonReceiver

        public void Init()
        {
            _tmonUmSource = _parentTmonContext.GetTmonUmSource();
            _timeOfDay    = new TmonGetTimeOfDay();

            _messageBuffer.Clear();
            if (_rcvType == ReceiverType.Regular)
            {
                _messageBuffer.Append('R');
            }
            else if (_rcvType == ReceiverType.Wildcard)
            {
                _messageBuffer.Append('W');
            }
            else
            {
                throw new TmonException("invalid rcvType " + (int)_rcvType);
            }
            _messageBuffer.Append(',');
            _messageBuffer.Append(_parentTmonContext.GetMessageHeader());
            _messageBuffer.Append(','); _messageBuffer.Append(_timeOfDay.GetSec());
            _messageBuffer.Append(','); _messageBuffer.Append(_timeOfDay.GetUsec());
            _messageBuffer.Append(','); _messageBuffer.Append(_objectId);
            _messageBuffer.Append(','); _messageBuffer.Append(_topicName);

            _tmonUmSource.send(Encoding.ASCII.GetBytes(_messageBuffer.ToString()), _messageBuffer.Length, 0);
        } // Init
Esempio n. 2
0
        } // TmonSource

        public void Init()
        {
            _tmonUmSource = _parentTmonContext.GetTmonUmSource();
            _timeOfDay    = new TmonGetTimeOfDay();

            _messageBuffer.Clear();
            _messageBuffer.Append('S'); _messageBuffer.Append(',');
            _messageBuffer.Append(_parentTmonContext.GetMessageHeader());
            _messageBuffer.Append(','); _messageBuffer.Append(_timeOfDay.GetSec());
            _messageBuffer.Append(','); _messageBuffer.Append(_timeOfDay.GetUsec());
            _messageBuffer.Append(','); _messageBuffer.Append(_objectId);
            _messageBuffer.Append(','); _messageBuffer.Append(_topicName);

            _tmonUmSource.send(Encoding.ASCII.GetBytes(_messageBuffer.ToString()), _messageBuffer.Length, 0);
        } // Init