Beispiel #1
0
        /// <summary>
        /// Service Start
        /// </summary>
        protected override void Start()
        {
            if (_state == null)
            {
                _state           = new ScribblerHeartBeatState();
                _state.Connected = false;
                _state.whichLED  = 0;   //left LED
                _state.LEDState  = false;
                _state.PauseTime = 500; //half second
            }

            // Listen on the main port for requests and call the appropriate handler.
            ActivateDsspOperationHandlers();

            // Publish the service to the local Node Directory
            DirectoryInsert();

            // display HTTP service Uri
            LogInfo(LogGroups.Console, "Service uri: ");

            _timerPort.Post(DateTime.Now);
            Activate(Arbiter.Receive(true, _timerPort, TimerHandler));
        }
Beispiel #2
0
 public virtual IEnumerator <ITask> ReplaceHandler(Replace replace)
 {
     _state = replace.Body;
     replace.ResponsePort.Post(DefaultReplaceResponseType.Instance);
     yield break;
 }