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); }
private byte[] GenerateDirectiveBuffer(IdleDirective directive) { return(GetCommonBufferData(directive)); }
public virtual void Idle() { var directive = new IdleDirective(DeviceId, DeviceType); DirectiveWorker.Instance.PrepareDirective(directive); }