52 #include "rnr/rnrconfig.h" 74 "Insufficient memory available",
75 "Machine architecture not supported",
139 const char *sPreface,
147 if( sPreface && *sPreface )
149 fprintf(fp,
"%s:", sPreface);
152 for(i=0; i<uCount; ++i)
154 if( (uNLFreq > 0) && ((i % uNLFreq) == 0) )
158 fprintf(fp,
"\n%*s", uCol,
"");
161 fprintf(fp,
" 0x%02x", buf[i]);
175 const char *sPreface,
182 if( sPreface && *sPreface )
184 fprintf(fp,
"%s:", sPreface);
187 for(i=0; i<uCnt; ++i)
189 if( (uMsb % 8) == 7 )
196 (uVal >> uMsb) & 0x01? printf(
"1"): printf(
"0");
#define NMFVAL_LEN_U64
unsigned 64-bit field value length
#define NMFVAL_LEN_S8
signed 8-bit field value length
const NMFieldDef_T * nmFindFieldDef(const NMMsgDef_T *pMsgDef, byte_t byFId)
Find the field definition in the message definition, given the field id.
#define NMFVAL_LEN_S32
signed 32-bit field value length
const int NMHashNoIdx
hash no index value
#define NMFVAL_LEN_F64
64-bit floating-point number field val len
#define NMFVAL_LEN_CHAR
character field length
void nmPrintBuf(FILE *fp, const char *sPreface, byte_t buf[], size_t uCount, size_t uNLFreq, uint_t uCol)
Pretty print buffer to opened file stream.
size_t m_uCount
number of message fields
#define NMFVAL_LEN_S16
signed 16-bit field value length
#define NMFVAL_LEN_VECTOR
VType[[] variable field length.
void nmPrintBits(FILE *fp, const char *sPreface, ulonglong_t uVal, uint_t uMsb, uint_t uCnt)
Pretty print bits in value.
static size_t NMFValLenLookupTbl[]
#define NMFVAL_LEN_F32
32-bit floating-point number field val len
#define NM_ECODE_BADEC
internal inconsistency or bug
#define NMFVAL_LEN_P32
32-bit pointer field value length
#define NMFVAL_LEN_U16
unsigned 16-bit field value length
const NMFieldDef_T * m_pFields
pointer to array of msg field definitions
#define NMFVAL_LEN_STRUCT
struct T variable field length
#define NMFVAL_LEN_U32
unsigned 32-bit field value length
#define NMFVAL_LEN_BOOL
boolean field length
const char * nmStrError(int ecode)
Get the error string describing the BotSense error code.
size_t nmGetFieldValSize(NMFType_T eFType)
Get the field value byte size.
#define NMFVAL_LEN_P64
64-bit pointer field value length
static const char * nmEcodeStrTbl[]
NetMsgs Error Code String Table.
Internal intra-library declarations.
INLINE_IN_H int NMHashFType(NMFType_T eFType)
Field Type to Index hash function.
#define NMFVAL_LEN_STRING
char[] variable field length
#define NMFVAL_LEN_U8
unsigned 8-bit field value length
Network Messaging declarations.
#define NMFVAL_LEN_S64
signed 64-bit field value length
uint_t m_eFId
filed id (message/struct unique)