Exemplo n.º 1
0
        public NXTProtocol(object s, NXTStreamType stype)
        {
            stream     = s;
            streamType = stype;

            cmdThread = new Thread(CommandWorker);

            lsGetStatusDelegate  = null;
            lsReadDelegate       = null;
            ultrasonicDelegate   = null;
            batteryLevelDelegate = null;
            getVersionDelegate   = null;
            getOutputDelegate    = null;
            getInputDelegate     = null;
            messageReadDelegate  = null;
            keepAliveDelegate    = null;
        }
Exemplo n.º 2
0
        public void Run(SendKeepAliveRequest sendKeepAliveRequest, TimeSpan keepAliveInterval)
        {
            var sendDelegate = new KeepAliveDelegate(StartKeepAlive);

            sendDelegate.BeginInvoke(sendKeepAliveRequest, keepAliveInterval, new AsyncCallback(KeepAliveCallback), sendDelegate);
        }
Exemplo n.º 3
0
        public NXTProtocol(object s, NXTStreamType stype)
        {
            stream = s;
            streamType = stype;

            cmdThread = new Thread(CommandWorker);

            lsGetStatusDelegate = null;
            lsReadDelegate = null;
            ultrasonicDelegate = null;
            batteryLevelDelegate = null;
            getVersionDelegate = null;
            getOutputDelegate = null;
            getInputDelegate = null;
            messageReadDelegate = null;
            keepAliveDelegate = null;
        }
Exemplo n.º 4
0
 public void Run(SendKeepAliveRequest sendKeepAliveRequest, TimeSpan keepAliveInterval)
 {
     var sendDelegate = new KeepAliveDelegate(StartKeepAlive);
     sendDelegate.BeginInvoke(sendKeepAliveRequest, keepAliveInterval, new AsyncCallback(KeepAliveCallback), sendDelegate);
 }