|
MotorWare f2806x Module API Documentation
|
Data Structures | |
| struct | _CPU_USAGE_Obj_ |
| Defines the CPU usage (CPU_USAGE) object. More... | |
Typedefs | |
| typedef struct _CPU_USAGE_Obj_ | CPU_USAGE_Obj |
| Defines the CPU usage (CPU_USAGE) object. More... | |
| typedef struct _CPU_USAGE_Obj_ * | CPU_USAGE_Handle |
| Defines the CPU_USAGE handle. More... | |
Functions | |
| static uint32_t | CPU_USAGE_getTimerPeriod (CPU_USAGE_Handle handle) |
| Gets the timer period, cnts. More... | |
| static uint32_t | CPU_USAGE_getCnt_z0 (CPU_USAGE_Handle handle) |
| Gets the current count value. More... | |
| static uint32_t | CPU_USAGE_getCnt_z1 (CPU_USAGE_Handle handle) |
| Gets the previous count value. More... | |
| static uint32_t | CPU_USAGE_getDeltaCnt (CPU_USAGE_Handle handle) |
| Gets the latest delta count measured, cnts. More... | |
| static uint32_t | CPU_USAGE_getDeltaCntAcc (CPU_USAGE_Handle handle) |
| Gets the accumulated delta counts, cnts. More... | |
| static uint32_t | CPU_USAGE_getDeltaCntAccNum (CPU_USAGE_Handle handle) |
| Gets the number of accumulated delta counts, num. More... | |
| static uint32_t | CPU_USAGE_getDeltaCntAccNumMax (CPU_USAGE_Handle handle) |
| Gets the maximum number of accumulated delta counts, num. More... | |
| static uint32_t | CPU_USAGE_getMinDeltaCntObserved (CPU_USAGE_Handle handle) |
| Gets the minimum delta count observed, cnts. More... | |
| static uint32_t | CPU_USAGE_getAvgDeltaCntObserved (CPU_USAGE_Handle handle) |
| Gets the average delta count observed, cnts. More... | |
| static uint32_t | CPU_USAGE_getMaxDeltaCntObserved (CPU_USAGE_Handle handle) |
| Gets the maximum delta count observed, cnts. More... | |
| static bool | CPU_USAGE_getFlag_resetStats (CPU_USAGE_Handle handle) |
| Gets the state of the reset stats flag. More... | |
| CPU_USAGE_Handle | CPU_USAGE_init (void *pMemory, const size_t numBytes) |
| Initializes the CPU usage (CPU_USAGE) object. More... | |
| static void | CPU_USAGE_setTimerPeriod (CPU_USAGE_Handle handle, const uint32_t timerPeriod_cnts) |
| Sets the timer period, cnts. More... | |
| static void | CPU_USAGE_setCnt_z0 (CPU_USAGE_Handle handle, const uint32_t cnt) |
| Sets the current count value. More... | |
| static void | CPU_USAGE_setCnt_z1 (CPU_USAGE_Handle handle, const uint32_t cnt) |
| Sets the previous count value. More... | |
| static void | CPU_USAGE_setDeltaCnt (CPU_USAGE_Handle handle, const uint32_t deltaCnt) |
| Sets the delta count value. More... | |
| static void | CPU_USAGE_setDeltaCntAcc (CPU_USAGE_Handle handle, const uint32_t deltaCntAcc) |
| Sets the accumulated delta counts value. More... | |
| static void | CPU_USAGE_setDeltaCntAccNum (CPU_USAGE_Handle handle, const uint32_t deltaCntAccNum) |
| Sets the number of accumulated delta counts. More... | |
| static void | CPU_USAGE_setDeltaCntAccNumMax (CPU_USAGE_Handle handle, const uint32_t deltaCntAccNumMax) |
| Sets the maximum number of accumulated delta counts. More... | |
| static void | CPU_USAGE_setMinDeltaCntObserved (CPU_USAGE_Handle handle, const uint32_t minDeltaCnt) |
| Sets the minimum delta count observed, cnts. More... | |
| static void | CPU_USAGE_setAvgDeltaCntObserved (CPU_USAGE_Handle handle, const uint32_t avgDeltaCnt) |
| Sets the average delta count observed, cnts. More... | |
| static void | CPU_USAGE_setMaxDeltaCntObserved (CPU_USAGE_Handle handle, const uint32_t maxDeltaCnt) |
| Sets the maximum delta count observed, cnts. More... | |
| static void | CPU_USAGE_setFlag_resetStats (CPU_USAGE_Handle handle, const bool state) |
| Sets the state of the reset stats flag. More... | |
| void | CPU_USAGE_setParams (CPU_USAGE_Handle handle, const uint32_t timerPeriod_cnts, const uint32_t numDeltaCntsAvg) |
| Sets the CPU usage module parameters. More... | |
| static void | CPU_USAGE_run (CPU_USAGE_Handle handle) |
| Runs the CPU usage module. More... | |
| static void | CPU_USAGE_updateCnts (CPU_USAGE_Handle handle, const uint32_t cnt) |
| Updates the current and previous count values. More... | |
| struct _CPU_USAGE_Obj_ |
Defines the CPU usage (CPU_USAGE) object.
Definition at line 40 of file cpu_usage.h.
| typedef struct _CPU_USAGE_Obj_* CPU_USAGE_Handle |
Defines the CPU_USAGE handle.
Definition at line 61 of file cpu_usage.h.
| typedef struct _CPU_USAGE_Obj_ CPU_USAGE_Obj |
Defines the CPU usage (CPU_USAGE) object.
|
inlinestatic |
Gets the average delta count observed, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 163 of file cpu_usage.h.
References _CPU_USAGE_Obj_::avgDeltaCntObserved.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the current count value.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 86 of file cpu_usage.h.
References _CPU_USAGE_Obj_::cnt_z0.
Referenced by CPU_USAGE_run(), and CPU_USAGE_updateCnts().
|
inlinestatic |
Gets the previous count value.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 97 of file cpu_usage.h.
References _CPU_USAGE_Obj_::cnt_z1.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the latest delta count measured, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 108 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCnt.
|
inlinestatic |
Gets the accumulated delta counts, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 119 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCntAcc.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the number of accumulated delta counts, num.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 130 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCntAccNum.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the maximum number of accumulated delta counts, num.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 141 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCntAccNumMax.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the state of the reset stats flag.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 185 of file cpu_usage.h.
References _CPU_USAGE_Obj_::flag_resetStats.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the maximum delta count observed, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 174 of file cpu_usage.h.
References _CPU_USAGE_Obj_::maxDeltaCntObserved.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the minimum delta count observed, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 152 of file cpu_usage.h.
References _CPU_USAGE_Obj_::minDeltaCntObserved.
Referenced by CPU_USAGE_run().
|
inlinestatic |
Gets the timer period, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 75 of file cpu_usage.h.
References _CPU_USAGE_Obj_::timerPeriod_cnts.
Referenced by CPU_USAGE_run().
| CPU_USAGE_Handle CPU_USAGE_init | ( | void * | pMemory, |
| const size_t | numBytes | ||
| ) |
Initializes the CPU usage (CPU_USAGE) object.
| [in] | pMemory | A pointer to the base address of the object |
| [in] | numBytes | The object size, bytes |
Definition at line 21 of file cpu_usage.c.
|
inlinestatic |
Runs the CPU usage module.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
Definition at line 354 of file cpu_usage.h.
References _CPU_USAGE_Obj_::avgDeltaCntObserved, _CPU_USAGE_Obj_::cnt_z0, _CPU_USAGE_Obj_::cnt_z1, CPU_USAGE_getAvgDeltaCntObserved(), CPU_USAGE_getCnt_z0(), CPU_USAGE_getCnt_z1(), CPU_USAGE_getDeltaCntAcc(), CPU_USAGE_getDeltaCntAccNum(), CPU_USAGE_getDeltaCntAccNumMax(), CPU_USAGE_getFlag_resetStats(), CPU_USAGE_getMaxDeltaCntObserved(), CPU_USAGE_getMinDeltaCntObserved(), CPU_USAGE_getTimerPeriod(), CPU_USAGE_setAvgDeltaCntObserved(), CPU_USAGE_setDeltaCnt(), CPU_USAGE_setDeltaCntAcc(), CPU_USAGE_setDeltaCntAccNum(), CPU_USAGE_setFlag_resetStats(), CPU_USAGE_setMaxDeltaCntObserved(), CPU_USAGE_setMinDeltaCntObserved(), _CPU_USAGE_Obj_::deltaCnt, _CPU_USAGE_Obj_::deltaCntAcc, _CPU_USAGE_Obj_::deltaCntAccNum, _CPU_USAGE_Obj_::deltaCntAccNumMax, _CPU_USAGE_Obj_::flag_resetStats, _CPU_USAGE_Obj_::maxDeltaCntObserved, and _CPU_USAGE_Obj_::minDeltaCntObserved.
|
inlinestatic |
Sets the average delta count observed, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | avgDeltaCnt | The average delta count observed, cnts |
Definition at line 307 of file cpu_usage.h.
References _CPU_USAGE_Obj_::avgDeltaCntObserved.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
|
inlinestatic |
Sets the current count value.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | cnt | The current count value |
Definition at line 216 of file cpu_usage.h.
References _CPU_USAGE_Obj_::cnt_z0.
Referenced by CPU_USAGE_setParams(), and CPU_USAGE_updateCnts().
|
inlinestatic |
Sets the previous count value.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | cnt | The previous count value |
Definition at line 229 of file cpu_usage.h.
References _CPU_USAGE_Obj_::cnt_z1.
Referenced by CPU_USAGE_setParams(), and CPU_USAGE_updateCnts().
|
inlinestatic |
Sets the delta count value.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | deltaCnt | The delta count value |
Definition at line 242 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCnt.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
|
inlinestatic |
Sets the accumulated delta counts value.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | deltaCntAcc | The accumulated delta counts value |
Definition at line 255 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCntAcc.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
|
inlinestatic |
Sets the number of accumulated delta counts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | deltaCntAccNum | The number of accumulated delta counts |
Definition at line 268 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCntAccNum.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
|
inlinestatic |
Sets the maximum number of accumulated delta counts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | deltaCntAccNumMax | The maximum number of accumulated delta counts |
Definition at line 281 of file cpu_usage.h.
References _CPU_USAGE_Obj_::deltaCntAccNumMax.
Referenced by CPU_USAGE_setParams().
|
inlinestatic |
Sets the state of the reset stats flag.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | state | The desired state |
Definition at line 333 of file cpu_usage.h.
References _CPU_USAGE_Obj_::flag_resetStats.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
|
inlinestatic |
Sets the maximum delta count observed, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | maxDeltaCnt | The maximum delta count observed, cnts |
Definition at line 320 of file cpu_usage.h.
References _CPU_USAGE_Obj_::maxDeltaCntObserved.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
|
inlinestatic |
Sets the minimum delta count observed, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | minDeltaCnt | The minimum delta count observed, cnts |
Definition at line 294 of file cpu_usage.h.
References _CPU_USAGE_Obj_::minDeltaCntObserved.
Referenced by CPU_USAGE_run(), and CPU_USAGE_setParams().
| void CPU_USAGE_setParams | ( | CPU_USAGE_Handle | handle, |
| const uint32_t | timerPeriod_cnts, | ||
| const uint32_t | numDeltaCntsAvg | ||
| ) |
Sets the CPU usage module parameters.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | timerPeriod_cnts | The timer period, cnts |
| [in] | numDeltaCntsAvg | The number of delta accumulations for the average calculation |
Definition at line 34 of file cpu_usage.c.
References CPU_USAGE_setAvgDeltaCntObserved(), CPU_USAGE_setCnt_z0(), CPU_USAGE_setCnt_z1(), CPU_USAGE_setDeltaCnt(), CPU_USAGE_setDeltaCntAcc(), CPU_USAGE_setDeltaCntAccNum(), CPU_USAGE_setDeltaCntAccNumMax(), CPU_USAGE_setFlag_resetStats(), CPU_USAGE_setMaxDeltaCntObserved(), CPU_USAGE_setMinDeltaCntObserved(), and CPU_USAGE_setTimerPeriod().
|
inlinestatic |
Sets the timer period, cnts.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | timerPeriod_cnts | The timer period, cnts |
Definition at line 203 of file cpu_usage.h.
References _CPU_USAGE_Obj_::timerPeriod_cnts.
Referenced by CPU_USAGE_setParams().
|
inlinestatic |
Updates the current and previous count values.
| [in] | handle | The CPU usage (CPU_USAGE) handle |
| [in] | timerCnt | The current count value |
Definition at line 448 of file cpu_usage.h.
References _CPU_USAGE_Obj_::cnt_z0, CPU_USAGE_getCnt_z0(), CPU_USAGE_setCnt_z0(), and CPU_USAGE_setCnt_z1().
1.8.9.1