botsense  3.2.0
RoadNarrows Client-Server Proxied Services Framework
bsSerialMsgs.h File Reference

BotSense bsProxy server - client raw serial NetMsgs XML Definition. More...

#include "rnr/rnrconfig.h"
#include "rnr/netmsgs.h"
#include "botsense/BotSense.h"

Go to the source code of this file.

Classes

struct  BsSerialReqOpenArgs_T
 
struct  BsSerialReqRead_T
 
struct  BsSerialReqTrans_T
 
struct  BsSerialRspRead_T
 
struct  BsSerialReqWrite_T
 
struct  BsSerialRspWrite_T
 

Macros

#define BSSERIAL_REQTRANS_WRITEBUF_LEN   (NMFVAL_LEN_MAX_VECTOR)
 
#define BSSERIAL_RSPREAD_READBUF_LEN   (NMFVAL_LEN_MAX_VECTOR)
 
#define BSSERIAL_REQWRITE_WRITEBUF_LEN   (NMFVAL_LEN_MAX_VECTOR)
 

Enumerations

enum  BsSerialMsgId_T {
  BsSerialMsgIdNone = 0,
  BsSerialMsgIdReqOpenArgs = 1,
  BsSerialMsgIdReqRead = 2,
  BsSerialMsgIdReqTrans = 3,
  BsSerialMsgIdRspRead = 4,
  BsSerialMsgIdReqWrite = 5,
  BsSerialMsgIdRspWrite = 6,
  BsSerialMsgIdNumOf = 7
}
 

Functions

const NMMsgDef_T * BsSerialLookupMsgDef (BsSerialMsgId_T eMsgId)
 Look up the message definition associated with the message id. More...
 
size_t BsSerialLookupMsgMaxLen (BsSerialMsgId_T eMsgId)
 Look up the message maximum length associated with the message id. More...
 
int BsSerialPackMsg (BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a ITV message in big-endian byte order. More...
 
int BsSerialUnpackMsg (BsSerialMsgId_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 BsSerialPackReqOpenArgs (BsSerialReqOpenArgs_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a BsSerialReqOpenArgs ITV message in big-endian byte order into the output buffer. More...
 
INLINE_IN_H int BsSerialUnpackReqOpenArgs (byte_t buf[], size_t uMsgLen, BsSerialReqOpenArgs_T *pStruct, bool_t bTrace)
 Unpack a BsSerialReqOpenArgs ITV message in big-endian byte order from the input buffer. More...
 
INLINE_IN_H int BsSerialPackReqRead (BsSerialReqRead_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a BsSerialReqRead ITV message in big-endian byte order into the output buffer. More...
 
INLINE_IN_H int BsSerialUnpackReqRead (byte_t buf[], size_t uMsgLen, BsSerialReqRead_T *pStruct, bool_t bTrace)
 Unpack a BsSerialReqRead ITV message in big-endian byte order from the input buffer. More...
 
INLINE_IN_H int BsSerialPackReqTrans (BsSerialReqTrans_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a BsSerialReqTrans ITV message in big-endian byte order into the output buffer. More...
 
INLINE_IN_H int BsSerialUnpackReqTrans (byte_t buf[], size_t uMsgLen, BsSerialReqTrans_T *pStruct, bool_t bTrace)
 Unpack a BsSerialReqTrans ITV message in big-endian byte order from the input buffer. More...
 
INLINE_IN_H int BsSerialPackRspRead (BsSerialRspRead_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a BsSerialRspRead ITV message in big-endian byte order into the output buffer. More...
 
INLINE_IN_H int BsSerialUnpackRspRead (byte_t buf[], size_t uMsgLen, BsSerialRspRead_T *pStruct, bool_t bTrace)
 Unpack a BsSerialRspRead ITV message in big-endian byte order from the input buffer. More...
 
INLINE_IN_H int BsSerialPackReqWrite (BsSerialReqWrite_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a BsSerialReqWrite ITV message in big-endian byte order into the output buffer. More...
 
INLINE_IN_H int BsSerialUnpackReqWrite (byte_t buf[], size_t uMsgLen, BsSerialReqWrite_T *pStruct, bool_t bTrace)
 Unpack a BsSerialReqWrite ITV message in big-endian byte order from the input buffer. More...
 
INLINE_IN_H int BsSerialPackRspWrite (BsSerialRspWrite_T *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
 Pack a BsSerialRspWrite ITV message in big-endian byte order into the output buffer. More...
 
INLINE_IN_H int BsSerialUnpackRspWrite (byte_t buf[], size_t uMsgLen, BsSerialRspWrite_T *pStruct, bool_t bTrace)
 Unpack a BsSerialRspWrite ITV message in big-endian byte order from the input buffer. More...
 

Variables

const NMMsgDef_T * BsSerialMsgDefLookupTbl []
 
size_t BsSerialMsgMaxLenLookupTbl []
 

Detailed Description

BotSense bsProxy server - client raw serial NetMsgs XML Definition.

Warning
This file was auto-generated on 2018.08.10 13:54:23 from the NetMsgs XML specification bsSerialMsgs.xml.
Copyright:
(C) 2018. RoadNarrows LLC (http://www.roadnarrows.com) All Rights Reserved

Definition in file bsSerialMsgs.h.

Macro Definition Documentation

#define BSSERIAL_REQTRANS_WRITEBUF_LEN   (NMFVAL_LEN_MAX_VECTOR)

ReqTrans writebuf maximum vector length

Definition at line 89 of file bsSerialMsgs.h.

Referenced by bsSerialReqTrans().

#define BSSERIAL_REQWRITE_WRITEBUF_LEN   (NMFVAL_LEN_MAX_VECTOR)

ReqWrite writebuf maximum vector length

Definition at line 140 of file bsSerialMsgs.h.

Referenced by bsSerialReqWrite().

#define BSSERIAL_RSPREAD_READBUF_LEN   (NMFVAL_LEN_MAX_VECTOR)

RspRead readbuf maximum vector length

Definition at line 115 of file bsSerialMsgs.h.

Referenced by bsSerialReqRead(), and bsSerialReqTrans().

Enumeration Type Documentation

BsSerial Message Id Enumeration

Enumerator
BsSerialMsgIdNone 

no message

BsSerialMsgIdReqOpenArgs 

ReqOpenArgs.

BsSerialMsgIdReqRead 

ReqRead.

BsSerialMsgIdReqTrans 

ReqTrans.

BsSerialMsgIdRspRead 

RspRead.

BsSerialMsgIdReqWrite 

ReqWrite.

BsSerialMsgIdRspWrite 

RspWrite.

BsSerialMsgIdNumOf 

number of message ids

Definition at line 35 of file bsSerialMsgs.h.

36 {
37  BsSerialMsgIdNone = 0, ///< no message
38  BsSerialMsgIdReqOpenArgs = 1, ///< ReqOpenArgs
39  BsSerialMsgIdReqRead = 2, ///< ReqRead
40  BsSerialMsgIdReqTrans = 3, ///< ReqTrans
41  BsSerialMsgIdRspRead = 4, ///< RspRead
42  BsSerialMsgIdReqWrite = 5, ///< ReqWrite
43  BsSerialMsgIdRspWrite = 6, ///< RspWrite
44  BsSerialMsgIdNumOf = 7 ///< number of message ids
BsSerialMsgId_T
Definition: bsSerialMsgs.h:35
no message
Definition: bsSerialMsgs.h:37
number of message ids
Definition: bsSerialMsgs.h:44

Function Documentation

const NMMsgDef_T* BsSerialLookupMsgDef ( BsSerialMsgId_T  eMsgId)

Look up the message definition associated with the message id.

Parameters
eMsgIdMessage Id.
Returns
On success, returns the pointer to the NMMsgDef_T. On error, NULL is returned.

Definition at line 464 of file bsSerialMsgs.c.

References BsSerialMsgDefLookupTbl, and BsSerialMsgIdNumOf.

Referenced by bsSerialGetMsgName(), BsSerialPackMsg(), and BsSerialUnpackMsg().

465 {
466  if( (uint_t)eMsgId >= (uint_t)BsSerialMsgIdNumOf )
467  {
468  return NULL;
469  }
470  else
471  {
472  return BsSerialMsgDefLookupTbl[(uint_t)eMsgId];
473  }
474 }
const NMMsgDef_T * BsSerialMsgDefLookupTbl[]
Definition: bsSerialMsgs.c:423
number of message ids
Definition: bsSerialMsgs.h:44
size_t BsSerialLookupMsgMaxLen ( BsSerialMsgId_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.

Parameters
eMsgIdMessage Id.
Returns
On success, returns the number of bytes. On error, 0 is returned.

Definition at line 488 of file bsSerialMsgs.c.

References BsSerialMsgIdNumOf, and BsSerialMsgMaxLenLookupTbl.

489 {
490  if( (uint_t)eMsgId >= (uint_t)BsSerialMsgIdNumOf )
491  {
492  return (size_t)0;
493  }
494  else
495  {
496  return BsSerialMsgMaxLenLookupTbl[(uint_t)eMsgId];
497  }
498 }
size_t BsSerialMsgMaxLenLookupTbl[]
Definition: bsSerialMsgs.c:438
number of message ids
Definition: bsSerialMsgs.h:44
int BsSerialPackMsg ( BsSerialMsgId_T  eMsgId,
void *  pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a ITV message in big-endian byte order.

Parameters
eMsgIdMessage Id.
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 514 of file bsSerialMsgs.c.

References BsSerialLookupMsgDef().

Referenced by BsSerialPackReqOpenArgs(), BsSerialPackReqRead(), BsSerialPackReqTrans(), BsSerialPackReqWrite(), BsSerialPackRspRead(), and BsSerialPackRspWrite().

519 {
520  const NMMsgDef_T *pMsgDef;
521 
522  if( (pMsgDef = BsSerialLookupMsgDef(eMsgId)) == NULL )
523  {
524  LOGERROR("%s(ecode=%d): msgid=%u.",
525  nmStrError(NM_ECODE_MSGID), NM_ECODE_MSGID, eMsgId);
526  return -NM_ECODE_MSGID;
527  }
528 
529  if( bTrace )
530  {
531  return nmPackITVMsgDebug(pMsgDef, pStruct, buf, bufSize, NMEndianBig);
532  }
533  else
534  {
535  return nmPackITVMsg(pMsgDef, pStruct, buf, bufSize, NMEndianBig);
536  }
537 }
const NMMsgDef_T * BsSerialLookupMsgDef(BsSerialMsgId_T eMsgId)
Look up the message definition associated with the message id.
Definition: bsSerialMsgs.c:464
INLINE_IN_H int BsSerialPackReqOpenArgs ( BsSerialReqOpenArgs_T pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a BsSerialReqOpenArgs ITV message in big-endian byte order into the output buffer.

Parameters
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 224 of file bsSerialMsgs.h.

References BsSerialMsgIdReqOpenArgs, and BsSerialPackMsg().

Referenced by bsSerialReqOpen().

228 {
229  return BsSerialPackMsg(BsSerialMsgIdReqOpenArgs, pStruct, buf, bufSize, bTrace);
230 }
int BsSerialPackMsg(BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:514
INLINE_IN_H int BsSerialPackReqRead ( BsSerialReqRead_T pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a BsSerialReqRead ITV message in big-endian byte order into the output buffer.

Parameters
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 267 of file bsSerialMsgs.h.

References BsSerialMsgIdReqRead, and BsSerialPackMsg().

Referenced by bsSerialReqRead().

271 {
272  return BsSerialPackMsg(BsSerialMsgIdReqRead, pStruct, buf, bufSize, bTrace);
273 }
int BsSerialPackMsg(BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:514
INLINE_IN_H int BsSerialPackReqTrans ( BsSerialReqTrans_T pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a BsSerialReqTrans ITV message in big-endian byte order into the output buffer.

Parameters
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 310 of file bsSerialMsgs.h.

References BsSerialMsgIdReqTrans, and BsSerialPackMsg().

Referenced by bsSerialReqTrans().

314 {
315  return BsSerialPackMsg(BsSerialMsgIdReqTrans, pStruct, buf, bufSize, bTrace);
316 }
int BsSerialPackMsg(BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:514
INLINE_IN_H int BsSerialPackReqWrite ( BsSerialReqWrite_T pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a BsSerialReqWrite ITV message in big-endian byte order into the output buffer.

Parameters
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 396 of file bsSerialMsgs.h.

References BsSerialMsgIdReqWrite, and BsSerialPackMsg().

Referenced by bsSerialReqWrite().

400 {
401  return BsSerialPackMsg(BsSerialMsgIdReqWrite, pStruct, buf, bufSize, bTrace);
402 }
int BsSerialPackMsg(BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:514
INLINE_IN_H int BsSerialPackRspRead ( BsSerialRspRead_T pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a BsSerialRspRead ITV message in big-endian byte order into the output buffer.

Parameters
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 353 of file bsSerialMsgs.h.

References BsSerialMsgIdRspRead, and BsSerialPackMsg().

Referenced by bsModSerialReqRead(), and bsModSerialReqTrans().

357 {
358  return BsSerialPackMsg(BsSerialMsgIdRspRead, pStruct, buf, bufSize, bTrace);
359 }
int BsSerialPackMsg(BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:514
INLINE_IN_H int BsSerialPackRspWrite ( BsSerialRspWrite_T pStruct,
byte_t  buf[],
size_t  bufSize,
bool_t  bTrace 
)

Pack a BsSerialRspWrite ITV message in big-endian byte order into the output buffer.

Parameters
[in]pStructPointer to the associated, populated message structure.
[out]bufOutput message buffer.
bufSizeSize of output buffer.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes packed. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 439 of file bsSerialMsgs.h.

References BsSerialMsgIdRspWrite, and BsSerialPackMsg().

Referenced by bsModSerialReqWrite().

443 {
444  return BsSerialPackMsg(BsSerialMsgIdRspWrite, pStruct, buf, bufSize, bTrace);
445 }
int BsSerialPackMsg(BsSerialMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:514
int BsSerialUnpackMsg ( BsSerialMsgId_T  eMsgId,
byte_t  buf[],
size_t  uMsgLen,
void *  pStruct,
bool_t  bTrace 
)

Unpack a ITV message in big-endian byte order.

Parameters
eMsgIdMessage Id.
[in]bufInput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 552 of file bsSerialMsgs.c.

References BsSerialLookupMsgDef().

Referenced by BsSerialUnpackReqOpenArgs(), BsSerialUnpackReqRead(), BsSerialUnpackReqTrans(), BsSerialUnpackReqWrite(), BsSerialUnpackRspRead(), and BsSerialUnpackRspWrite().

557 {
558  const NMMsgDef_T *pMsgDef;
559 
560  if( (pMsgDef = BsSerialLookupMsgDef(eMsgId)) == NULL )
561  {
562  LOGERROR("%s(ecode=%d): msgid=%u.",
563  nmStrError(NM_ECODE_MSGID), NM_ECODE_MSGID, eMsgId);
564  return -NM_ECODE_MSGID;
565  }
566 
567  if( bTrace )
568  {
569  return nmUnpackITVMsgDebug(pMsgDef, buf, uMsgLen, pStruct, NMEndianBig);
570  }
571  else
572  {
573  return nmUnpackITVMsg(pMsgDef, buf, uMsgLen, pStruct, NMEndianBig);
574  }
575 }
const NMMsgDef_T * BsSerialLookupMsgDef(BsSerialMsgId_T eMsgId)
Look up the message definition associated with the message id.
Definition: bsSerialMsgs.c:464
INLINE_IN_H int BsSerialUnpackReqOpenArgs ( byte_t  buf[],
size_t  uMsgLen,
BsSerialReqOpenArgs_T pStruct,
bool_t  bTrace 
)

Unpack a BsSerialReqOpenArgs ITV message in big-endian byte order from the input buffer.

Parameters
[in]bufOutput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 245 of file bsSerialMsgs.h.

References BsSerialMsgIdReqOpenArgs, and BsSerialUnpackMsg().

Referenced by bsModOpen().

249 {
250  return BsSerialUnpackMsg(BsSerialMsgIdReqOpenArgs, buf, uMsgLen, pStruct, bTrace);
251 }
int BsSerialUnpackMsg(BsSerialMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:552
INLINE_IN_H int BsSerialUnpackReqRead ( byte_t  buf[],
size_t  uMsgLen,
BsSerialReqRead_T pStruct,
bool_t  bTrace 
)

Unpack a BsSerialReqRead ITV message in big-endian byte order from the input buffer.

Parameters
[in]bufOutput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 288 of file bsSerialMsgs.h.

References BsSerialMsgIdReqRead, and BsSerialUnpackMsg().

Referenced by bsModSerialReqRead().

292 {
293  return BsSerialUnpackMsg(BsSerialMsgIdReqRead, buf, uMsgLen, pStruct, bTrace);
294 }
int BsSerialUnpackMsg(BsSerialMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:552
INLINE_IN_H int BsSerialUnpackReqTrans ( byte_t  buf[],
size_t  uMsgLen,
BsSerialReqTrans_T pStruct,
bool_t  bTrace 
)

Unpack a BsSerialReqTrans ITV message in big-endian byte order from the input buffer.

Parameters
[in]bufOutput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 331 of file bsSerialMsgs.h.

References BsSerialMsgIdReqTrans, and BsSerialUnpackMsg().

Referenced by bsModSerialReqTrans().

335 {
336  return BsSerialUnpackMsg(BsSerialMsgIdReqTrans, buf, uMsgLen, pStruct, bTrace);
337 }
int BsSerialUnpackMsg(BsSerialMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:552
INLINE_IN_H int BsSerialUnpackReqWrite ( byte_t  buf[],
size_t  uMsgLen,
BsSerialReqWrite_T pStruct,
bool_t  bTrace 
)

Unpack a BsSerialReqWrite ITV message in big-endian byte order from the input buffer.

Parameters
[in]bufOutput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 417 of file bsSerialMsgs.h.

References BsSerialMsgIdReqWrite, and BsSerialUnpackMsg().

Referenced by bsModSerialReqWrite().

421 {
422  return BsSerialUnpackMsg(BsSerialMsgIdReqWrite, buf, uMsgLen, pStruct, bTrace);
423 }
int BsSerialUnpackMsg(BsSerialMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:552
INLINE_IN_H int BsSerialUnpackRspRead ( byte_t  buf[],
size_t  uMsgLen,
BsSerialRspRead_T pStruct,
bool_t  bTrace 
)

Unpack a BsSerialRspRead ITV message in big-endian byte order from the input buffer.

Parameters
[in]bufOutput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 374 of file bsSerialMsgs.h.

References BsSerialMsgIdRspRead, and BsSerialUnpackMsg().

Referenced by bsSerialReqRead(), and bsSerialReqTrans().

378 {
379  return BsSerialUnpackMsg(BsSerialMsgIdRspRead, buf, uMsgLen, pStruct, bTrace);
380 }
int BsSerialUnpackMsg(BsSerialMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:552
INLINE_IN_H int BsSerialUnpackRspWrite ( byte_t  buf[],
size_t  uMsgLen,
BsSerialRspWrite_T pStruct,
bool_t  bTrace 
)

Unpack a BsSerialRspWrite ITV message in big-endian byte order from the input buffer.

Parameters
[in]bufOutput message buffer.
uMsgLenLength of message (bytes) in input buffer.
[out]pStructPointer to the associated message structure.
bTraceDo [not] trace packing.
Returns
On success, returns the number of bytes unpacked. On error, returns the appropriate < 0 negated NM_ECODE.

Definition at line 460 of file bsSerialMsgs.h.

References BsSerialMsgIdRspWrite, and BsSerialUnpackMsg().

Referenced by bsSerialReqWrite().

464 {
465  return BsSerialUnpackMsg(BsSerialMsgIdRspWrite, buf, uMsgLen, pStruct, bTrace);
466 }
int BsSerialUnpackMsg(BsSerialMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsSerialMsgs.c:552

Variable Documentation

const NMMsgDef_T* BsSerialMsgDefLookupTbl[]

BsSerial Message Definition Look-Up Table. Indexed by BsSerialMsgId_T enum.

Definition at line 423 of file bsSerialMsgs.c.

Referenced by BsSerialLookupMsgDef().

size_t BsSerialMsgMaxLenLookupTbl[]

BsSerial Message Maximum Size Look-Up Table. Indexed by BsSerialMsgId_T enum.

Definition at line 438 of file bsSerialMsgs.c.

Referenced by BsSerialLookupMsgMaxLen().