Radio Control Layer (RCL)
Timing API Functions

Detailed Description

These functions are useful as part of the API to RCL

Functions

bool RCL_Scheduler_isLater (uint32_t refTime, uint32_t chkTime)
 Find if a time instant occurs after another, allowing wrap-around. More...
 
int32_t RCL_Scheduler_delta (uint32_t refTime, uint32_t chkTime)
 Find the time difference between two times, allowing wrap-around. More...
 
static uint32_t RCL_Scheduler_getCurrentTime (void)
 Get current time. More...
 
RCL_StopType RCL_Scheduler_setSchedStopTime (RCL_SchedulerStopInfo *stopInfo, uint32_t schedStopTime)
 Set scheduler stop time. More...
 
RCL_StopType RCL_Scheduler_setCmdStopTime (RCL_SchedulerStopInfo *stopInfo, uint32_t cmdStopTime)
 Set command stop time. More...
 
RCL_StopType RCL_Scheduler_cancelSchedStopTime (RCL_SchedulerStopInfo *stopInfo)
 Cancel scheduler stop time. More...
 
RCL_StopType RCL_Scheduler_cancelCmdStopTime (RCL_SchedulerStopInfo *stopInfo)
 Cancel command stop time. More...
 
bool RCL_Scheduler_postEvent (RCL_Command_Handle c, RCL_Events e)
 Post event to command handler. More...
 

Function Documentation

§ RCL_Scheduler_isLater()

bool RCL_Scheduler_isLater ( uint32_t  refTime,
uint32_t  chkTime 
)

#include </home/developer/.conan/data/rcl/8.10.00.12/library-lprf/ga/package/510d7dd2dbe5e675bad9bbb58cc66378e84fdf53/source/ti/drivers/rcl/RCL_Scheduler.h>

Find if a time instant occurs after another, allowing wrap-around.

Checks if a time is before or after another. In the processing, a time is assumed to be before the reference if it is less than 1/8 of the full timer range (134 seconds) before it; otherwise it is assumed to be in the future. This means that the time presumed to be the latest should always be the second parameter (chkTime)

Parameters
refTimeReference time
chkTimeTime to be checked
Returns
true if chkTime comes after refTime. false if chkTime comes before refTime or if they are equal.

Referenced by __attribute__(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Ieee_setCustomEventTime(), RCL_Lite_Command_start(), RCL_Scheduler_setCustomStartStopTimeEarliestStart(), RCL_Scheduler_setStartStopTimeEarliestStart(), RCL_Scheduler_setStopTimes(), rclSchedulerFindEarliestStopTime(), and rclSchedulerProcessCmdStartStopTime().

§ RCL_Scheduler_delta()

int32_t RCL_Scheduler_delta ( uint32_t  refTime,
uint32_t  chkTime 
)

#include </home/developer/.conan/data/rcl/8.10.00.12/library-lprf/ga/package/510d7dd2dbe5e675bad9bbb58cc66378e84fdf53/source/ti/drivers/rcl/RCL_Scheduler.h>

Find the time difference between two times, allowing wrap-around.

Finds the signed difference between two times, saturated at the maximum signed 32-bit integer value. In the processing, a time is assumed to be before the reference if it is less than 1/8 of the full timer range (134 seconds) before it; otherwise it is assumed to be in the future.

Parameters
refTimeReference time
chkTimeTime to be checked
Returns
Time difference (chkTime-refTime) corrected for wrap-around. Saturated at 0x7FFFFFFF (8 min 57 sec).

Referenced by RCL_Handler_Ieee_RxTx(), and rclSchedulerHwi().

§ RCL_Scheduler_getCurrentTime()

§ RCL_Scheduler_setSchedStopTime()

RCL_StopType RCL_Scheduler_setSchedStopTime ( RCL_SchedulerStopInfo stopInfo,
uint32_t  schedStopTime 
)

#include </home/developer/.conan/data/rcl/8.10.00.12/library-lprf/ga/package/510d7dd2dbe5e675bad9bbb58cc66378e84fdf53/source/ti/drivers/rcl/RCL_Scheduler.h>

Set scheduler stop time.

Sets scheduler stop time for the given stop type, finds which of the active stop times comes first, sets selection bits accordingly and reprograms the stop time if it was already programmed.

Parameters
stopInfoPointer to stop info for the relevant stop type
schedStopTimeNew scheduler stop time to apply
Returns
Stop type if stop needs to be applied immediately

References rclSchedulerSetNewStopTime().

Referenced by __attribute__().

§ RCL_Scheduler_setCmdStopTime()

RCL_StopType RCL_Scheduler_setCmdStopTime ( RCL_SchedulerStopInfo stopInfo,
uint32_t  cmdStopTime 
)

#include </home/developer/.conan/data/rcl/8.10.00.12/library-lprf/ga/package/510d7dd2dbe5e675bad9bbb58cc66378e84fdf53/source/ti/drivers/rcl/RCL_Scheduler.h>

Set command stop time.

Sets command stop time for the given stop type, finds which of the active stop times comes first, sets selection bits accordingly and reprograms the stop time if it was already programmed.

Parameters
stopInfoPointer to stop info for the relevant stop type
cmdStopTimeNew command stop time to apply
Returns
Stop type if stop needs to be applied immediately

References rclSchedulerSetNewStopTime().

§ RCL_Scheduler_cancelSchedStopTime()

RCL_StopType RCL_Scheduler_cancelSchedStopTime ( RCL_SchedulerStopInfo stopInfo)

#include </home/developer/.conan/data/rcl/8.10.00.12/library-lprf/ga/package/510d7dd2dbe5e675bad9bbb58cc66378e84fdf53/source/ti/drivers/rcl/RCL_Scheduler.h>

Cancel scheduler stop time.

Cancels scheduler stop time for the given stop type, finds if there is still an active stop time, cancels or reprograms the stop time if it was already programmed.

Parameters
stopInfoPointer to stop info for the relevant stop type
Returns
Stop type if stop needs to be applied immediately

References rclSchedulerCancelStopTime().

Referenced by rclStop().

§ RCL_Scheduler_cancelCmdStopTime()

RCL_StopType RCL_Scheduler_cancelCmdStopTime ( RCL_SchedulerStopInfo stopInfo)

#include </home/developer/.conan/data/rcl/8.10.00.12/library-lprf/ga/package/510d7dd2dbe5e675bad9bbb58cc66378e84fdf53/source/ti/drivers/rcl/RCL_Scheduler.h>

Cancel command stop time.

Cancels command stop time for the given stop type, finds if there is still an active stop time, cancels or reprograms the stop time if it was already programmed.

Parameters
stopInfoPointer to stop info for the relevant stop type
Returns
Stop type if stop needs to be applied immediately

References rclSchedulerCancelStopTime().

§ RCL_Scheduler_postEvent()