botsense  3.2.0
RoadNarrows Client-Server Proxied Services Framework
bsProxyMsgs.c
Go to the documentation of this file.
1 ///////////////////////////////////////////////////////////////////////////////
2 //
3 // File: bsProxyMsgs.c
4 //
5 /*!
6  * \file
7  *
8  * \brief BotSense client application - bsProxy server-terminated core messages.
9  *
10  * \warning This file was auto-generated on 2018.08.10 13:54:22 from the NetMsgs
11  * XML specification bsProxyMsgs.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/bsProxyMsgs.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 BsProxyRspOk Definition
40 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
41 
42 /*!
43  * BsProxyRspOk Field Id Enumeration
44  */
45 typedef enum
46 {
47  BsProxyRspOkFIdReserved = 0, ///< reserved field id
48  BsProxyRspOkFIdNumOf = 1 ///< number of fields
50 
51 /*!
52  * BsProxyRspOk Field Definitions
53  */
54 static const NMFieldDef_T BsProxyRspOkFieldDefs[] =
55 {
56  EOFDEF
57 };
58 
59 /*!
60  * BsProxyRspOk Message Definition
61  */
62 static const NMMsgDef_T BsProxyRspOkMsgDef =
63 {
64  .m_sMsgName = "BsProxyRspOk",
65  .m_eMsgId = BsProxyMsgIdRspOk,
66  .m_uCount = (size_t)(0),
67  .m_pFields = BsProxyRspOkFieldDefs
68 };
69 
70 
71 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
72 // Message BsProxyRspErr Definition
73 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
74 
75 /*!
76  * BsProxyRspErr Field Id Enumeration
77  */
78 typedef enum
79 {
80  BsProxyRspErrFIdReserved = 0, ///< reserved field id
81  BsProxyRspErrFIdecode = 1, ///< ecode field id
82  BsProxyRspErrFIdemsg = 2, ///< emsg field id
83  BsProxyRspErrFIdNumOf = 3 ///< number of fields
85 
86 /*!
87  * BsProxyRspErr Field Definitions
88  */
89 static const NMFieldDef_T BsProxyRspErrFieldDefs[] =
90 {
91  {
92  .m_sFName = "ecode",
93  .m_eFId = BsProxyRspErrFIdecode,
94  .m_eFType = NMFTypeU8,
95  .m_uOffset = memberoffset(BsProxyRspErr_T, m_ecode),
96  .m_this.m_u8.m_bits = (byte_t)(0),
97  .m_this.m_u8.m_valMin = (byte_t)(0),
98  .m_this.m_u8.m_valMax = (byte_t)(0),
99  .m_this.m_u8.m_valConst = (byte_t)(0),
100  },
101  {
102  .m_sFName = "emsg",
103  .m_eFId = BsProxyRspErrFIdemsg,
104  .m_eFType = NMFTypeString,
105  .m_uOffset = memberoffset(BsProxyRspErr_T, m_emsg),
106  .m_this.m_string.m_uMaxCount
107  = (size_t)BSPROXY_RSPERR_EMSG_LEN+1,
108  .m_this.m_string.m_sConst = (char *)(NULL),
109  },
110  EOFDEF
111 };
112 
113 /*!
114  * BsProxyRspErr Message Definition
115  */
116 static const NMMsgDef_T BsProxyRspErrMsgDef =
117 {
118  .m_sMsgName = "BsProxyRspErr",
119  .m_eMsgId = BsProxyMsgIdRspErr,
120  .m_uCount = (size_t)(2),
121  .m_pFields = BsProxyRspErrFieldDefs
122 };
123 
124 
125 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
126 // Message BsProxyReqLoopback Definition
127 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
128 
129 /*!
130  * BsProxyReqLoopback Field Id Enumeration
131  */
132 typedef enum
133 {
134  BsProxyReqLoopbackFIdReserved = 0, ///< reserved field id
135  BsProxyReqLoopbackFIdcdata = 1, ///< cdata field id
136  BsProxyReqLoopbackFIdNumOf = 2 ///< number of fields
138 
139 /*!
140  * BsProxyReqLoopback Field Definitions
141  */
142 static const NMFieldDef_T BsProxyReqLoopbackFieldDefs[] =
143 {
144  {
145  .m_sFName = "cdata",
146  .m_eFId = BsProxyReqLoopbackFIdcdata,
147  .m_eFType = NMFTypeString,
148  .m_uOffset = memberoffset(BsProxyReqLoopback_T, m_cdata),
149  .m_this.m_string.m_uMaxCount
150  = (size_t)BSPROXY_REQLOOPBACK_CDATA_LEN+1,
151  .m_this.m_string.m_sConst = (char *)(NULL),
152  },
153  EOFDEF
154 };
155 
156 /*!
157  * BsProxyReqLoopback Message Definition
158  */
159 static const NMMsgDef_T BsProxyReqLoopbackMsgDef =
160 {
161  .m_sMsgName = "BsProxyReqLoopback",
162  .m_eMsgId = BsProxyMsgIdReqLoopback,
163  .m_uCount = (size_t)(1),
164  .m_pFields = BsProxyReqLoopbackFieldDefs
165 };
166 
167 
168 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
169 // Message BsProxyRspLoopback Definition
170 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
171 
172 /*!
173  * BsProxyRspLoopback Field Id Enumeration
174  */
175 typedef enum
176 {
177  BsProxyRspLoopbackFIdReserved = 0, ///< reserved field id
178  BsProxyRspLoopbackFIdcdata = 1, ///< cdata field id
179  BsProxyRspLoopbackFIdNumOf = 2 ///< number of fields
181 
182 /*!
183  * BsProxyRspLoopback Field Definitions
184  */
185 static const NMFieldDef_T BsProxyRspLoopbackFieldDefs[] =
186 {
187  {
188  .m_sFName = "cdata",
189  .m_eFId = BsProxyRspLoopbackFIdcdata,
190  .m_eFType = NMFTypeString,
191  .m_uOffset = memberoffset(BsProxyRspLoopback_T, m_cdata),
192  .m_this.m_string.m_uMaxCount
193  = (size_t)BSPROXY_RSPLOOPBACK_CDATA_LEN+1,
194  .m_this.m_string.m_sConst = (char *)(NULL),
195  },
196  EOFDEF
197 };
198 
199 /*!
200  * BsProxyRspLoopback Message Definition
201  */
202 static const NMMsgDef_T BsProxyRspLoopbackMsgDef =
203 {
204  .m_sMsgName = "BsProxyRspLoopback",
205  .m_eMsgId = BsProxyMsgIdRspLoopback,
206  .m_uCount = (size_t)(1),
207  .m_pFields = BsProxyRspLoopbackFieldDefs
208 };
209 
210 
211 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
212 // Message BsProxyReqSetLogging Definition
213 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
214 
215 /*!
216  * BsProxyReqSetLogging Field Id Enumeration
217  */
218 typedef enum
219 {
220  BsProxyReqSetLoggingFIdReserved = 0, ///< reserved field id
221  BsProxyReqSetLoggingFIdlevel = 1, ///< level field id
222  BsProxyReqSetLoggingFIdNumOf = 2 ///< number of fields
224 
225 /*!
226  * BsProxyReqSetLogging Field Definitions
227  */
228 static const NMFieldDef_T BsProxyReqSetLoggingFieldDefs[] =
229 {
230  {
231  .m_sFName = "level",
233  .m_eFType = NMFTypeS32,
234  .m_uOffset = memberoffset(BsProxyReqSetLogging_T, m_level),
235  .m_this.m_u32.m_bits = (byte_t)(0),
236  .m_this.m_u32.m_valMin = (uint_t)(0),
237  .m_this.m_u32.m_valMax = (uint_t)(0),
238  .m_this.m_u32.m_valConst = (uint_t)(0),
239  },
240  EOFDEF
241 };
242 
243 /*!
244  * BsProxyReqSetLogging Message Definition
245  */
246 static const NMMsgDef_T BsProxyReqSetLoggingMsgDef =
247 {
248  .m_sMsgName = "BsProxyReqSetLogging",
249  .m_eMsgId = BsProxyMsgIdReqSetLogging,
250  .m_uCount = (size_t)(1),
251  .m_pFields = BsProxyReqSetLoggingFieldDefs
252 };
253 
254 
255 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
256 // Message BsProxyReqGetVersion Definition
257 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
258 
259 /*!
260  * BsProxyReqGetVersion Field Id Enumeration
261  */
262 typedef enum
263 {
264  BsProxyReqGetVersionFIdReserved = 0, ///< reserved field id
265  BsProxyReqGetVersionFIdNumOf = 1 ///< number of fields
267 
268 /*!
269  * BsProxyReqGetVersion Field Definitions
270  */
271 static const NMFieldDef_T BsProxyReqGetVersionFieldDefs[] =
272 {
273  EOFDEF
274 };
275 
276 /*!
277  * BsProxyReqGetVersion Message Definition
278  */
279 static const NMMsgDef_T BsProxyReqGetVersionMsgDef =
280 {
281  .m_sMsgName = "BsProxyReqGetVersion",
282  .m_eMsgId = BsProxyMsgIdReqGetVersion,
283  .m_uCount = (size_t)(0),
284  .m_pFields = BsProxyReqGetVersionFieldDefs
285 };
286 
287 
288 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
289 // Message BsProxyRspGetVersion Definition
290 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
291 
292 /*!
293  * BsProxyRspGetVersion Field Id Enumeration
294  */
295 typedef enum
296 {
297  BsProxyRspGetVersionFIdReserved = 0, ///< reserved field id
298  BsProxyRspGetVersionFIdversion = 1, ///< version field id
299  BsProxyRspGetVersionFIdNumOf = 2 ///< number of fields
301 
302 /*!
303  * BsProxyRspGetVersion Field Definitions
304  */
305 static const NMFieldDef_T BsProxyRspGetVersionFieldDefs[] =
306 {
307  {
308  .m_sFName = "version",
310  .m_eFType = NMFTypeString,
311  .m_uOffset = memberoffset(BsProxyRspGetVersion_T, m_version),
312  .m_this.m_string.m_uMaxCount
314  .m_this.m_string.m_sConst = (char *)(NULL),
315  },
316  EOFDEF
317 };
318 
319 /*!
320  * BsProxyRspGetVersion Message Definition
321  */
322 static const NMMsgDef_T BsProxyRspGetVersionMsgDef =
323 {
324  .m_sMsgName = "BsProxyRspGetVersion",
325  .m_eMsgId = BsProxyMsgIdRspGetVersion,
326  .m_uCount = (size_t)(1),
327  .m_pFields = BsProxyRspGetVersionFieldDefs
328 };
329 
330 
331 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
332 // Message BsProxyReqMsgTrace Definition
333 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
334 
335 /*!
336  * BsProxyReqMsgTrace Field Id Enumeration
337  */
338 typedef enum
339 {
340  BsProxyReqMsgTraceFIdReserved = 0, ///< reserved field id
341  BsProxyReqMsgTraceFIdvconn = 1, ///< vconn field id
342  BsProxyReqMsgTraceFIdtrace = 2, ///< trace field id
343  BsProxyReqMsgTraceFIdNumOf = 3 ///< number of fields
345 
346 /*!
347  * BsProxyReqMsgTrace Field Definitions
348  */
349 static const NMFieldDef_T BsProxyReqMsgTraceFieldDefs[] =
350 {
351  {
352  .m_sFName = "vconn",
353  .m_eFId = BsProxyReqMsgTraceFIdvconn,
354  .m_eFType = NMFTypeU8,
355  .m_uOffset = memberoffset(BsProxyReqMsgTrace_T, m_vconn),
356  .m_this.m_u8.m_bits = (byte_t)(0),
357  .m_this.m_u8.m_valMin = (byte_t)(0),
358  .m_this.m_u8.m_valMax = (byte_t)(0),
359  .m_this.m_u8.m_valConst = (byte_t)(0),
360  },
361  {
362  .m_sFName = "trace",
363  .m_eFId = BsProxyReqMsgTraceFIdtrace,
364  .m_eFType = NMFTypeBool,
365  .m_uOffset = memberoffset(BsProxyReqMsgTrace_T, m_trace),
366  },
367  EOFDEF
368 };
369 
370 /*!
371  * BsProxyReqMsgTrace Message Definition
372  */
373 static const NMMsgDef_T BsProxyReqMsgTraceMsgDef =
374 {
375  .m_sMsgName = "BsProxyReqMsgTrace",
376  .m_eMsgId = BsProxyMsgIdReqMsgTrace,
377  .m_uCount = (size_t)(2),
378  .m_pFields = BsProxyReqMsgTraceFieldDefs
379 };
380 
381 
382 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
383 // Message BsProxyReqDevOpen Definition
384 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
385 
386 /*!
387  * BsProxyReqDevOpenargbuf Field Definitions
388  */
389 static const NMFieldDef_T BsProxyReqDevOpenargbufFieldDef[] =
390 {
391  {
392  .m_sFName = "argbuf",
393  .m_eFId = 0,
394  .m_eFType = NMFTypeU8,
395  .m_uOffset = (size_t)0,
396  .m_this.m_u8.m_bits = (byte_t)(0),
397  .m_this.m_u8.m_valMin = (byte_t)(0),
398  .m_this.m_u8.m_valMax = (byte_t)(0),
399  .m_this.m_u8.m_valConst = (byte_t)(0),
400  },
401  EOFDEF
402 };
403 
404 /*!
405  * BsProxyReqDevOpen Field Id Enumeration
406  */
407 typedef enum
408 {
409  BsProxyReqDevOpenFIdReserved = 0, ///< reserved field id
410  BsProxyReqDevOpenFIdtrace = 1, ///< trace field id
411  BsProxyReqDevOpenFIddevname = 2, ///< devname field id
412  BsProxyReqDevOpenFIdmodname = 3, ///< modname field id
413  BsProxyReqDevOpenFIdargbuf = 4, ///< argbuf field id
414  BsProxyReqDevOpenFIdNumOf = 5 ///< number of fields
416 
417 /*!
418  * BsProxyReqDevOpen Field Definitions
419  */
420 static const NMFieldDef_T BsProxyReqDevOpenFieldDefs[] =
421 {
422  {
423  .m_sFName = "trace",
424  .m_eFId = BsProxyReqDevOpenFIdtrace,
425  .m_eFType = NMFTypeBool,
426  .m_uOffset = memberoffset(BsProxyReqDevOpen_T, m_trace),
427  },
428  {
429  .m_sFName = "devname",
430  .m_eFId = BsProxyReqDevOpenFIddevname,
431  .m_eFType = NMFTypeString,
432  .m_uOffset = memberoffset(BsProxyReqDevOpen_T, m_devname),
433  .m_this.m_string.m_uMaxCount
434  = (size_t)BSPROXY_REQDEVOPEN_DEVNAME_LEN+1,
435  .m_this.m_string.m_sConst = (char *)(NULL),
436  },
437  {
438  .m_sFName = "modname",
439  .m_eFId = BsProxyReqDevOpenFIdmodname,
440  .m_eFType = NMFTypeString,
441  .m_uOffset = memberoffset(BsProxyReqDevOpen_T, m_modname),
442  .m_this.m_string.m_uMaxCount
443  = (size_t)BSPROXY_REQDEVOPEN_MODNAME_LEN+1,
444  .m_this.m_string.m_sConst = (char *)(NULL),
445  },
446  {
447  .m_sFName = "argbuf",
448  .m_eFId = BsProxyReqDevOpenFIdargbuf,
449  .m_eFType = NMFTypeVector,
450  .m_uOffset = memberoffset(BsProxyReqDevOpen_T, m_argbuf),
451  .m_this.m_vector.m_uMaxCount
453  .m_this.m_vector.m_uElemSize
454  = sizeof(byte_t),
455  .m_this.m_vector.m_pThisElem
457  },
458  EOFDEF
459 };
460 
461 /*!
462  * BsProxyReqDevOpen Message Definition
463  */
464 static const NMMsgDef_T BsProxyReqDevOpenMsgDef =
465 {
466  .m_sMsgName = "BsProxyReqDevOpen",
467  .m_eMsgId = BsProxyMsgIdReqDevOpen,
468  .m_uCount = (size_t)(4),
469  .m_pFields = BsProxyReqDevOpenFieldDefs
470 };
471 
472 
473 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
474 // Message BsProxyRspDevOpen Definition
475 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
476 
477 /*!
478  * BsProxyRspDevOpen Field Id Enumeration
479  */
480 typedef enum
481 {
482  BsProxyRspDevOpenFIdReserved = 0, ///< reserved field id
483  BsProxyRspDevOpenFIdvconn = 1, ///< vconn field id
484  BsProxyRspDevOpenFIdNumOf = 2 ///< number of fields
486 
487 /*!
488  * BsProxyRspDevOpen Field Definitions
489  */
490 static const NMFieldDef_T BsProxyRspDevOpenFieldDefs[] =
491 {
492  {
493  .m_sFName = "vconn",
494  .m_eFId = BsProxyRspDevOpenFIdvconn,
495  .m_eFType = NMFTypeU8,
496  .m_uOffset = memberoffset(BsProxyRspDevOpen_T, m_vconn),
497  .m_this.m_u8.m_bits = (byte_t)(0),
498  .m_this.m_u8.m_valMin = (byte_t)(0),
499  .m_this.m_u8.m_valMax = (byte_t)(0),
500  .m_this.m_u8.m_valConst = (byte_t)(0),
501  },
502  EOFDEF
503 };
504 
505 /*!
506  * BsProxyRspDevOpen Message Definition
507  */
508 static const NMMsgDef_T BsProxyRspDevOpenMsgDef =
509 {
510  .m_sMsgName = "BsProxyRspDevOpen",
511  .m_eMsgId = BsProxyMsgIdRspDevOpen,
512  .m_uCount = (size_t)(1),
513  .m_pFields = BsProxyRspDevOpenFieldDefs
514 };
515 
516 
517 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
518 // Message BsProxyReqDevClose Definition
519 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
520 
521 /*!
522  * BsProxyReqDevClose Field Id Enumeration
523  */
524 typedef enum
525 {
526  BsProxyReqDevCloseFIdReserved = 0, ///< reserved field id
527  BsProxyReqDevCloseFIdvconn = 1, ///< vconn field id
528  BsProxyReqDevCloseFIdNumOf = 2 ///< number of fields
530 
531 /*!
532  * BsProxyReqDevClose Field Definitions
533  */
534 static const NMFieldDef_T BsProxyReqDevCloseFieldDefs[] =
535 {
536  {
537  .m_sFName = "vconn",
538  .m_eFId = BsProxyReqDevCloseFIdvconn,
539  .m_eFType = NMFTypeU8,
540  .m_uOffset = memberoffset(BsProxyReqDevClose_T, m_vconn),
541  .m_this.m_u8.m_bits = (byte_t)(0),
542  .m_this.m_u8.m_valMin = (byte_t)(0),
543  .m_this.m_u8.m_valMax = (byte_t)(0),
544  .m_this.m_u8.m_valConst = (byte_t)(0),
545  },
546  EOFDEF
547 };
548 
549 /*!
550  * BsProxyReqDevClose Message Definition
551  */
552 static const NMMsgDef_T BsProxyReqDevCloseMsgDef =
553 {
554  .m_sMsgName = "BsProxyReqDevClose",
555  .m_eMsgId = BsProxyMsgIdReqDevClose,
556  .m_uCount = (size_t)(1),
557  .m_pFields = BsProxyReqDevCloseFieldDefs
558 };
559 
560 
561 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
562 // Message BsProxyReqGetVConnList Definition
563 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
564 
565 /*!
566  * BsProxyReqGetVConnList Field Id Enumeration
567  */
568 typedef enum
569 {
570  BsProxyReqGetVConnListFIdReserved = 0, ///< reserved field id
571  BsProxyReqGetVConnListFIdNumOf = 1 ///< number of fields
573 
574 /*!
575  * BsProxyReqGetVConnList Field Definitions
576  */
577 static const NMFieldDef_T BsProxyReqGetVConnListFieldDefs[] =
578 {
579  EOFDEF
580 };
581 
582 /*!
583  * BsProxyReqGetVConnList Message Definition
584  */
585 static const NMMsgDef_T BsProxyReqGetVConnListMsgDef =
586 {
587  .m_sMsgName = "BsProxyReqGetVConnList",
588  .m_eMsgId = BsProxyMsgIdReqGetVConnList,
589  .m_uCount = (size_t)(0),
591 };
592 
593 
594 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
595 // Message BsProxyRspGetVConnList Definition
596 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
597 
598 /*!
599  * BsProxyRspGetVConnListvconn Field Definitions
600  */
601 static const NMFieldDef_T BsProxyRspGetVConnListvconnFieldDef[] =
602 {
603  {
604  .m_sFName = "vconn",
605  .m_eFId = 0,
606  .m_eFType = NMFTypeU8,
607  .m_uOffset = (size_t)0,
608  .m_this.m_u8.m_bits = (byte_t)(0),
609  .m_this.m_u8.m_valMin = (byte_t)(0),
610  .m_this.m_u8.m_valMax = (byte_t)(0),
611  .m_this.m_u8.m_valConst = (byte_t)(0),
612  },
613  EOFDEF
614 };
615 
616 /*!
617  * BsProxyRspGetVConnList Field Id Enumeration
618  */
619 typedef enum
620 {
621  BsProxyRspGetVConnListFIdReserved = 0, ///< reserved field id
622  BsProxyRspGetVConnListFIdvconn = 1, ///< vconn field id
623  BsProxyRspGetVConnListFIdNumOf = 2 ///< number of fields
625 
626 /*!
627  * BsProxyRspGetVConnList Field Definitions
628  */
629 static const NMFieldDef_T BsProxyRspGetVConnListFieldDefs[] =
630 {
631  {
632  .m_sFName = "vconn",
634  .m_eFType = NMFTypeVector,
635  .m_uOffset = memberoffset(BsProxyRspGetVConnList_T, m_vconn),
636  .m_this.m_vector.m_uMaxCount
637  = (size_t)BSPROXY_VCONN_CLIENT_MAX,
638  .m_this.m_vector.m_uElemSize
639  = sizeof(byte_t),
640  .m_this.m_vector.m_pThisElem
642  },
643  EOFDEF
644 };
645 
646 /*!
647  * BsProxyRspGetVConnList Message Definition
648  */
649 static const NMMsgDef_T BsProxyRspGetVConnListMsgDef =
650 {
651  .m_sMsgName = "BsProxyRspGetVConnList",
652  .m_eMsgId = BsProxyMsgIdRspGetVConnList,
653  .m_uCount = (size_t)(1),
655 };
656 
657 
658 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
659 // Message BsProxyReqGetVConnInfo Definition
660 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
661 
662 /*!
663  * BsProxyReqGetVConnInfo Field Id Enumeration
664  */
665 typedef enum
666 {
667  BsProxyReqGetVConnInfoFIdReserved = 0, ///< reserved field id
668  BsProxyReqGetVConnInfoFIdvconn = 1, ///< vconn field id
669  BsProxyReqGetVConnInfoFIdNumOf = 2 ///< number of fields
671 
672 /*!
673  * BsProxyReqGetVConnInfo Field Definitions
674  */
675 static const NMFieldDef_T BsProxyReqGetVConnInfoFieldDefs[] =
676 {
677  {
678  .m_sFName = "vconn",
680  .m_eFType = NMFTypeU8,
681  .m_uOffset = memberoffset(BsProxyReqGetVConnInfo_T, m_vconn),
682  .m_this.m_u8.m_bits = (byte_t)(0),
683  .m_this.m_u8.m_valMin = (byte_t)(0),
684  .m_this.m_u8.m_valMax = (byte_t)(0),
685  .m_this.m_u8.m_valConst = (byte_t)(0),
686  },
687  EOFDEF
688 };
689 
690 /*!
691  * BsProxyReqGetVConnInfo Message Definition
692  */
693 static const NMMsgDef_T BsProxyReqGetVConnInfoMsgDef =
694 {
695  .m_sMsgName = "BsProxyReqGetVConnInfo",
696  .m_eMsgId = BsProxyMsgIdReqGetVConnInfo,
697  .m_uCount = (size_t)(1),
699 };
700 
701 
702 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
703 // Message BsProxyRspGetVConnInfo Definition
704 // . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
705 
706 /*!
707  * BsProxyRspGetVConnInfo Field Id Enumeration
708  */
709 typedef enum
710 {
711  BsProxyRspGetVConnInfoFIdReserved = 0, ///< reserved field id
712  BsProxyRspGetVConnInfoFIdvconn = 1, ///< vconn field id
713  BsProxyRspGetVConnInfoFIdrd = 2, ///< rd field id
714  BsProxyRspGetVConnInfoFIdclient = 3, ///< client field id
715  BsProxyRspGetVConnInfoFIddevuri = 4, ///< devuri field id
716  BsProxyRspGetVConnInfoFIdmoduri = 5, ///< moduri field id
717  BsProxyRspGetVConnInfoFIdmodver = 6, ///< modver field id
718  BsProxyRspGetVConnInfoFIdmoddate = 7, ///< moddate field id
719  BsProxyRspGetVConnInfoFIdNumOf = 8 ///< number of fields
721 
722 /*!
723  * BsProxyRspGetVConnInfo Field Definitions
724  */
725 static const NMFieldDef_T BsProxyRspGetVConnInfoFieldDefs[] =
726 {
727  {
728  .m_sFName = "vconn",
730  .m_eFType = NMFTypeU8,
731  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_vconn),
732  .m_this.m_u8.m_bits = (byte_t)(0),
733  .m_this.m_u8.m_valMin = (byte_t)(0),
734  .m_this.m_u8.m_valMax = (byte_t)(0),
735  .m_this.m_u8.m_valConst = (byte_t)(0),
736  },
737  {
738  .m_sFName = "rd",
739  .m_eFId = BsProxyRspGetVConnInfoFIdrd,
740  .m_eFType = NMFTypeS32,
741  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_rd),
742  .m_this.m_u32.m_bits = (byte_t)(0),
743  .m_this.m_u32.m_valMin = (uint_t)(0),
744  .m_this.m_u32.m_valMax = (uint_t)(0),
745  .m_this.m_u32.m_valConst = (uint_t)(0),
746  },
747  {
748  .m_sFName = "client",
750  .m_eFType = NMFTypeString,
751  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_client),
752  .m_this.m_string.m_uMaxCount
754  .m_this.m_string.m_sConst = (char *)(NULL),
755  },
756  {
757  .m_sFName = "devuri",
759  .m_eFType = NMFTypeString,
760  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_devuri),
761  .m_this.m_string.m_uMaxCount
763  .m_this.m_string.m_sConst = (char *)(NULL),
764  },
765  {
766  .m_sFName = "moduri",
768  .m_eFType = NMFTypeString,
769  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_moduri),
770  .m_this.m_string.m_uMaxCount
772  .m_this.m_string.m_sConst = (char *)(NULL),
773  },
774  {
775  .m_sFName = "modver",
777  .m_eFType = NMFTypeString,
778  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_modver),
779  .m_this.m_string.m_uMaxCount
781  .m_this.m_string.m_sConst = (char *)(NULL),
782  },
783  {
784  .m_sFName = "moddate",
786  .m_eFType = NMFTypeString,
787  .m_uOffset = memberoffset(BsProxyRspGetVConnInfo_T, m_moddate),
788  .m_this.m_string.m_uMaxCount
790  .m_this.m_string.m_sConst = (char *)(NULL),
791  },
792  EOFDEF
793 };
794 
795 /*!
796  * BsProxyRspGetVConnInfo Message Definition
797  */
798 static const NMMsgDef_T BsProxyRspGetVConnInfoMsgDef =
799 {
800  .m_sMsgName = "BsProxyRspGetVConnInfo",
801  .m_eMsgId = BsProxyMsgIdRspGetVConnInfo,
802  .m_uCount = (size_t)(7),
804 };
805 
806 
807 //-----------------------------------------------------------------------------
808 // Public Interface
809 //-----------------------------------------------------------------------------
810 
811 /*!
812  * BsProxy Message Definition Look-Up Table. Indexed by BsProxyMsgId_T enum.
813  */
814 const NMMsgDef_T *BsProxyMsgDefLookupTbl[] =
815 {
816  NULL, ///< [BsProxyMsgIdNone]
817  &BsProxyRspOkMsgDef, ///< [BsProxyMsgIdRspOk]
818  &BsProxyRspErrMsgDef, ///< [BsProxyMsgIdRspErr]
819  &BsProxyReqLoopbackMsgDef, ///< [BsProxyMsgIdReqLoopback]
820  &BsProxyRspLoopbackMsgDef, ///< [BsProxyMsgIdRspLoopback]
821  &BsProxyReqSetLoggingMsgDef, ///< [BsProxyMsgIdReqSetLogging]
822  &BsProxyReqGetVersionMsgDef, ///< [BsProxyMsgIdReqGetVersion]
823  &BsProxyRspGetVersionMsgDef, ///< [BsProxyMsgIdRspGetVersion]
824  &BsProxyReqMsgTraceMsgDef, ///< [BsProxyMsgIdReqMsgTrace]
825  &BsProxyReqDevOpenMsgDef, ///< [BsProxyMsgIdReqDevOpen]
826  &BsProxyRspDevOpenMsgDef, ///< [BsProxyMsgIdRspDevOpen]
827  &BsProxyReqDevCloseMsgDef, ///< [BsProxyMsgIdReqDevClose]
828  &BsProxyReqGetVConnListMsgDef, ///< [BsProxyMsgIdReqGetVConnList]
829  &BsProxyRspGetVConnListMsgDef, ///< [BsProxyMsgIdRspGetVConnList]
830  &BsProxyReqGetVConnInfoMsgDef, ///< [BsProxyMsgIdReqGetVConnInfo]
831  &BsProxyRspGetVConnInfoMsgDef, ///< [BsProxyMsgIdRspGetVConnInfo]
832  NULL ///< [BsProxyMsgIdNumOf]
833 };
834 
835 /*!
836  * BsProxy Message Maximum Size Look-Up Table. Indexed by BsProxyMsgId_T enum.
837  */
839 {
840  (size_t)(0), ///< [BsProxyMsgIdNone]
841  (size_t)(3), ///< [BsProxyMsgIdRspOk]
842  (size_t)(264), ///< [BsProxyMsgIdRspErr]
843  (size_t)(261), ///< [BsProxyMsgIdReqLoopback]
844  (size_t)(261), ///< [BsProxyMsgIdRspLoopback]
845  (size_t)(9), ///< [BsProxyMsgIdReqSetLogging]
846  (size_t)(3), ///< [BsProxyMsgIdReqGetVersion]
847  (size_t)(261), ///< [BsProxyMsgIdRspGetVersion]
848  (size_t)(9), ///< [BsProxyMsgIdReqMsgTrace]
849  (size_t)(781), ///< [BsProxyMsgIdReqDevOpen]
850  (size_t)(6), ///< [BsProxyMsgIdRspDevOpen]
851  (size_t)(6), ///< [BsProxyMsgIdReqDevClose]
852  (size_t)(3), ///< [BsProxyMsgIdReqGetVConnList]
853  (size_t)((3+(4+BSPROXY_VCONN_CLIENT_MAX))),
854  ///< [BsProxyMsgIdRspGetVConnList]
855  (size_t)(6), ///< [BsProxyMsgIdReqGetVConnInfo]
856  (size_t)(1302), ///< [BsProxyMsgIdRspGetVConnInfo]
857  (size_t)(0) ///< [BsProxyMsgIdNumOf]
858 };
859 
860 
861 //-----------------------------------------------------------------------------
862 // Functions
863 //-----------------------------------------------------------------------------
864 
865 /*!
866  * \brief Look up the message definition associated with the message id.
867  *
868  * \param eMsgId Message Id.
869  *
870  * \return
871  * On success, returns the pointer to the NMMsgDef_T.
872  * On error, NULL is returned.
873  */
874 const NMMsgDef_T * BsProxyLookupMsgDef( BsProxyMsgId_T eMsgId )
875 {
876  if( (uint_t)eMsgId >= (uint_t)BsProxyMsgIdNumOf )
877  {
878  return NULL;
879  }
880  else
881  {
882  return BsProxyMsgDefLookupTbl[(uint_t)eMsgId];
883  }
884 }
885 
886 /*!
887  * \brief Look up the message maximum length associated with the message id.
888  *
889  * The maximum length is the total number of packed bytes possible for the
890  * given message. The message may be much shorter.
891  *
892  * \param eMsgId Message Id.
893  *
894  * \return
895  * On success, returns the number of bytes.
896  * On error, 0 is returned.
897  */
899 {
900  if( (uint_t)eMsgId >= (uint_t)BsProxyMsgIdNumOf )
901  {
902  return (size_t)0;
903  }
904  else
905  {
906  return BsProxyMsgMaxLenLookupTbl[(uint_t)eMsgId];
907  }
908 }
909 
910 /*!
911  * \brief Pack a ITV message in big-endian byte order.
912  *
913  * \param eMsgId Message Id.
914  * \param [in] pStruct Pointer to the associated, populated message
915  * structure.
916  * \param [out] buf Output message buffer.
917  * \param bufSize Size of output buffer.
918  * \param bTrace Do [not] trace packing.
919  *
920  * \return
921  * On success, returns the number of bytes packed.
922  * On error, returns the appropriate < 0 negated NM_ECODE.
923  */
925  void * pStruct,
926  byte_t buf[],
927  size_t bufSize,
928  bool_t bTrace )
929 {
930  const NMMsgDef_T *pMsgDef;
931 
932  if( (pMsgDef = BsProxyLookupMsgDef(eMsgId)) == NULL )
933  {
934  LOGERROR("%s(ecode=%d): msgid=%u.",
935  nmStrError(NM_ECODE_MSGID), NM_ECODE_MSGID, eMsgId);
936  return -NM_ECODE_MSGID;
937  }
938 
939  if( bTrace )
940  {
941  return nmPackITVMsgDebug(pMsgDef, pStruct, buf, bufSize, NMEndianBig);
942  }
943  else
944  {
945  return nmPackITVMsg(pMsgDef, pStruct, buf, bufSize, NMEndianBig);
946  }
947 }
948 
949 /*!
950  * \brief Unpack a ITV message in big-endian byte order.
951  *
952  * \param eMsgId Message Id.
953  * \param [in] buf Input message buffer.
954  * \param uMsgLen Length of message (bytes) in input buffer.
955  * \param [out] pStruct Pointer to the associated message structure.
956  * \param bTrace Do [not] trace packing.
957  *
958  * \return
959  * On success, returns the number of bytes unpacked.
960  * On error, returns the appropriate < 0 negated NM_ECODE.
961  */
963  byte_t buf[],
964  size_t uMsgLen,
965  void * pStruct,
966  bool_t bTrace )
967 {
968  const NMMsgDef_T *pMsgDef;
969 
970  if( (pMsgDef = BsProxyLookupMsgDef(eMsgId)) == NULL )
971  {
972  LOGERROR("%s(ecode=%d): msgid=%u.",
973  nmStrError(NM_ECODE_MSGID), NM_ECODE_MSGID, eMsgId);
974  return -NM_ECODE_MSGID;
975  }
976 
977  if( bTrace )
978  {
979  return nmUnpackITVMsgDebug(pMsgDef, buf, uMsgLen, pStruct, NMEndianBig);
980  }
981  else
982  {
983  return nmUnpackITVMsg(pMsgDef, buf, uMsgLen, pStruct, NMEndianBig);
984  }
985 }
986 
#define EOFDEF
Definition: bsProxyMsgs.c:29
BsProxyRspOkFId_T
Definition: bsProxyMsgs.c:45
number of fields
Definition: bsProxyMsgs.c:136
static const NMMsgDef_T BsProxyRspGetVersionMsgDef
Definition: bsProxyMsgs.c:322
#define BSPROXY_RSPGETVCONNINFO_MODURI_LEN
Definition: bsProxyMsgs.h:266
static const NMFieldDef_T BsProxyRspGetVConnInfoFieldDefs[]
Definition: bsProxyMsgs.c:725
int BsProxyPackMsg(BsProxyMsgId_T eMsgId, void *pStruct, byte_t buf[], size_t bufSize, bool_t bTrace)
Pack a ITV message in big-endian byte order.
Definition: bsProxyMsgs.c:924
number of fields
Definition: bsProxyMsgs.c:414
BsProxyReqMsgTraceFId_T
Definition: bsProxyMsgs.c:338
number of fields
Definition: bsProxyMsgs.c:48
static const NMFieldDef_T BsProxyReqGetVersionFieldDefs[]
Definition: bsProxyMsgs.c:271
static const NMFieldDef_T BsProxyReqLoopbackFieldDefs[]
Definition: bsProxyMsgs.c:142
BsProxyRspGetVConnInfoFId_T
Definition: bsProxyMsgs.c:709
BotSense client application - bsProxy server-terminated core messages.
#define BSPROXY_REQDEVOPEN_MODNAME_LEN
Definition: bsProxyMsgs.h:166
static const NMFieldDef_T BsProxyRspOkFieldDefs[]
Definition: bsProxyMsgs.c:54
#define BSPROXY_RSPGETVCONNINFO_CLIENT_LEN
Definition: bsProxyMsgs.h:260
static const NMMsgDef_T BsProxyRspGetVConnListMsgDef
Definition: bsProxyMsgs.c:649
emsg field id
Definition: bsProxyMsgs.c:82
number of fields
Definition: bsProxyMsgs.c:528
#define BSPROXY_RSPGETVERSION_VERSION_LEN
Definition: bsProxyMsgs.h:132
static const NMMsgDef_T BsProxyReqDevOpenMsgDef
Definition: bsProxyMsgs.c:464
BsProxyReqDevCloseFId_T
Definition: bsProxyMsgs.c:524
static const NMMsgDef_T BsProxyReqDevCloseMsgDef
Definition: bsProxyMsgs.c:552
size_t BsProxyLookupMsgMaxLen(BsProxyMsgId_T eMsgId)
Look up the message maximum length associated with the message id.
Definition: bsProxyMsgs.c:898
static const NMMsgDef_T BsProxyReqGetVConnInfoMsgDef
Definition: bsProxyMsgs.c:693
ReqGetVConnInfo.
Definition: bsProxyMsgs.h:51
BsProxyReqDevOpenFId_T
Definition: bsProxyMsgs.c:407
BsProxyRspDevOpenFId_T
Definition: bsProxyMsgs.c:480
static const NMMsgDef_T BsProxyRspLoopbackMsgDef
Definition: bsProxyMsgs.c:202
BsProxyRspErrFId_T
Definition: bsProxyMsgs.c:78
static const NMFieldDef_T BsProxyRspGetVConnListFieldDefs[]
Definition: bsProxyMsgs.c:629
static const NMMsgDef_T BsProxyReqGetVersionMsgDef
Definition: bsProxyMsgs.c:279
RspGetVConnInfo.
Definition: bsProxyMsgs.h:52
static const NMMsgDef_T BsProxyReqLoopbackMsgDef
Definition: bsProxyMsgs.c:159
BsProxyRspGetVersionFId_T
Definition: bsProxyMsgs.c:295
static const NMFieldDef_T BsProxyReqSetLoggingFieldDefs[]
Definition: bsProxyMsgs.c:228
number of fields
Definition: bsProxyMsgs.c:179
BsProxyReqGetVConnInfoFId_T
Definition: bsProxyMsgs.c:665
static const NMFieldDef_T BsProxyRspLoopbackFieldDefs[]
Definition: bsProxyMsgs.c:185
#define BSPROXY_RSPGETVCONNINFO_DEVURI_LEN
Definition: bsProxyMsgs.h:263
ecode field id
Definition: bsProxyMsgs.c:81
static const NMMsgDef_T BsProxyRspOkMsgDef
Definition: bsProxyMsgs.c:62
const NMMsgDef_T * BsProxyMsgDefLookupTbl[]
Definition: bsProxyMsgs.c:814
#define BSPROXY_REQDEVOPEN_DEVNAME_LEN
Definition: bsProxyMsgs.h:163
BsProxyReqGetVConnListFId_T
Definition: bsProxyMsgs.c:568
int BsProxyUnpackMsg(BsProxyMsgId_T eMsgId, byte_t buf[], size_t uMsgLen, void *pStruct, bool_t bTrace)
Unpack a ITV message in big-endian byte order.
Definition: bsProxyMsgs.c:962
static const NMFieldDef_T BsProxyReqMsgTraceFieldDefs[]
Definition: bsProxyMsgs.c:349
RspGetVConnList.
Definition: bsProxyMsgs.h:50
static const NMMsgDef_T BsProxyReqMsgTraceMsgDef
Definition: bsProxyMsgs.c:373
BsProxyReqSetLoggingFId_T
Definition: bsProxyMsgs.c:218
number of fields
Definition: bsProxyMsgs.c:343
static const NMMsgDef_T BsProxyReqSetLoggingMsgDef
Definition: bsProxyMsgs.c:246
static const NMMsgDef_T BsProxyRspGetVConnInfoMsgDef
Definition: bsProxyMsgs.c:798
static const NMFieldDef_T BsProxyReqDevCloseFieldDefs[]
Definition: bsProxyMsgs.c:534
reserved field id
Definition: bsProxyMsgs.c:47
static const NMMsgDef_T BsProxyRspErrMsgDef
Definition: bsProxyMsgs.c:116
BsProxyReqGetVersionFId_T
Definition: bsProxyMsgs.c:262
reserved field id
Definition: bsProxyMsgs.c:482
ReqGetVConnList.
Definition: bsProxyMsgs.h:49
size_t BsProxyMsgMaxLenLookupTbl[]
Definition: bsProxyMsgs.c:838
number of message ids
Definition: bsProxyMsgs.h:53
static const NMMsgDef_T BsProxyRspDevOpenMsgDef
Definition: bsProxyMsgs.c:508
BsProxyMsgId_T
Definition: bsProxyMsgs.h:35
static const NMFieldDef_T BsProxyReqDevOpenFieldDefs[]
Definition: bsProxyMsgs.c:420
static const NMFieldDef_T BsProxyRspDevOpenFieldDefs[]
Definition: bsProxyMsgs.c:490
static const NMFieldDef_T BsProxyReqGetVConnInfoFieldDefs[]
Definition: bsProxyMsgs.c:675
#define BSPROXY_RSPGETVCONNINFO_MODDATE_LEN
Definition: bsProxyMsgs.h:272
#define BSPROXY_VCONN_CLIENT_MAX
max number of virtual conn/client
Definition: BotSense.h:122
reserved field id
Definition: bsProxyMsgs.c:409
static const NMFieldDef_T BsProxyReqGetVConnListFieldDefs[]
Definition: bsProxyMsgs.c:577
#define BSPROXY_RSPLOOPBACK_CDATA_LEN
Definition: bsProxyMsgs.h:102
BsProxyRspLoopbackFId_T
Definition: bsProxyMsgs.c:175
static const NMFieldDef_T BsProxyReqDevOpenargbufFieldDef[]
Definition: bsProxyMsgs.c:389
static const NMFieldDef_T BsProxyRspGetVersionFieldDefs[]
Definition: bsProxyMsgs.c:305
const NMMsgDef_T * BsProxyLookupMsgDef(BsProxyMsgId_T eMsgId)
Look up the message definition associated with the message id.
Definition: bsProxyMsgs.c:874
#define BSPROXY_REQDEVOPEN_ARGBUF_LEN
Definition: bsProxyMsgs.h:169
static const NMFieldDef_T BsProxyRspErrFieldDefs[]
Definition: bsProxyMsgs.c:89
BsProxyReqLoopbackFId_T
Definition: bsProxyMsgs.c:132
reserved field id
Definition: bsProxyMsgs.c:80
BsProxyRspGetVConnListFId_T
Definition: bsProxyMsgs.c:619
number of fields
Definition: bsProxyMsgs.c:484
static const NMFieldDef_T BsProxyRspGetVConnListvconnFieldDef[]
Definition: bsProxyMsgs.c:601
number of fields
Definition: bsProxyMsgs.c:83
#define BSPROXY_REQLOOPBACK_CDATA_LEN
Definition: bsProxyMsgs.h:85
#define BSPROXY_RSPGETVCONNINFO_MODVER_LEN
Definition: bsProxyMsgs.h:269
static const NMMsgDef_T BsProxyReqGetVConnListMsgDef
Definition: bsProxyMsgs.c:585
#define BSPROXY_RSPERR_EMSG_LEN
Definition: bsProxyMsgs.h:67