botsense  3.2.0
RoadNarrows Client-Server Proxied Services Framework
bsI2CMsgs.c
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: bsI2CMsgs.c
4 //
5 /*!
6  * \file
7  *
8  * \brief BotSense bsProxy server - client raw I2C NetMsgs XML Definition
9  *
10  * \warning This file was auto-generated on 2018.08.10 13:54:23 from the NetMsgs
11  * XML specification bsI2CMsgs.xml.
12  *
13  * \par Copyright:
14  * (C) 2018. RoadNarrows LLC
15  * (http://www.roadnarrows.com)
16  * All Rights Reserved
17  */
18 ///////////////////////////////////////////////////////////////////////////////
19 
20 
21 #include "rnr/rnrconfig.h"
22 #include "rnr/log.h"
23 #include "rnr/netmsgs.h"
24 
25 #include "botsense/bsI2CMsgs.h"
26 
27 #ifndef EOFDEF
28 /*! End of Field Definition entry. */
29 #define EOFDEF {NULL, 0, NMFTypeNone, 0, }
30 #endif // EOFDEF
31 
32 
33 //-----------------------------------------------------------------------------
34 // Private Interface
35 //-----------------------------------------------------------------------------
36 
37 
38 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39 // Message BsI2CReqRead Definition
40 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41 
42 /*!
43  * BsI2CReqRead Field Id Enumeration
44  */
45 typedef enum
46 {
47  BsI2CReqReadFIdReserved = 0, ///< reserved field id
48  BsI2CReqReadFIdaddr = 1, ///< addr field id
49  BsI2CReqReadFIdreadlen = 2, ///< readlen field id
50  BsI2CReqReadFIdNumOf = 3 ///< number of fields
52 
53 /*!
54  * BsI2CReqRead Field Definitions
55  */
56 static const NMFieldDef_T BsI2CReqReadFieldDefs[] =
57 {
58  {
59  .m_sFName = "addr",
60  .m_eFId = BsI2CReqReadFIdaddr,
61  .m_eFType = NMFTypeU16,
62  .m_uOffset = memberoffset(BsI2CReqRead_T, m_addr),
63  .m_this.m_u16.m_bits = (byte_t)(0),
64  .m_this.m_u16.m_valMin = (ushort_t)(0),
65  .m_this.m_u16.m_valMax = (ushort_t)(0),
66  .m_this.m_u16.m_valConst = (ushort_t)(0),
67  },
68  {
69  .m_sFName = "readlen",
70  .m_eFId = BsI2CReqReadFIdreadlen,
71  .m_eFType = NMFTypeU8,
72  .m_uOffset = memberoffset(BsI2CReqRead_T, m_readlen),
73  .m_this.m_u8.m_bits = (byte_t)(NMBITS_HAS_MIN|NMBITS_HAS_MAX),
74  .m_this.m_u8.m_valMin = (byte_t)(1),
75  .m_this.m_u8.m_valMax = (byte_t)(NMFVAL_LEN_MAX_VECTOR),
76  .m_this.m_u8.m_valConst = (byte_t)(0),
77  },
78  EOFDEF
79 };
80 
81 /*!
82  * BsI2CReqRead Message Definition
83  */
84 static const NMMsgDef_T BsI2CReqReadMsgDef =
85 {
86  .m_sMsgName = "BsI2CReqRead",
87  .m_eMsgId = BsI2CMsgIdReqRead,
88  .m_uCount = (size_t)(2),
89  .m_pFields = BsI2CReqReadFieldDefs
90 };
91 
92 
93 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
94 // Message BsI2CReqTrans Definition
95 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
96 
97 /*!
98  * BsI2CReqTranswritebuf Field Definitions
99  */
100 static const NMFieldDef_T BsI2CReqTranswritebufFieldDef[] =
101 {
102  {
103  .m_sFName = "writebuf",
104  .m_eFId = 0,
105  .m_eFType = NMFTypeU8,
106  .m_uOffset = (size_t)0,
107  .m_this.m_u8.m_bits = (byte_t)(0),
108  .m_this.m_u8.m_valMin = (byte_t)(0),
109  .m_this.m_u8.m_valMax = (byte_t)(0),
110  .m_this.m_u8.m_valConst = (byte_t)(0),
111  },
112  EOFDEF
113 };
114 
115 /*!
116  * BsI2CReqTrans Field Id Enumeration
117  */
118 typedef enum
119 {
120  BsI2CReqTransFIdReserved = 0, ///< reserved field id
121  BsI2CReqTransFIdaddr = 1, ///< addr field id
122  BsI2CReqTransFIdwritebuf = 2, ///< writebuf field id
123  BsI2CReqTransFIdreadlen = 3, ///< readlen field id
124  BsI2CReqTransFIdNumOf = 4 ///< number of fields
126 
127 /*!
128  * BsI2CReqTrans Field Definitions
129  */
130 static const NMFieldDef_T BsI2CReqTransFieldDefs[] =
131 {
132  {
133  .m_sFName = "addr",
134  .m_eFId = BsI2CReqTransFIdaddr,
135  .m_eFType = NMFTypeU16,
136  .m_uOffset = memberoffset(BsI2CReqTrans_T, m_addr),
137  .m_this.m_u16.m_bits = (byte_t)(0),
138  .m_this.m_u16.m_valMin = (ushort_t)(0),
139  .m_this.m_u16.m_valMax = (ushort_t)(0),
140  .m_this.m_u16.m_valConst = (ushort_t)(0),
141  },
142  {
143  .m_sFName = "writebuf",
144  .m_eFId = BsI2CReqTransFIdwritebuf,
145  .m_eFType = NMFTypeVector,
146  .m_uOffset = memberoffset(BsI2CReqTrans_T, m_writebuf),
147  .m_this.m_vector.m_uMaxCount
148  = (size_t)BSI2C_REQTRANS_WRITEBUF_LEN,
149  .m_this.m_vector.m_uElemSize
150  = sizeof(byte_t),
151  .m_this.m_vector.m_pThisElem
153  },
154  {
155  .m_sFName = "readlen",
156  .m_eFId = BsI2CReqTransFIdreadlen,
157  .m_eFType = NMFTypeU8,
158  .m_uOffset = memberoffset(BsI2CReqTrans_T, m_readlen),
159  .m_this.m_u8.m_bits = (byte_t)(NMBITS_HAS_MIN|NMBITS_HAS_MAX),
160  .m_this.m_u8.m_valMin = (byte_t)(1),
161  .m_this.m_u8.m_valMax = (byte_t)(NMFVAL_LEN_MAX_VECTOR),
162  .m_this.m_u8.m_valConst = (byte_t)(0),
163  },
164  EOFDEF
165 };
166 
167 /*!
168  * BsI2CReqTrans Message Definition
169  */
170 static const NMMsgDef_T BsI2CReqTransMsgDef =
171 {
172  .m_sMsgName = "BsI2CReqTrans",
173  .m_eMsgId = BsI2CMsgIdReqTrans,
174  .m_uCount = (size_t)(3),
175  .m_pFields = BsI2CReqTransFieldDefs
176 };
177 
178 
179 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
180 // Message BsI2CRspRead Definition
181 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
182 
183 /*!
184  * BsI2CRspReadreadbuf Field Definitions
185  */
186 static const NMFieldDef_T BsI2CRspReadreadbufFieldDef[] =
187 {
188  {
189  .m_sFName = "readbuf",
190  .m_eFId = 0,
191  .m_eFType = NMFTypeU8,
192  .m_uOffset = (size_t)0,
193  .m_this.m_u8.m_bits = (byte_t)(0),
194  .m_this.m_u8.m_valMin = (byte_t)(0),
195  .m_this.m_u8.m_valMax = (byte_t)(0),
196  .m_this.m_u8.m_valConst = (byte_t)(0),
197  },
198  EOFDEF
199 };
200 
201 /*!
202  * BsI2CRspRead Field Id Enumeration
203  */
204 typedef enum
205 {
206  BsI2CRspReadFIdReserved = 0, ///< reserved field id
207  BsI2CRspReadFIdreadbuf = 1, ///< readbuf field id
208  BsI2CRspReadFIdNumOf = 2 ///< number of fields
210 
211 /*!
212  * BsI2CRspRead Field Definitions
213  */
214 static const NMFieldDef_T BsI2CRspReadFieldDefs[] =
215 {
216  {
217  .m_sFName = "readbuf",
218  .m_eFId = BsI2CRspReadFIdreadbuf,
219  .m_eFType = NMFTypeVector,
220  .m_uOffset = memberoffset(BsI2CRspRead_T, m_readbuf),
221  .m_this.m_vector.m_uMaxCount
222  = (size_t)BSI2C_RSPREAD_READBUF_LEN,
223  .m_this.m_vector.m_uElemSize
224  = sizeof(byte_t),
225  .m_this.m_vector.m_pThisElem
227  },
228  EOFDEF
229 };
230 
231 /*!
232  * BsI2CRspRead Message Definition
233  */
234 static const NMMsgDef_T BsI2CRspReadMsgDef =
235 {
236  .m_sMsgName = "BsI2CRspRead",
237  .m_eMsgId = BsI2CMsgIdRspRead,
238  .m_uCount = (size_t)(1),
239  .m_pFields = BsI2CRspReadFieldDefs
240 };
241 
242 
243 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
244 // Message BsI2CReqWrite Definition
245 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
246 
247 /*!
248  * BsI2CReqWritewritebuf Field Definitions
249  */
250 static const NMFieldDef_T BsI2CReqWritewritebufFieldDef[] =
251 {
252  {
253  .m_sFName = "writebuf",
254  .m_eFId = 0,
255  .m_eFType = NMFTypeU8,
256  .m_uOffset = (size_t)0,
257  .m_this.m_u8.m_bits = (byte_t)(0),
258  .m_this.m_u8.m_valMin = (byte_t)(0),
259  .m_this.m_u8.m_valMax = (byte_t)(0),
260  .m_this.m_u8.m_valConst = (byte_t)(0),
261  },
262  EOFDEF
263 };
264 
265 /*!
266  * BsI2CReqWrite Field Id Enumeration
267  */
268 typedef enum
269 {
270  BsI2CReqWriteFIdReserved = 0, ///< reserved field id
271  BsI2CReqWriteFIdaddr = 1, ///< addr field id
272  BsI2CReqWriteFIdwritebuf = 2, ///< writebuf field id
273  BsI2CReqWriteFIdNumOf = 3 ///< number of fields
275 
276 /*!
277  * BsI2CReqWrite Field Definitions
278  */
279 static const NMFieldDef_T BsI2CReqWriteFieldDefs[] =
280 {
281  {
282  .m_sFName = "addr",
283  .m_eFId = BsI2CReqWriteFIdaddr,
284  .m_eFType = NMFTypeU16,
285  .m_uOffset = memberoffset(BsI2CReqWrite_T, m_addr),
286  .m_this.m_u16.m_bits = (byte_t)(0),
287  .m_this.m_u16.m_valMin = (ushort_t)(0),
288  .m_this.m_u16.m_valMax = (ushort_t)(0),
289  .m_this.m_u16.m_valConst = (ushort_t)(0),
290  },
291  {
292  .m_sFName = "writebuf",
293  .m_eFId = BsI2CReqWriteFIdwritebuf,
294  .m_eFType = NMFTypeVector,
295  .m_uOffset = memberoffset(BsI2CReqWrite_T, m_writebuf),
296  .m_this.m_vector.m_uMaxCount
297  = (size_t)BSI2C_REQWRITE_WRITEBUF_LEN,
298  .m_this.m_vector.m_uElemSize
299  = sizeof(byte_t),
300  .m_this.m_vector.m_pThisElem
302  },
303  EOFDEF
304 };
305 
306 /*!
307  * BsI2CReqWrite Message Definition
308  */
309 static const NMMsgDef_T BsI2CReqWriteMsgDef =
310 {
311  .m_sMsgName = "BsI2CReqWrite",
312  .m_eMsgId = BsI2CMsgIdReqWrite,
313  .m_uCount = (size_t)(2),
314  .m_pFields = BsI2CReqWriteFieldDefs
315 };
316 
317 
318 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
319 // Message BsI2CRspWrite Definition
320 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
321 
322 /*!
323  * BsI2CRspWrite Field Id Enumeration
324  */
325 typedef enum
326 {
327  BsI2CRspWriteFIdReserved = 0, ///< reserved field id
328  BsI2CRspWriteFIdbyteswritten = 1, ///< byteswritten field id
329  BsI2CRspWriteFIdNumOf = 2 ///< number of fields
331 
332 /*!
333  * BsI2CRspWrite Field Definitions
334  */
335 static const NMFieldDef_T BsI2CRspWriteFieldDefs[] =
336 {
337  {
338  .m_sFName = "byteswritten",
340  .m_eFType = NMFTypeU8,
341  .m_uOffset = memberoffset(BsI2CRspWrite_T, m_byteswritten),
342  .m_this.m_u8.m_bits = (byte_t)(0),
343  .m_this.m_u8.m_valMin = (byte_t)(0),
344  .m_this.m_u8.m_valMax = (byte_t)(0),
345  .m_this.m_u8.m_valConst = (byte_t)(0),
346  },
347  EOFDEF
348 };
349 
350 /*!
351  * BsI2CRspWrite Message Definition
352  */
353 static const NMMsgDef_T BsI2CRspWriteMsgDef =
354 {
355  .m_sMsgName = "BsI2CRspWrite",
356  .m_eMsgId = BsI2CMsgIdRspWrite,
357  .m_uCount = (size_t)(1),
358  .m_pFields = BsI2CRspWriteFieldDefs
359 };
360 
361 
362 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
363 // Message BsI2CReqScan Definition
364 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
365 
366 /*!
367  * BsI2CReqScan Field Id Enumeration
368  */
369 typedef enum
370 {
371  BsI2CReqScanFIdReserved = 0, ///< reserved field id
372  BsI2CReqScanFIdNumOf = 1 ///< number of fields
374 
375 /*!
376  * BsI2CReqScan Field Definitions
377  */
378 static const NMFieldDef_T BsI2CReqScanFieldDefs[] =
379 {
380  EOFDEF
381 };
382 
383 /*!
384  * BsI2CReqScan Message Definition
385  */
386 static const NMMsgDef_T BsI2CReqScanMsgDef =
387 {
388  .m_sMsgName = "BsI2CReqScan",
389  .m_eMsgId = BsI2CMsgIdReqScan,
390  .m_uCount = (size_t)(0),
391  .m_pFields = BsI2CReqScanFieldDefs
392 };
393 
394 
395 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
396 // Message BsI2CRspScan Definition
397 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
398 
399 /*!
400  * BsI2CRspScanscan Field Definitions
401  */
402 static const NMFieldDef_T BsI2CRspScanscanFieldDef[] =
403 {
404  {
405  .m_sFName = "scan",
406  .m_eFId = 0,
407  .m_eFType = NMFTypeU16,
408  .m_uOffset = (size_t)0,
409  .m_this.m_u16.m_bits = (byte_t)(0),
410  .m_this.m_u16.m_valMin = (ushort_t)(0),
411  .m_this.m_u16.m_valMax = (ushort_t)(0),
412  .m_this.m_u16.m_valConst = (ushort_t)(0),
413  },
414  EOFDEF
415 };
416 
417 /*!
418  * BsI2CRspScan Field Id Enumeration
419  */
420 typedef enum
421 {
422  BsI2CRspScanFIdReserved = 0, ///< reserved field id
423  BsI2CRspScanFIdscan = 1, ///< scan field id
424  BsI2CRspScanFIdNumOf = 2 ///< number of fields
426 
427 /*!
428  * BsI2CRspScan Field Definitions
429  */
430 static const NMFieldDef_T BsI2CRspScanFieldDefs[] =
431 {
432  {
433  .m_sFName = "scan",
434  .m_eFId = BsI2CRspScanFIdscan,
435  .m_eFType = NMFTypeVector,
436  .m_uOffset = memberoffset(BsI2CRspScan_T, m_scan),
437  .m_this.m_vector.m_uMaxCount
438  = (size_t)BSI2C_RSPSCAN_SCAN_LEN,
439  .m_this.m_vector.m_uElemSize
440  = sizeof(ushort_t),
441  .m_this.m_vector.m_pThisElem
443  },
444  EOFDEF
445 };
446 
447 /*!
448  * BsI2CRspScan Message Definition
449  */
450 static const NMMsgDef_T BsI2CRspScanMsgDef =
451 {
452  .m_sMsgName = "BsI2CRspScan",
453  .m_eMsgId = BsI2CMsgIdRspScan,
454  .m_uCount = (size_t)(1),
455  .m_pFields = BsI2CRspScanFieldDefs
456 };
457 
458 
459 //-----------------------------------------------------------------------------
460 // Public Interface
461 //-----------------------------------------------------------------------------
462 
463 /*!
464  * BsI2C Message Definition Look-Up Table. Indexed by BsI2CMsgId_T enum.
465  */
466 const NMMsgDef_T *BsI2CMsgDefLookupTbl[] =
467 {
468  NULL, ///< [BsI2CMsgIdNone]
469  &BsI2CReqReadMsgDef, ///< [BsI2CMsgIdReqRead]
470  &BsI2CReqTransMsgDef, ///< [BsI2CMsgIdReqTrans]
471  &BsI2CRspReadMsgDef, ///< [BsI2CMsgIdRspRead]
472  &BsI2CReqWriteMsgDef, ///< [BsI2CMsgIdReqWrite]
473  &BsI2CRspWriteMsgDef, ///< [BsI2CMsgIdRspWrite]
474  &BsI2CReqScanMsgDef, ///< [BsI2CMsgIdReqScan]
475  &BsI2CRspScanMsgDef, ///< [BsI2CMsgIdRspScan]
476  NULL ///< [BsI2CMsgIdNumOf]
477 };
478 
479 /*!
480  * BsI2C Message Maximum Size Look-Up Table. Indexed by BsI2CMsgId_T enum.
481  */
483 {
484  (size_t)(0), ///< [BsI2CMsgIdNone]
485  (size_t)(10), ///< [BsI2CMsgIdReqRead]
486  (size_t)(269), ///< [BsI2CMsgIdReqTrans]
487  (size_t)(262), ///< [BsI2CMsgIdRspRead]
488  (size_t)(266), ///< [BsI2CMsgIdReqWrite]
489  (size_t)(6), ///< [BsI2CMsgIdRspWrite]
490  (size_t)(3), ///< [BsI2CMsgIdReqScan]
491  (size_t)(517), ///< [BsI2CMsgIdRspScan]
492  (size_t)(0) ///< [BsI2CMsgIdNumOf]
493 };
494 
495 
496 //-----------------------------------------------------------------------------
497 // Functions
498 //-----------------------------------------------------------------------------
499 
500 /*!
501  * \brief Look up the message definition associated with the message id.
502  *
503  * \param eMsgId Message Id.
504  *
505  * \return
506  * On success, returns the pointer to the NMMsgDef_T.
507  * On error, NULL is returned.
508  */
509 const NMMsgDef_T * BsI2CLookupMsgDef( BsI2CMsgId_T eMsgId )
510 {
511  if( (uint_t)eMsgId >= (uint_t)BsI2CMsgIdNumOf )
512  {
513  return NULL;
514  }
515  else
516  {
517  return BsI2CMsgDefLookupTbl[(uint_t)eMsgId];
518  }
519 }
520 
521 /*!
522  * \brief Look up the message maximum length associated with the message id.
523  *
524  * The maximum length is the total number of packed bytes possible for the
525  * given message. The message may be much shorter.
526  *
527  * \param eMsgId Message Id.
528  *
529  * \return
530  * On success, returns the number of bytes.
531  * On error, 0 is returned.
532  */
534 {
535  if( (uint_t)eMsgId >= (uint_t)BsI2CMsgIdNumOf )
536  {
537  return (size_t)0;
538  }
539  else
540  {
541  return BsI2CMsgMaxLenLookupTbl[(uint_t)eMsgId];
542  }
543 }
544 
545 /*!
546  * \brief Pack a ITV message in big-endian byte order.
547  *
548  * \param eMsgId Message Id.
549  * \param [in] pStruct Pointer to the associated, populated message
550  * structure.
551  * \param [out] buf Output message buffer.
552  * \param bufSize Size of output buffer.
553  * \param bTrace Do [not] trace packing.
554  *
555  * \return
556  * On success, returns the number of bytes packed.
557  * On error, returns the appropriate < 0 negated NM_ECODE.
558  */
560  void * pStruct,
561  byte_t buf[],
562  size_t bufSize,
563  bool_t bTrace )
564 {
565  const NMMsgDef_T *pMsgDef;
566 
567  if( (pMsgDef = BsI2CLookupMsgDef(eMsgId)) == NULL )
568  {
569  LOGERROR("%s(ecode=%d): msgid=%u.",
570  nmStrError(NM_ECODE_MSGID), NM_ECODE_MSGID, eMsgId);
571  return -NM_ECODE_MSGID;
572  }
573 
574  if( bTrace )
575  {
576  return nmPackITVMsgDebug(pMsgDef, pStruct, buf, bufSize, NMEndianBig);
577  }
578  else
579  {
580  return nmPackITVMsg(pMsgDef, pStruct, buf, bufSize, NMEndianBig);
581  }
582 }
583 
584 /*!
585  * \brief Unpack a ITV message in big-endian byte order.
586  *
587  * \param eMsgId Message Id.
588  * \param [in] buf Input message buffer.
589  * \param uMsgLen Length of message (bytes) in input buffer.
590  * \param [out] pStruct Pointer to the associated message structure.
591  * \param bTrace Do [not] trace packing.
592  *
593  * \return
594  * On success, returns the number of bytes unpacked.
595  * On error, returns the appropriate < 0 negated NM_ECODE.
596  */
598  byte_t buf[],
599  size_t uMsgLen,
600  void * pStruct,
601  bool_t bTrace )
602 {
603  const NMMsgDef_T *pMsgDef;
604 
605  if( (pMsgDef = BsI2CLookupMsgDef(eMsgId)) == NULL )
606  {
607  LOGERROR("%s(ecode=%d): msgid=%u.",
608  nmStrError(NM_ECODE_MSGID), NM_ECODE_MSGID, eMsgId);
609  return -NM_ECODE_MSGID;
610  }
611 
612  if( bTrace )
613  {
614  return nmUnpackITVMsgDebug(pMsgDef, buf, uMsgLen, pStruct, NMEndianBig);
615  }
616  else
617  {
618  return nmUnpackITVMsg(pMsgDef, buf, uMsgLen, pStruct, NMEndianBig);
619  }
620 }
621 
RspRead.
Definition: bsI2CMsgs.h:42
static const NMMsgDef_T BsI2CReqReadMsgDef
Definition: bsI2CMsgs.c:84
BsI2CRspReadFId_T
Definition: bsI2CMsgs.c:204
static const NMFieldDef_T BsI2CReqScanFieldDefs[]
Definition: bsI2CMsgs.c:378
#define BSI2C_RSPSCAN_SCAN_LEN
Definition: bsI2CMsgs.h:166
scan field id
Definition: bsI2CMsgs.c:423
writebuf field id
Definition: bsI2CMsgs.c:272
static const NMFieldDef_T BsI2CReqWriteFieldDefs[]
Definition: bsI2CMsgs.c:279
number of fields
Definition: bsI2CMsgs.c:124
BsI2CReqTransFId_T
Definition: bsI2CMsgs.c:118
static const NMMsgDef_T BsI2CReqWriteMsgDef
Definition: bsI2CMsgs.c:309
BsI2CReqScanFId_T
Definition: bsI2CMsgs.c:369
const NMMsgDef_T * BsI2CLookupMsgDef(BsI2CMsgId_T eMsgId)
Look up the message definition associated with the message id.
Definition: bsI2CMsgs.c:509
const NMMsgDef_T * BsI2CMsgDefLookupTbl[]
Definition: bsI2CMsgs.c:466
number of fields
Definition: bsI2CMsgs.c:372
static const NMFieldDef_T BsI2CReqReadFieldDefs[]
Definition: bsI2CMsgs.c:56
static const NMFieldDef_T BsI2CRspScanscanFieldDef[]
Definition: bsI2CMsgs.c:402
readlen field id
Definition: bsI2CMsgs.c:123
BsI2CReqReadFId_T
Definition: bsI2CMsgs.c:45
static const NMFieldDef_T BsI2CRspReadreadbufFieldDef[]
Definition: bsI2CMsgs.c:186
RspScan.
Definition: bsI2CMsgs.h:46
reserved field id
Definition: bsI2CMsgs.c:327
ReqRead.
Definition: bsI2CMsgs.h:40
byteswritten field id
Definition: bsI2CMsgs.c:328
readbuf field id
Definition: bsI2CMsgs.c:207
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.
Definition: bsI2CMsgs.c:597
number of message ids
Definition: bsI2CMsgs.h:47
readlen field id
Definition: bsI2CMsgs.c:49
static const NMFieldDef_T BsI2CReqWritewritebufFieldDef[]
Definition: bsI2CMsgs.c:250
BsI2CMsgId_T
Definition: bsI2CMsgs.h:37
reserved field id
Definition: bsI2CMsgs.c:120
ReqTrans.
Definition: bsI2CMsgs.h:41
static const NMFieldDef_T BsI2CRspWriteFieldDefs[]
Definition: bsI2CMsgs.c:335
number of fields
Definition: bsI2CMsgs.c:50
BotSense bsProxy server - client raw I2C NetMsgs XML Definition.
static const NMMsgDef_T BsI2CRspReadMsgDef
Definition: bsI2CMsgs.c:234
reserved field id
Definition: bsI2CMsgs.c:270
static const NMMsgDef_T BsI2CRspWriteMsgDef
Definition: bsI2CMsgs.c:353
RspWrite.
Definition: bsI2CMsgs.h:44
addr field id
Definition: bsI2CMsgs.c:271
reserved field id
Definition: bsI2CMsgs.c:47
reserved field id
Definition: bsI2CMsgs.c:422
static const NMMsgDef_T BsI2CReqScanMsgDef
Definition: bsI2CMsgs.c:386
BsI2CRspScanFId_T
Definition: bsI2CMsgs.c:420
ReqScan.
Definition: bsI2CMsgs.h:45
#define EOFDEF
Definition: bsI2CMsgs.c:29
number of fields
Definition: bsI2CMsgs.c:424
ReqWrite.
Definition: bsI2CMsgs.h:43
size_t BsI2CLookupMsgMaxLen(BsI2CMsgId_T eMsgId)
Look up the message maximum length associated with the message id.
Definition: bsI2CMsgs.c:533
static const NMFieldDef_T BsI2CRspScanFieldDefs[]
Definition: bsI2CMsgs.c:430
reserved field id
Definition: bsI2CMsgs.c:206
addr field id
Definition: bsI2CMsgs.c:121
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.
Definition: bsI2CMsgs.c:559
#define BSI2C_REQTRANS_WRITEBUF_LEN
Definition: bsI2CMsgs.h:75
static const NMMsgDef_T BsI2CReqTransMsgDef
Definition: bsI2CMsgs.c:170
number of fields
Definition: bsI2CMsgs.c:273
static const NMFieldDef_T BsI2CRspReadFieldDefs[]
Definition: bsI2CMsgs.c:214
reserved field id
Definition: bsI2CMsgs.c:371
#define BSI2C_RSPREAD_READBUF_LEN
Definition: bsI2CMsgs.h:102
#define BSI2C_REQWRITE_WRITEBUF_LEN
Definition: bsI2CMsgs.h:127
BsI2CReqWriteFId_T
Definition: bsI2CMsgs.c:268
static const NMFieldDef_T BsI2CReqTranswritebufFieldDef[]
Definition: bsI2CMsgs.c:100
addr field id
Definition: bsI2CMsgs.c:48
number of fields
Definition: bsI2CMsgs.c:329
static const NMMsgDef_T BsI2CRspScanMsgDef
Definition: bsI2CMsgs.c:450
number of fields
Definition: bsI2CMsgs.c:208
size_t BsI2CMsgMaxLenLookupTbl[]
Definition: bsI2CMsgs.c:482
BsI2CRspWriteFId_T
Definition: bsI2CMsgs.c:325
writebuf field id
Definition: bsI2CMsgs.c:122
static const NMFieldDef_T BsI2CReqTransFieldDefs[]
Definition: bsI2CMsgs.c:130