Exemple #1
0
        public void RxEnableRequest(
            bool deferPermit,
            UInt16 rxOnTime,
            UInt16 rxOnDuration,
            RxEnableConfirmHandler handler)
        {
            TaskRxEnableRequest task = new TaskRxEnableRequest(
                deferPermit,
                rxOnTime,
                rxOnDuration,
                handler);

            if (!_taskQueue.Add(task) && handler != null)
            {
                handler.Invoke(this, MacEnum.Congested);
            }
        }
 private void RXEnableRequest(TaskRxEnableRequest task)
 {
     if (task == null)
     {
         return;
     }
     Phy.Status status;
     if (task.rxOnDuration == 0) // disable rx
     {
         _phy.SetTrxStateRequest(Phy.State.TRxOff, out status);
     }
     else // FIXME: poweroff after durtion is not implemented
     {
         _phy.SetTrxStateRequest(Phy.State.RxOn, out status);
     }
     if (task.handler != null)
     {
         task.handler.Invoke(this, MacEnum.Success);
     }
 }
Exemple #3
0
 public void RxEnableRequest(
     bool deferPermit,
     UInt16 rxOnTime,
     UInt16 rxOnDuration,
     RxEnableConfirmHandler handler)
 {
     TaskRxEnableRequest task = new TaskRxEnableRequest(
         deferPermit,
         rxOnTime,
         rxOnDuration,
         handler);
     if (!_taskQueue.Add(task) && handler != null)
     {
         handler.Invoke(this, MacEnum.Congested);
     }
 }
 private void RXEnableRequest(TaskRxEnableRequest task)
 {
     if (task == null)
         return;
     Phy.Status status;
     if (task.rxOnDuration == 0) // disable rx
         _phy.SetTrxStateRequest(Phy.State.TRxOff, out status);
     else // FIXME: poweroff after durtion is not implemented
         _phy.SetTrxStateRequest(Phy.State.RxOn, out status);
     if (task.handler != null)
     {
         task.handler.Invoke(this, MacEnum.Success);
     }
 }