![]() |
botsense
3.2.0
RoadNarrows Client-Server Proxied Services Framework
|
BotSense bsProxy server - client raw I2C NetMsgs XML Definition. More...
#include "rnr/rnrconfig.h"
#include "rnr/netmsgs.h"
#include "rnr/i2c-dev.h"
#include "botsense/BotSense.h"
Go to the source code of this file.
Classes | |
struct | BsI2CReqRead_T |
struct | BsI2CReqTrans_T |
struct | BsI2CRspRead_T |
struct | BsI2CReqWrite_T |
struct | BsI2CRspWrite_T |
struct | BsI2CRspScan_T |
Macros | |
#define | BSI2C_REQTRANS_WRITEBUF_LEN (NMFVAL_LEN_MAX_VECTOR) |
#define | BSI2C_RSPREAD_READBUF_LEN (NMFVAL_LEN_MAX_VECTOR) |
#define | BSI2C_REQWRITE_WRITEBUF_LEN (NMFVAL_LEN_MAX_VECTOR) |
#define | BSI2C_RSPSCAN_SCAN_LEN (NMFVAL_LEN_MAX_VECTOR) |
Enumerations | |
enum | BsI2CMsgId_T { BsI2CMsgIdNone = 0, BsI2CMsgIdReqRead = 1, BsI2CMsgIdReqTrans = 2, BsI2CMsgIdRspRead = 3, BsI2CMsgIdReqWrite = 4, BsI2CMsgIdRspWrite = 5, BsI2CMsgIdReqScan = 6, BsI2CMsgIdRspScan = 7, BsI2CMsgIdNumOf = 8 } |
Functions | |
const NMMsgDef_T * | BsI2CLookupMsgDef (BsI2CMsgId_T eMsgId) |
Look up the message definition associated with the message id. More... | |
size_t | BsI2CLookupMsgMaxLen (BsI2CMsgId_T eMsgId) |
Look up the message maximum length associated with the message id. More... | |
int | BsI2CPackMsg (BsI2CMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a ITV message in big-endian byte order. More... | |
int | BsI2CUnpackMsg (BsI2CMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace) |
Unpack a ITV message in big-endian byte order. More... | |
INLINE_IN_H int | BsI2CPackReqRead (BsI2CReqRead_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a BsI2CReqRead ITV message in big-endian byte order into the output buffer. More... | |
INLINE_IN_H int | BsI2CUnpackReqRead (byte_t buf[], size_t uMsgLen, BsI2CReqRead_T *pStruct, bool_t bTrace) |
Unpack a BsI2CReqRead ITV message in big-endian byte order from the input buffer. More... | |
INLINE_IN_H int | BsI2CPackReqTrans (BsI2CReqTrans_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a BsI2CReqTrans ITV message in big-endian byte order into the output buffer. More... | |
INLINE_IN_H int | BsI2CUnpackReqTrans (byte_t buf[], size_t uMsgLen, BsI2CReqTrans_T *pStruct, bool_t bTrace) |
Unpack a BsI2CReqTrans ITV message in big-endian byte order from the input buffer. More... | |
INLINE_IN_H int | BsI2CPackRspRead (BsI2CRspRead_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a BsI2CRspRead ITV message in big-endian byte order into the output buffer. More... | |
INLINE_IN_H int | BsI2CUnpackRspRead (byte_t buf[], size_t uMsgLen, BsI2CRspRead_T *pStruct, bool_t bTrace) |
Unpack a BsI2CRspRead ITV message in big-endian byte order from the input buffer. More... | |
INLINE_IN_H int | BsI2CPackReqWrite (BsI2CReqWrite_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a BsI2CReqWrite ITV message in big-endian byte order into the output buffer. More... | |
INLINE_IN_H int | BsI2CUnpackReqWrite (byte_t buf[], size_t uMsgLen, BsI2CReqWrite_T *pStruct, bool_t bTrace) |
Unpack a BsI2CReqWrite ITV message in big-endian byte order from the input buffer. More... | |
INLINE_IN_H int | BsI2CPackRspWrite (BsI2CRspWrite_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a BsI2CRspWrite ITV message in big-endian byte order into the output buffer. More... | |
INLINE_IN_H int | BsI2CUnpackRspWrite (byte_t buf[], size_t uMsgLen, BsI2CRspWrite_T *pStruct, bool_t bTrace) |
Unpack a BsI2CRspWrite ITV message in big-endian byte order from the input buffer. More... | |
INLINE_IN_H int | BsI2CPackRspScan (BsI2CRspScan_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace) |
Pack a BsI2CRspScan ITV message in big-endian byte order into the output buffer. More... | |
INLINE_IN_H int | BsI2CUnpackRspScan (byte_t buf[], size_t uMsgLen, BsI2CRspScan_T *pStruct, bool_t bTrace) |
Unpack a BsI2CRspScan ITV message in big-endian byte order from the input buffer. More... | |
Variables | |
const NMMsgDef_T * | BsI2CMsgDefLookupTbl [] |
size_t | BsI2CMsgMaxLenLookupTbl [] |
BotSense bsProxy server - client raw I2C NetMsgs XML Definition.
Definition in file bsI2CMsgs.h.
#define BSI2C_REQTRANS_WRITEBUF_LEN (NMFVAL_LEN_MAX_VECTOR) |
ReqTrans writebuf maximum vector length
Definition at line 75 of file bsI2CMsgs.h.
Referenced by bsI2CReqTrans().
#define BSI2C_REQWRITE_WRITEBUF_LEN (NMFVAL_LEN_MAX_VECTOR) |
ReqWrite writebuf maximum vector length
Definition at line 127 of file bsI2CMsgs.h.
Referenced by bsI2CReqWrite().
#define BSI2C_RSPREAD_READBUF_LEN (NMFVAL_LEN_MAX_VECTOR) |
RspRead readbuf maximum vector length
Definition at line 102 of file bsI2CMsgs.h.
Referenced by bsI2CReqRead(), and bsI2CReqTrans().
#define BSI2C_RSPSCAN_SCAN_LEN (NMFVAL_LEN_MAX_VECTOR) |
RspScan scan maximum vector length
Definition at line 166 of file bsI2CMsgs.h.
Referenced by bsModI2CScanCallback().
enum BsI2CMsgId_T |
BsI2C Message Id Enumeration
Definition at line 37 of file bsI2CMsgs.h.
const NMMsgDef_T* BsI2CLookupMsgDef | ( | BsI2CMsgId_T | eMsgId | ) |
Look up the message definition associated with the message id.
eMsgId | Message Id. |
Definition at line 509 of file bsI2CMsgs.c.
References BsI2CMsgDefLookupTbl, and BsI2CMsgIdNumOf.
Referenced by bsI2CGetMsgName(), BsI2CPackMsg(), and BsI2CUnpackMsg().
size_t BsI2CLookupMsgMaxLen | ( | BsI2CMsgId_T | eMsgId | ) |
Look up the message maximum length associated with the message id.
The maximum length is the total number of packed bytes possible for the given message. The message may be much shorter.
eMsgId | Message Id. |
Definition at line 533 of file bsI2CMsgs.c.
References BsI2CMsgIdNumOf, and BsI2CMsgMaxLenLookupTbl.
int BsI2CPackMsg | ( | BsI2CMsgId_T | eMsgId, |
void * | pStruct, | ||
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a ITV message in big-endian byte order.
eMsgId | Message Id. | |
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 559 of file bsI2CMsgs.c.
References BsI2CLookupMsgDef().
Referenced by BsI2CPackReqRead(), BsI2CPackReqTrans(), BsI2CPackReqWrite(), BsI2CPackRspRead(), BsI2CPackRspScan(), and BsI2CPackRspWrite().
INLINE_IN_H int BsI2CPackReqRead | ( | BsI2CReqRead_T * | pStruct, |
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a BsI2CReqRead ITV message in big-endian byte order into the output buffer.
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 237 of file bsI2CMsgs.h.
References BsI2CMsgIdReqRead, and BsI2CPackMsg().
Referenced by bsI2CReqRead().
INLINE_IN_H int BsI2CPackReqTrans | ( | BsI2CReqTrans_T * | pStruct, |
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a BsI2CReqTrans ITV message in big-endian byte order into the output buffer.
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 280 of file bsI2CMsgs.h.
References BsI2CMsgIdReqTrans, and BsI2CPackMsg().
Referenced by bsI2CReqTrans().
INLINE_IN_H int BsI2CPackReqWrite | ( | BsI2CReqWrite_T * | pStruct, |
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a BsI2CReqWrite ITV message in big-endian byte order into the output buffer.
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 366 of file bsI2CMsgs.h.
References BsI2CMsgIdReqWrite, and BsI2CPackMsg().
Referenced by bsI2CReqWrite().
INLINE_IN_H int BsI2CPackRspRead | ( | BsI2CRspRead_T * | pStruct, |
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a BsI2CRspRead ITV message in big-endian byte order into the output buffer.
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 323 of file bsI2CMsgs.h.
References BsI2CMsgIdRspRead, and BsI2CPackMsg().
Referenced by bsModI2CReqRead(), and bsModI2CReqTrans().
INLINE_IN_H int BsI2CPackRspScan | ( | BsI2CRspScan_T * | pStruct, |
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a BsI2CRspScan ITV message in big-endian byte order into the output buffer.
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 452 of file bsI2CMsgs.h.
References BsI2CMsgIdRspScan, and BsI2CPackMsg().
Referenced by bsModI2CReqScan().
INLINE_IN_H int BsI2CPackRspWrite | ( | BsI2CRspWrite_T * | pStruct, |
byte_t | buf[], | ||
size_t | bufSize, | ||
bool_t | bTrace | ||
) |
Pack a BsI2CRspWrite ITV message in big-endian byte order into the output buffer.
[in] | pStruct | Pointer to the associated, populated message structure. |
[out] | buf | Output message buffer. |
bufSize | Size of output buffer. | |
bTrace | Do [not] trace packing. |
Definition at line 409 of file bsI2CMsgs.h.
References BsI2CMsgIdRspWrite, and BsI2CPackMsg().
Referenced by bsModI2CReqWrite().
int BsI2CUnpackMsg | ( | BsI2CMsgId_T | eMsgId, |
byte_t | buf[], | ||
size_t | uMsgLen, | ||
void * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a ITV message in big-endian byte order.
eMsgId | Message Id. | |
[in] | buf | Input message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 597 of file bsI2CMsgs.c.
References BsI2CLookupMsgDef().
Referenced by BsI2CUnpackReqRead(), BsI2CUnpackReqTrans(), BsI2CUnpackReqWrite(), BsI2CUnpackRspRead(), BsI2CUnpackRspScan(), and BsI2CUnpackRspWrite().
INLINE_IN_H int BsI2CUnpackReqRead | ( | byte_t | buf[], |
size_t | uMsgLen, | ||
BsI2CReqRead_T * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a BsI2CReqRead ITV message in big-endian byte order from the input buffer.
[in] | buf | Output message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 258 of file bsI2CMsgs.h.
References BsI2CMsgIdReqRead, and BsI2CUnpackMsg().
Referenced by bsModI2CReqRead().
INLINE_IN_H int BsI2CUnpackReqTrans | ( | byte_t | buf[], |
size_t | uMsgLen, | ||
BsI2CReqTrans_T * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a BsI2CReqTrans ITV message in big-endian byte order from the input buffer.
[in] | buf | Output message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 301 of file bsI2CMsgs.h.
References BsI2CMsgIdReqTrans, and BsI2CUnpackMsg().
Referenced by bsModI2CReqTrans().
INLINE_IN_H int BsI2CUnpackReqWrite | ( | byte_t | buf[], |
size_t | uMsgLen, | ||
BsI2CReqWrite_T * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a BsI2CReqWrite ITV message in big-endian byte order from the input buffer.
[in] | buf | Output message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 387 of file bsI2CMsgs.h.
References BsI2CMsgIdReqWrite, and BsI2CUnpackMsg().
Referenced by bsModI2CReqWrite().
INLINE_IN_H int BsI2CUnpackRspRead | ( | byte_t | buf[], |
size_t | uMsgLen, | ||
BsI2CRspRead_T * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a BsI2CRspRead ITV message in big-endian byte order from the input buffer.
[in] | buf | Output message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 344 of file bsI2CMsgs.h.
References BsI2CMsgIdRspRead, and BsI2CUnpackMsg().
Referenced by bsI2CReqRead(), and bsI2CReqTrans().
INLINE_IN_H int BsI2CUnpackRspScan | ( | byte_t | buf[], |
size_t | uMsgLen, | ||
BsI2CRspScan_T * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a BsI2CRspScan ITV message in big-endian byte order from the input buffer.
[in] | buf | Output message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 473 of file bsI2CMsgs.h.
References BsI2CMsgIdRspScan, and BsI2CUnpackMsg().
Referenced by bsI2CReqScan().
INLINE_IN_H int BsI2CUnpackRspWrite | ( | byte_t | buf[], |
size_t | uMsgLen, | ||
BsI2CRspWrite_T * | pStruct, | ||
bool_t | bTrace | ||
) |
Unpack a BsI2CRspWrite ITV message in big-endian byte order from the input buffer.
[in] | buf | Output message buffer. |
uMsgLen | Length of message (bytes) in input buffer. | |
[out] | pStruct | Pointer to the associated message structure. |
bTrace | Do [not] trace packing. |
Definition at line 430 of file bsI2CMsgs.h.
References BsI2CMsgIdRspWrite, and BsI2CUnpackMsg().
Referenced by bsI2CReqWrite().
const NMMsgDef_T* BsI2CMsgDefLookupTbl[] |
BsI2C Message Definition Look-Up Table. Indexed by BsI2CMsgId_T enum.
Definition at line 466 of file bsI2CMsgs.c.
Referenced by BsI2CLookupMsgDef().
size_t BsI2CMsgMaxLenLookupTbl[] |
BsI2C Message Maximum Size Look-Up Table. Indexed by BsI2CMsgId_T enum.
Definition at line 482 of file bsI2CMsgs.c.
Referenced by BsI2CLookupMsgMaxLen().