XWOS API  4.0
XWOS C/C++ API参考手册
载入中...
搜索中...
未找到
XwsscPortProxy.hxx
浏览该文件的文档.
1
13#ifndef __xwmd_isc_xwssc_cxx_XwsscProxy_hxx__
14#define __xwmd_isc_xwssc_cxx_XwsscProxy_hxx__
15
16extern "C" {
17#include "xwmd/isc/xwssc/mif.h"
18}
19
20namespace xwisc {
21
33{
34 private:
35 struct xwssc * mProxy;
40 public:
41 XwsscPortProxy(struct xwssc * xwssc, xwu8_t port,
42 xwu8_t default_priority, xwu8_t default_qos);
43 XwsscPortProxy() = delete;
45
63 xwer_t write(const xwu8_t data[], xwsz_t * size);
64
84 xwer_t write(const xwu8_t data[], xwsz_t * size, xwu8_t pri, xwu8_t qos);
85
109 xwer_t write(const xwu8_t data[], xwsz_t * size, xwtm_t to);
110
136 xwer_t write(const xwu8_t data[], xwsz_t * size, xwu8_t pri, xwu8_t qos, xwtm_t to);
137
149 xwer_t asyncWrite(const xwu8_t data[], xwsz_t * size, xwssc_txh_t * txhbuf);
150
164 xwer_t asyncWrite(const xwu8_t data[], xwsz_t * size,
165 xwu8_t pri, xwu8_t qos, xwssc_txh_t * txhbuf);
166
182
192 }
193
209 xwer_t read(xwu8_t rxbuf[], xwsz_t * size);
210
232 xwer_t read(xwu8_t rxbuf[], xwsz_t * size, xwu8_t * qos, xwtm_t to);
233
249 xwer_t tryRead(xwu8_t rxbuf[], xwsz_t * size);
250
267 xwer_t tryRead(xwu8_t rxbuf[], xwsz_t * size, xwu8_t * qos);
268
269 protected:
270 virtual void onAsyncWrited(xwssc_txh_t txh, xwer_t rc);
271
272
273 private:
274 static void sOnAsyncWrited(struct xwssc * xwssc, xwssc_txh_t txh,
275 xwer_t rc, void * arg);
276};
277
282} // namespace xwisc
283
284#endif /* xwmd/isc/xwssc/cxx/XwsscPortProxy.hxx */
XWSSC端口代理
xwer_t asyncWrite(const xwu8_t data[], xwsz_t *size, xwssc_txh_t *txhbuf)
异步发送数据
enum xwssc_carrier_state_em getAsyncWriteState(xwssc_txh_t txh)
获取异步发送状态
xwer_t write(const xwu8_t data[], xwsz_t *size)
发送数据,并同步等待发送结果
xwer_t abortAsyncWrite(xwssc_txh_t txh)
中断异步发送
xwer_t read(xwu8_t rxbuf[], xwsz_t *size)
接收数据,若数据为空,就无限等待
static void sOnAsyncWrited(struct xwssc *xwssc, xwssc_txh_t txh, xwer_t rc, void *arg)
virtual void onAsyncWrited(xwssc_txh_t txh, xwer_t rc)
xwer_t tryRead(xwu8_t rxbuf[], xwsz_t *size)
尝试接收消息,若接收队列为空,立即返回错误码
xwssc_carrier_state_em
发送状态枚举
Definition mif.h:72
xwsq_t xwssc_get_txstate(xwssc_txh_t txh)
XWSSC API: 获取发送状态
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
uint8_t xwu8_t
Definition type.h:194
Definition Xwcq.hxx:20
包含待发送帧的发送器
Definition protocol.h:149
XWSSC对象
Definition protocol.h:160
SOC间点对点通讯协议:用户应用接口层