libxr 1.0
Want to be the best embedded framework
Loading...
Searching...
No Matches
LibXR::Timer::ControlBlock Class Reference

控制块类,存储任务信息 Control block class for storing task information More...

#include <timer.hpp>

Public Member Functions

void Run ()
 运行定时任务 Runs the scheduled task
 

Data Fields

void(* fun_ )(void *)
 任务执行函数 Function pointer to the task
 
voidhandle
 任务句柄 Handle to the task
 
uint32_t cycle_
 任务周期(单位:毫秒) Task cycle (unit: milliseconds)
 
uint32_t count_
 计数器 Counter
 
bool enable_
 任务是否启用 Flag indicating whether the task is enabled
 

Detailed Description

控制块类,存储任务信息 Control block class for storing task information

Definition at line 33 of file timer.hpp.

Member Function Documentation

◆ Run()

void LibXR::Timer::ControlBlock::Run ( )
inline

运行定时任务 Runs the scheduled task

Definition at line 40 of file timer.hpp.

40{ fun_(handle); }
void * handle
任务句柄 Handle to the task
Definition timer.hpp:43
void(* fun_)(void *)
任务执行函数 Function pointer to the task
Definition timer.hpp:42

Field Documentation

◆ count_

uint32_t LibXR::Timer::ControlBlock::count_

计数器 Counter

Definition at line 45 of file timer.hpp.

◆ cycle_

uint32_t LibXR::Timer::ControlBlock::cycle_

任务周期(单位:毫秒) Task cycle (unit: milliseconds)

Definition at line 44 of file timer.hpp.

◆ enable_

bool LibXR::Timer::ControlBlock::enable_

任务是否启用 Flag indicating whether the task is enabled

Definition at line 46 of file timer.hpp.

◆ fun_

void(* LibXR::Timer::ControlBlock::fun_) (void *)

任务执行函数 Function pointer to the task

Definition at line 42 of file timer.hpp.

◆ handle

void* LibXR::Timer::ControlBlock::handle

任务句柄 Handle to the task

Definition at line 43 of file timer.hpp.


The documentation for this class was generated from the following file: