Radio Control Layer (RCL)
|
These functions are meant mostly to be used by handlers and RCL itself
Functions | |
RCL_CommandStatus | RCL_Scheduler_findStopStatus (RCL_StopType stopType) |
Get relevant status when a command was stopped. More... | |
RCL_CommandStatus | RCL_Scheduler_setStartStopTime (const RCL_Command *cmd) |
Set start and stop time for LRF based on command. More... | |
RCL_CommandStatus | RCL_Scheduler_setStartStopTimeEarliestStart (const RCL_Command *cmd, uint32_t earliestStartTime) |
Set start and stop time for LRF based on command with earliest start time. More... | |
RCL_CommandStatus | RCL_Scheduler_setCustomStartStopTime (const RCL_CommandTiming *timing, RCL_ScheduleType scheduling, bool allowDelay) |
Set start and stop time for LRF. More... | |
RCL_CommandStatus | RCL_Scheduler_setCustomStartStopTimeEarliestStart (const RCL_CommandTiming *timing, RCL_ScheduleType scheduling, bool allowDelay, uint32_t earliestStartTime) |
Set start and stop time for LRF with earliest start time. More... | |
RCL_CommandStatus | RCL_Scheduler_setCmdStopTimeNoStartTrigger (const RCL_Command *cmd) |
Set stop time for LRF based on command when it does not need a start trigger. More... | |
RCL_CommandStatus | RCL_Scheduler_setNewStartNow (void) |
Set new start time for LRF to now, after a previous start. More... | |
RCL_CommandStatus | RCL_Scheduler_setNewStartAbsTime (uint32_t startTime, bool allowDelay) |
Set new start time for LRF to given absolute time, after a previous start. More... | |
RCL_CommandStatus | RCL_Scheduler_setNewStartRelTime (uint32_t relStartTime) |
Set new start time for LRF to given time relative to previous LRF start. More... | |
RCL_StopType | RCL_Scheduler_setStopTimes (void) |
Function to apply relevant stop times. More... | |
RCL_CommandStatus RCL_Scheduler_findStopStatus | ( | RCL_StopType | stopType | ) |
Get relevant status when a command was stopped.
Returns the status to be set for a command that was stopped with the given stop source, depending on what caused the stop
stopType | Stop type observed |
References RCL_SchedulerState::descheduleReason, RCL_SchedulerState::gracefulStopInfo, RCL_SchedulerState::hardStopInfo, RCL_CommandStatus_DescheduledApi, RCL_CommandStatus_DescheduledScheduling, RCL_CommandStatus_Error, RCL_CommandStatus_GracefulStopApi, RCL_CommandStatus_GracefulStopScheduling, RCL_CommandStatus_GracefulStopTimeout, RCL_CommandStatus_HardStopApi, RCL_CommandStatus_HardStopScheduling, RCL_CommandStatus_HardStopTimeout, RCL_Debug_assert, RCL_SchedulerStopReason_Api, RCL_SchedulerStopReason_Scheduling, RCL_SchedulerStopReason_Timeout, RCL_StopType_DescheduleOnly, RCL_StopType_Graceful, RCL_StopType_Hard, and RCL_SchedulerStopInfo::stopReason.
Referenced by RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_aux_adv(), RCL_Handler_BLE5_conn(), RCL_Handler_BLE5_dtmTx(), RCL_Handler_BLE5_findPbeErrorEndStatus(), RCL_Handler_BLE5_genericRx(), RCL_Handler_BLE5_scan_init(), RCL_Handler_BLE_CS_findPbeErrorEndStatus(), RCL_Handler_Generic_findPbeErrorEndStatus(), RCL_Handler_Generic_Rx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Ieee_findPbeErrorEndStatus(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Nesb_Prx(), RCL_Lite_CommandHwi(), rclCommandHwi(), rclSchedulerProcessCmdStartStopTime(), and rclStop().
RCL_CommandStatus RCL_Scheduler_setStartStopTime | ( | const RCL_Command * | cmd | ) |
Set start and stop time for LRF based on command.
Sets start and stop times for LRF based on scheduled times
cmd | Pointer to running command |
References RCL_Debug_assert, RCL_Schedule_AbsTime, rclSchedulerProcessCmdStartStopTime(), SchedulerStartAbsTimeAllowDelay, SchedulerStartAbsTimeNoDelay, and SchedulerStartNow.
RCL_CommandStatus RCL_Scheduler_setStartStopTimeEarliestStart | ( | const RCL_Command * | cmd, |
uint32_t | earliestStartTime | ||
) |
Set start and stop time for LRF based on command with earliest start time.
Sets start and stop times for LRF based on scheduled times, but delay start if needed due to hardware startup time
cmd | Pointer to running command |
earliestStartTime | Start at earliest at this time, or fail if delay not allowed |
References RCL_CommandStatus_Error_StartTooLate, RCL_Debug_assert, RCL_Schedule_AbsTime, RCL_Scheduler_isLater(), rclSchedulerProcessCmdStartStopTime(), SchedulerStartAbsTimeAllowDelay, and SchedulerStartAbsTimeNoDelay.
Referenced by RCL_Handler_ADC_Noise_getNoise(), RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_aux_adv(), RCL_Handler_BLE5_conn(), RCL_Handler_BLE5_dtmTx(), RCL_Handler_BLE5_genericRx(), RCL_Handler_BLE5_genericTx(), RCL_Handler_BLE5_scan_init(), RCL_Handler_Ble5_txTest(), RCL_Handler_BLE_CS(), RCL_Handler_Generic_Fs(), RCL_Handler_Generic_Rx(), RCL_Handler_Generic_Tx(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Generic_TxTest(), RCL_Handler_Ieee_RxTx(), RCL_Handler_Ieee_TxTest(), RCL_Handler_Nesb_Prx(), and RCL_Handler_Nesb_Ptx().
RCL_CommandStatus RCL_Scheduler_setCustomStartStopTime | ( | const RCL_CommandTiming * | timing, |
RCL_ScheduleType | scheduling, | ||
bool | allowDelay | ||
) |
Set start and stop time for LRF.
Sets start and stop times for LRF based on provided times
timing | Start and stop times to set |
scheduling | Scheduling type |
allowDelay | True if start may be delayed; false if late start is an error |
References RCL_Debug_assert, RCL_Schedule_AbsTime, rclSchedulerProcessCmdStartStopTime(), SchedulerStartAbsTimeAllowDelay, SchedulerStartAbsTimeNoDelay, and SchedulerStartNow.
RCL_CommandStatus RCL_Scheduler_setCustomStartStopTimeEarliestStart | ( | const RCL_CommandTiming * | timing, |
RCL_ScheduleType | scheduling, | ||
bool | allowDelay, | ||
uint32_t | earliestStartTime | ||
) |
Set start and stop time for LRF with earliest start time.
Sets start and stop times for LRF based on provided times, but delay start if needed due to hardware startup time
timing | Start and stop times to set |
scheduling | Scheduling type |
allowDelay | True if start may be delayed; false if late start is an error |
earliestStartTime | Start at earliest at this time, or fail if delay not allowed |
References RCL_CommandStatus_Error_StartTooLate, RCL_Debug_assert, RCL_Schedule_AbsTime, RCL_Scheduler_isLater(), rclSchedulerProcessCmdStartStopTime(), SchedulerStartAbsTimeAllowDelay, and SchedulerStartAbsTimeNoDelay.
Referenced by RCL_Handler_Ieee_RxTx().
RCL_CommandStatus RCL_Scheduler_setCmdStopTimeNoStartTrigger | ( | const RCL_Command * | cmd | ) |
Set stop time for LRF based on command when it does not need a start trigger.
Sets stop times for LRF based on scheduled times, but do not program any start trigger
cmd | Pointer to running command |
References RCL_Debug_assert, rclSchedulerProcessCmdStartStopTime(), and SchedulerNoStart.
Referenced by RCL_Handler_Generic_FsOff(), and RCL_Handler_Generic_PbeOperation().
RCL_CommandStatus RCL_Scheduler_setNewStartNow | ( | void | ) |
Set new start time for LRF to now, after a previous start.
References rclSchedulerProcessCmdStartStopTime(), and SchedulerStartNow.
Referenced by RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_scan_init(), RCL_Handler_Generic_TxRepeat(), RCL_Handler_Ieee_RxTx(), and RCL_Handler_Nesb_Ptx().
RCL_CommandStatus RCL_Scheduler_setNewStartAbsTime | ( | uint32_t | startTime, |
bool | allowDelay | ||
) |
Set new start time for LRF to given absolute time, after a previous start.
startTime | Absloute start time |
allowDelay | True if start may be delayed; false if late start is an error |
References rclSchedulerProcessCmdStartStopTime(), SchedulerStartAbsTimeAllowDelay, and SchedulerStartAbsTimeNoDelay.
Referenced by RCL_Handler_ADC_Noise_getNoise(), RCL_Handler_BLE5_scan_init(), and RCL_Handler_Ieee_RxTx().
RCL_CommandStatus RCL_Scheduler_setNewStartRelTime | ( | uint32_t | relStartTime | ) |
Set new start time for LRF to given time relative to previous LRF start.
relStartTime | Start time relative to previous actual start time of LRF |
References RCL_SchedulerState::actualStartTime, rclSchedulerProcessCmdStartStopTime(), and SchedulerStartAbsTimeAllowDelay.
Referenced by RCL_Handler_BLE5_adv(), RCL_Handler_BLE5_aux_adv(), RCL_Handler_Generic_TxRepeat(), and RCL_Handler_Nesb_Ptx().
RCL_StopType RCL_Scheduler_setStopTimes | ( | void | ) |
Function to apply relevant stop times.
Sets stop times for LRF based on scheduled times
References RCL_SchedulerStopInfo::cmdStopTime, RCL_SchedulerState::gracefulStopInfo, hal_cancel_graceful_stop_time(), hal_cancel_hard_stop_time(), hal_setup_graceful_stop_time(), hal_setup_hard_stop_time(), RCL_SchedulerState::hardStopInfo, RCL_Scheduler_getCurrentTime(), RCL_Scheduler_isLater(), RCL_SchedulerStopReason_None, RCL_SchedulerStopReason_Timeout, RCL_SchedulerStopTimeState_Found, RCL_SchedulerStopTimeState_Programmed, RCL_StopType_Graceful, RCL_StopType_Hard, RCL_StopType_None, RCL_SchedulerStopInfo::schedStopTime, RCL_SchedulerStopInfo::stopReason, and RCL_SchedulerState::stopTimeState.
Referenced by RCL_Handler_Ieee_restoreStopTime(), RCL_Lite_CommandHwi(), rclCommandHwi(), rclSchedulerCancelStopTime(), and rclSchedulerSetNewStopTime().