Example #1
0
        /// <summary>
        /// Service Start
        /// </summary>
        protected override void Start()
        {
            //configure default state
            if (_state == null)
            {
                _state = new ScribblerLineSensorState();

                _state.LineDetected = false;
            }

            // 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: ");

            SubscribeToScribblerBase();
        }
Example #2
0
 public virtual IEnumerator <ITask> ReplaceHandler(Replace replace)
 {
     _state = replace.Body;
     replace.ResponsePort.Post(DefaultReplaceResponseType.Instance);
     yield break;
 }