![]() |
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/log.h"
#include "rnr/netmsgs.h"
#include "botsense/bsI2CMsgs.h"
Go to the source code of this file.
Macros | |
#define | EOFDEF {NULL, 0, NMFTypeNone, 0, } |
Enumerations | |
enum | BsI2CReqReadFId_T { BsI2CReqReadFIdReserved = 0, BsI2CReqReadFIdaddr = 1, BsI2CReqReadFIdreadlen = 2, BsI2CReqReadFIdNumOf = 3 } |
enum | BsI2CReqTransFId_T { BsI2CReqTransFIdReserved = 0, BsI2CReqTransFIdaddr = 1, BsI2CReqTransFIdwritebuf = 2, BsI2CReqTransFIdreadlen = 3, BsI2CReqTransFIdNumOf = 4 } |
enum | BsI2CRspReadFId_T { BsI2CRspReadFIdReserved = 0, BsI2CRspReadFIdreadbuf = 1, BsI2CRspReadFIdNumOf = 2 } |
enum | BsI2CReqWriteFId_T { BsI2CReqWriteFIdReserved = 0, BsI2CReqWriteFIdaddr = 1, BsI2CReqWriteFIdwritebuf = 2, BsI2CReqWriteFIdNumOf = 3 } |
enum | BsI2CRspWriteFId_T { BsI2CRspWriteFIdReserved = 0, BsI2CRspWriteFIdbyteswritten = 1, BsI2CRspWriteFIdNumOf = 2 } |
enum | BsI2CReqScanFId_T { BsI2CReqScanFIdReserved = 0, BsI2CReqScanFIdNumOf = 1 } |
enum | BsI2CRspScanFId_T { BsI2CRspScanFIdReserved = 0, BsI2CRspScanFIdscan = 1, BsI2CRspScanFIdNumOf = 2 } |
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... | |
Variables | |
static const NMFieldDef_T | BsI2CReqReadFieldDefs [] |
static const NMMsgDef_T | BsI2CReqReadMsgDef |
static const NMFieldDef_T | BsI2CReqTranswritebufFieldDef [] |
static const NMFieldDef_T | BsI2CReqTransFieldDefs [] |
static const NMMsgDef_T | BsI2CReqTransMsgDef |
static const NMFieldDef_T | BsI2CRspReadreadbufFieldDef [] |
static const NMFieldDef_T | BsI2CRspReadFieldDefs [] |
static const NMMsgDef_T | BsI2CRspReadMsgDef |
static const NMFieldDef_T | BsI2CReqWritewritebufFieldDef [] |
static const NMFieldDef_T | BsI2CReqWriteFieldDefs [] |
static const NMMsgDef_T | BsI2CReqWriteMsgDef |
static const NMFieldDef_T | BsI2CRspWriteFieldDefs [] |
static const NMMsgDef_T | BsI2CRspWriteMsgDef |
static const NMFieldDef_T | BsI2CReqScanFieldDefs [] |
static const NMMsgDef_T | BsI2CReqScanMsgDef |
static const NMFieldDef_T | BsI2CRspScanscanFieldDef [] |
static const NMFieldDef_T | BsI2CRspScanFieldDefs [] |
static const NMMsgDef_T | BsI2CRspScanMsgDef |
const NMMsgDef_T * | BsI2CMsgDefLookupTbl [] |
size_t | BsI2CMsgMaxLenLookupTbl [] |
BotSense bsProxy server - client raw I2C NetMsgs XML Definition.
Definition in file bsI2CMsgs.c.
#define EOFDEF {NULL, 0, NMFTypeNone, 0, } |
End of Field Definition entry.
Definition at line 29 of file bsI2CMsgs.c.
enum BsI2CReqReadFId_T |
BsI2CReqRead Field Id Enumeration
Enumerator | |
---|---|
BsI2CReqReadFIdReserved |
reserved field id |
BsI2CReqReadFIdaddr |
addr field id |
BsI2CReqReadFIdreadlen |
readlen field id |
BsI2CReqReadFIdNumOf |
number of fields |
Definition at line 45 of file bsI2CMsgs.c.
enum BsI2CReqScanFId_T |
BsI2CReqScan Field Id Enumeration
Enumerator | |
---|---|
BsI2CReqScanFIdReserved |
reserved field id |
BsI2CReqScanFIdNumOf |
number of fields |
Definition at line 369 of file bsI2CMsgs.c.
enum BsI2CReqTransFId_T |
BsI2CReqTrans Field Id Enumeration
Definition at line 118 of file bsI2CMsgs.c.
enum BsI2CReqWriteFId_T |
BsI2CReqWrite Field Id Enumeration
Enumerator | |
---|---|
BsI2CReqWriteFIdReserved |
reserved field id |
BsI2CReqWriteFIdaddr |
addr field id |
BsI2CReqWriteFIdwritebuf |
writebuf field id |
BsI2CReqWriteFIdNumOf |
number of fields |
Definition at line 268 of file bsI2CMsgs.c.
enum BsI2CRspReadFId_T |
BsI2CRspRead Field Id Enumeration
Enumerator | |
---|---|
BsI2CRspReadFIdReserved |
reserved field id |
BsI2CRspReadFIdreadbuf |
readbuf field id |
BsI2CRspReadFIdNumOf |
number of fields |
Definition at line 204 of file bsI2CMsgs.c.
enum BsI2CRspScanFId_T |
BsI2CRspScan Field Id Enumeration
Enumerator | |
---|---|
BsI2CRspScanFIdReserved |
reserved field id |
BsI2CRspScanFIdscan |
scan field id |
BsI2CRspScanFIdNumOf |
number of fields |
Definition at line 420 of file bsI2CMsgs.c.
enum BsI2CRspWriteFId_T |
BsI2CRspWrite Field Id Enumeration
Enumerator | |
---|---|
BsI2CRspWriteFIdReserved |
reserved field id |
BsI2CRspWriteFIdbyteswritten |
byteswritten field id |
BsI2CRspWriteFIdNumOf |
number of fields |
Definition at line 325 of file bsI2CMsgs.c.
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().
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().
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().
|
static |
BsI2CReqRead Field Definitions
Definition at line 56 of file bsI2CMsgs.c.
|
static |
BsI2CReqRead Message Definition
Definition at line 84 of file bsI2CMsgs.c.
|
static |
BsI2CReqScan Field Definitions
Definition at line 378 of file bsI2CMsgs.c.
|
static |
BsI2CReqScan Message Definition
Definition at line 386 of file bsI2CMsgs.c.
|
static |
BsI2CReqTrans Field Definitions
Definition at line 130 of file bsI2CMsgs.c.
|
static |
BsI2CReqTrans Message Definition
Definition at line 170 of file bsI2CMsgs.c.
|
static |
BsI2CReqTranswritebuf Field Definitions
Definition at line 100 of file bsI2CMsgs.c.
|
static |
BsI2CReqWrite Field Definitions
Definition at line 279 of file bsI2CMsgs.c.
|
static |
BsI2CReqWrite Message Definition
Definition at line 309 of file bsI2CMsgs.c.
|
static |
BsI2CReqWritewritebuf Field Definitions
Definition at line 250 of file bsI2CMsgs.c.
|
static |
BsI2CRspRead Field Definitions
Definition at line 214 of file bsI2CMsgs.c.
|
static |
BsI2CRspRead Message Definition
Definition at line 234 of file bsI2CMsgs.c.
|
static |
BsI2CRspReadreadbuf Field Definitions
Definition at line 186 of file bsI2CMsgs.c.
|
static |
BsI2CRspScan Field Definitions
Definition at line 430 of file bsI2CMsgs.c.
|
static |
BsI2CRspScan Message Definition
Definition at line 450 of file bsI2CMsgs.c.
|
static |
BsI2CRspScanscan Field Definitions
Definition at line 402 of file bsI2CMsgs.c.
|
static |
BsI2CRspWrite Field Definitions
Definition at line 335 of file bsI2CMsgs.c.
|
static |
BsI2CRspWrite Message Definition
Definition at line 353 of file bsI2CMsgs.c.