Beispiel #1
0
        public virtual void StartIdleLoop(int directiveId = -1)
        {
            if (CurrentStatus != DeviceStatusEnum.Idle)
            {
                Debug.WriteLine(
                    $"device{DeviceId} CurrentStatus is {CurrentStatus}, can not send Idle Directive");
                return;
            }
            var directive = new IdleDirective(DeviceId, DeviceType);

            if (directiveId == -1)
            {
                OnPreCommunicationEvent(directive);
            }

            SendDirective(directive, IdlePollingInterval);
        }
Beispiel #2
0
 private byte[] GenerateDirectiveBuffer(IdleDirective directive)
 {
     return(GetCommonBufferData(directive));
 }
Beispiel #3
0
        public virtual void Idle()
        {
            var directive = new IdleDirective(DeviceId, DeviceType);

            DirectiveWorker.Instance.PrepareDirective(directive);
        }