XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
SSwt.hxx
浏览该文件的文档.
1
13#ifndef __xwos_cxx_SSwt_hxx__
14#define __xwos_cxx_SSwt_hxx__
15
16#include <xwos/osal/swt.hxx>
17
18namespace xwos {
19
37class SSwt
38{
39 private:
40 struct xwos_swt mSwt;
43 public:
49 ~SSwt();
50 xwer_t getCtorRc() { return mCtorRc; }
56 xwer_t start(xwtm_t origin, xwtm_t period) {
57 return xwos_swt_start(&mSwt, origin, period,
59 }
60 xwer_t stop() { return xwos_swt_stop(&mSwt); }
61 struct xwos_swt * getXwosObj() { return &mSwt; }
63 /* 生命周期管理 */
64 xwer_t grab() { return xwos_swt_grab(&mSwt); }
65 xwer_t put() { return xwos_swt_put(&mSwt); }
67 protected:
68 virtual void swtAlarmFunction();
70 private:
71 static void sSwtAlarmFunction(struct xwos_swt * swt, SSwt * obj);
72 static void * operator new(xwsz_t sz) = delete;
73 void operator delete(void * obj) = delete;
74};
75
80} // namespace xwos
81
82#endif /* xwos/cxx/SSwt.hxx */
静态软件定时器
Definition SSwt.hxx:38
xwer_t put()
Definition SSwt.hxx:65
xwer_t getCtorRc()
Definition SSwt.hxx:50
virtual void swtAlarmFunction()
Definition SSwt.cxx:27
xwer_t mCtorRc
Definition SSwt.hxx:41
static void sSwtAlarmFunction(struct xwos_swt *swt, SSwt *obj)
Definition SSwt.cxx:32
struct xwos_swt mSwt
Definition SSwt.hxx:40
xwer_t grab()
Definition SSwt.hxx:64
xwer_t stop()
Definition SSwt.hxx:60
struct xwos_swt * getXwosObj()
Definition SSwt.hxx:61
xwer_t start(xwtm_t origin, xwtm_t period)
启动软件定时器
Definition SSwt.hxx:56
xws64_t xwtm_t
XWOS系统时间 (有符号)
Definition type.h:742
signed long xwer_t
Definition type.h:554
unsigned long xwsz_t
Definition type.h:339
unsigned long xwsq_t
Definition type.h:445
static xwer_t xwos_swt_put(struct xwos_swt *swt)
XWOS API:减少软件定时器对象的引用计数
Definition swt.h:173
#define XWOS_SWT_FLAG_NULL
XWOS API:软件定时器标志 —— 无标志(默认标志)
Definition swt.h:98
static xwer_t xwos_swt_start(struct xwos_swt *swt, xwtm_t origin, xwtm_t period, xwos_swt_f callback, void *arg)
XWOS API:启动软件定时器
Definition swt.h:284
static xwer_t xwos_swt_stop(struct xwos_swt *swt)
XWOS API:停止软件定时器
Definition swt.h:301
void(* xwos_swt_f)(struct xwos_swt *, void *)
XWOS API:软件定时器回调函数指针类型
Definition swt.h:80
static xwer_t xwos_swt_grab(struct xwos_swt *swt)
XWOS API:增加软件定时器对象的引用计数
Definition swt.h:154
Definition Cpu.hxx:19
XWOS API:软件定时器
Definition swt.h:73
C++操作系统抽象层:软件定时器