botsense  3.2.0
RoadNarrows Client-Server Proxied Services Framework
bsProxyMsgs.py
Go to the documentation of this file.
1 ##############################################################################
2 #
3 # File: bsProxyMsgs.py
4 #
5 
6 """
7 bsProxyMsgs.py
8 """
9 
10 ## \file
11 ##
12 ## \brief BotSense client application - bsProxy server-terminated core messages.
13 ##
14 ## \warning This file was auto-generated on 2018.08.10 13:54:22 from the NetMsgs
15 ## XML specification bsProxyMsgs.xml.
16 ##
17 ## \par Copyright:
18 ## (C) 2018. RoadNarrows LLC
19 ## (http://www.roadnarrows.com)
20 ## All Rights Reserved
21 ##
22 ##############################################################################
23 
24 
25 import NetMsgs.NetMsgsBase as nmBase
26 from NetMsgs.NetMsgsLibITV import NetMsgsITV
27 
28 from BotSense.BotSenseCore import BSPROXY_VCONN_CLIENT_MAX
29 
30 
31 # -----------------------------------------------------------------------------
32 # BsProxy Message Id Enumeration
33 # -----------------------------------------------------------------------------
34 
36  """ BsProxy Message Id Enumeration class. """
37  NoId = 0 # no message id
38  RspOk = 1 # RspOk
39  RspErr = 2 # RspErr
40  ReqLoopback = 3 # ReqLoopback
41  RspLoopback = 4 # RspLoopback
42  ReqSetLogging = 5 # ReqSetLogging
43  ReqGetVersion = 6 # ReqGetVersion
44  RspGetVersion = 7 # RspGetVersion
45  ReqMsgTrace = 8 # ReqMsgTrace
46  ReqDevOpen = 9 # ReqDevOpen
47  RspDevOpen = 10 # RspDevOpen
48  ReqDevClose = 11 # ReqDevClose
49  ReqGetVConnList = 12 # ReqGetVConnList
50  RspGetVConnList = 13 # RspGetVConnList
51  ReqGetVConnInfo = 14 # ReqGetVConnInfo
52  RspGetVConnInfo = 15 # RspGetVConnInfo
53  NumOf = 16 # number of message ids
54 ##
55 
56 
57 # -----------------------------------------------------------------------------
58 # Message Definition Set
59 # -----------------------------------------------------------------------------
60 
61 ## RspOk Message Definition
62 BsProxyMsgDefRspOk = {
63  'fielddef': [ ],
64  'ftype': '{',
65  'max_count': 0,
66  'msgid': BsProxyMsgId.RspOk,
67  'name': 'RspOk',
68 }
69 ##
70 
71 ## RspErr Message Definition
72 BsProxyMsgDefRspErr = {
73  'fielddef': [
74  {'fid':1, 'ftype':'B', 'max_count':1, 'name':'ecode', },
75  {
76  'fid': 2,
77  'ftype': 's',
78  'max_count': nmBase.NMStringMaxCount,
79  'name': 'emsg',
80  },
81  ],
82  'ftype': '{',
83  'max_count': 2,
84  'msgid': BsProxyMsgId.RspErr,
85  'name': 'RspErr',
86 }
87 ##
88 
89 ## ReqLoopback Message Definition
90 BsProxyMsgDefReqLoopback = {
91  'fielddef': [
92  {
93  'fid': 1,
94  'ftype': 's',
95  'max_count': nmBase.NMStringMaxCount,
96  'name': 'cdata',
97  },
98  ],
99  'ftype': '{',
100  'max_count': 1,
101  'msgid': BsProxyMsgId.ReqLoopback,
102  'name': 'ReqLoopback',
103 }
104 ##
105 
106 ## RspLoopback Message Definition
107 BsProxyMsgDefRspLoopback = {
108  'fielddef': [
109  {
110  'fid': 1,
111  'ftype': 's',
112  'max_count': nmBase.NMStringMaxCount,
113  'name': 'cdata',
114  },
115  ],
116  'ftype': '{',
117  'max_count': 1,
118  'msgid': BsProxyMsgId.RspLoopback,
119  'name': 'RspLoopback',
120 }
121 ##
122 
123 ## ReqSetLogging Message Definition
124 BsProxyMsgDefReqSetLogging = {
125  'fielddef': [
126  {'fid':1, 'ftype':'i', 'max_count':1, 'name':'level', },
127  ],
128  'ftype': '{',
129  'max_count': 1,
130  'msgid': BsProxyMsgId.ReqSetLogging,
131  'name': 'ReqSetLogging',
132 }
133 ##
134 
135 ## ReqGetVersion Message Definition
136 BsProxyMsgDefReqGetVersion = {
137  'fielddef': [ ],
138  'ftype': '{',
139  'max_count': 0,
140  'msgid': BsProxyMsgId.ReqGetVersion,
141  'name': 'ReqGetVersion',
142 }
143 ##
144 
145 ## RspGetVersion Message Definition
146 BsProxyMsgDefRspGetVersion = {
147  'fielddef': [
148  {
149  'fid': 1,
150  'ftype': 's',
151  'max_count': nmBase.NMStringMaxCount,
152  'name': 'version',
153  },
154  ],
155  'ftype': '{',
156  'max_count': 1,
157  'msgid': BsProxyMsgId.RspGetVersion,
158  'name': 'RspGetVersion',
159 }
160 ##
161 
162 ## ReqMsgTrace Message Definition
163 BsProxyMsgDefReqMsgTrace = {
164  'fielddef': [
165  {'fid':1, 'ftype':'B', 'max_count':1, 'name':'vconn', },
166  {'fid':2, 'ftype':'?', 'max_count':1, 'name':'trace', },
167  ],
168  'ftype': '{',
169  'max_count': 2,
170  'msgid': BsProxyMsgId.ReqMsgTrace,
171  'name': 'ReqMsgTrace',
172 }
173 ##
174 
175 ## ReqDevOpen Message Definition
176 BsProxyMsgDefReqDevOpen = {
177  'fielddef': [
178  {'fid':1, 'ftype':'?', 'max_count':1, 'name':'trace', },
179  {
180  'fid': 2,
181  'ftype': 's',
182  'max_count': nmBase.NMStringMaxCount,
183  'name': 'devname',
184  },
185  {
186  'fid': 3,
187  'ftype': 's',
188  'max_count': nmBase.NMStringMaxCount,
189  'name': 'modname',
190  },
191  {
192  'fid': 4,
193  'ftype': '[',
194  'max_count': nmBase.NMVectorMaxCount,
195  'name': 'argbuf',
196  'vdef': {
197  'fid': nmBase.NMFIdNone,
198  'ftype': 'B',
199  'max_count': 1,
200  'name': 'argbuf_item',
201  },
202  },
203  ],
204  'ftype': '{',
205  'max_count': 4,
206  'msgid': BsProxyMsgId.ReqDevOpen,
207  'name': 'ReqDevOpen',
208 }
209 ##
210 
211 ## RspDevOpen Message Definition
212 BsProxyMsgDefRspDevOpen = {
213  'fielddef': [
214  {'fid':1, 'ftype':'B', 'max_count':1, 'name':'vconn', },
215  ],
216  'ftype': '{',
217  'max_count': 1,
218  'msgid': BsProxyMsgId.RspDevOpen,
219  'name': 'RspDevOpen',
220 }
221 ##
222 
223 ## ReqDevClose Message Definition
224 BsProxyMsgDefReqDevClose = {
225  'fielddef': [
226  {'fid':1, 'ftype':'B', 'max_count':1, 'name':'vconn', },
227  ],
228  'ftype': '{',
229  'max_count': 1,
230  'msgid': BsProxyMsgId.ReqDevClose,
231  'name': 'ReqDevClose',
232 }
233 ##
234 
235 ## ReqGetVConnList Message Definition
236 BsProxyMsgDefReqGetVConnList = {
237  'fielddef': [ ],
238  'ftype': '{',
239  'max_count': 0,
240  'msgid': BsProxyMsgId.ReqGetVConnList,
241  'name': 'ReqGetVConnList',
242 }
243 ##
244 
245 ## RspGetVConnList Message Definition
246 BsProxyMsgDefRspGetVConnList = {
247  'fielddef': [
248  {
249  'fid': 1,
250  'ftype': '[',
251  'max_count': BSPROXY_VCONN_CLIENT_MAX,
252  'name': 'vconn',
253  'vdef': {
254  'fid': nmBase.NMFIdNone,
255  'ftype': 'B',
256  'max_count': 1,
257  'name': 'vconn_item',
258  },
259  },
260  ],
261  'ftype': '{',
262  'max_count': 1,
263  'msgid': BsProxyMsgId.RspGetVConnList,
264  'name': 'RspGetVConnList',
265 }
266 ##
267 
268 ## ReqGetVConnInfo Message Definition
269 BsProxyMsgDefReqGetVConnInfo = {
270  'fielddef': [
271  {'fid':1, 'ftype':'B', 'max_count':1, 'name':'vconn', },
272  ],
273  'ftype': '{',
274  'max_count': 1,
275  'msgid': BsProxyMsgId.ReqGetVConnInfo,
276  'name': 'ReqGetVConnInfo',
277 }
278 ##
279 
280 ## RspGetVConnInfo Message Definition
281 BsProxyMsgDefRspGetVConnInfo = {
282  'fielddef': [
283  {'fid':1, 'ftype':'B', 'max_count':1, 'name':'vconn', },
284  {'fid':2, 'ftype':'i', 'max_count':1, 'name':'rd', },
285  {
286  'fid': 3,
287  'ftype': 's',
288  'max_count': nmBase.NMStringMaxCount,
289  'name': 'client',
290  },
291  {
292  'fid': 4,
293  'ftype': 's',
294  'max_count': nmBase.NMStringMaxCount,
295  'name': 'devuri',
296  },
297  {
298  'fid': 5,
299  'ftype': 's',
300  'max_count': nmBase.NMStringMaxCount,
301  'name': 'moduri',
302  },
303  {
304  'fid': 6,
305  'ftype': 's',
306  'max_count': nmBase.NMStringMaxCount,
307  'name': 'modver',
308  },
309  {
310  'fid': 7,
311  'ftype': 's',
312  'max_count': nmBase.NMStringMaxCount,
313  'name': 'moddate',
314  },
315  ],
316  'ftype': '{',
317  'max_count': 7,
318  'msgid': BsProxyMsgId.RspGetVConnInfo,
319  'name': 'RspGetVConnInfo',
320 }
321 ##
322 
323 ## BsProxy Message Definition Set Dictionary
324 BsProxySetMsgDef = {
325  BsProxyMsgId.ReqDevClose: BsProxyMsgDefReqDevClose,
326  BsProxyMsgId.ReqDevOpen: BsProxyMsgDefReqDevOpen,
327  BsProxyMsgId.ReqGetVConnInfo: BsProxyMsgDefReqGetVConnInfo,
328  BsProxyMsgId.ReqGetVConnList: BsProxyMsgDefReqGetVConnList,
329  BsProxyMsgId.ReqGetVersion: BsProxyMsgDefReqGetVersion,
330  BsProxyMsgId.ReqLoopback: BsProxyMsgDefReqLoopback,
331  BsProxyMsgId.ReqMsgTrace: BsProxyMsgDefReqMsgTrace,
332  BsProxyMsgId.ReqSetLogging: BsProxyMsgDefReqSetLogging,
333  BsProxyMsgId.RspDevOpen: BsProxyMsgDefRspDevOpen,
334  BsProxyMsgId.RspErr: BsProxyMsgDefRspErr,
335  BsProxyMsgId.RspGetVConnInfo: BsProxyMsgDefRspGetVConnInfo,
336  BsProxyMsgId.RspGetVConnList: BsProxyMsgDefRspGetVConnList,
337  BsProxyMsgId.RspGetVersion: BsProxyMsgDefRspGetVersion,
338  BsProxyMsgId.RspLoopback: BsProxyMsgDefRspLoopback,
339  BsProxyMsgId.RspOk: BsProxyMsgDefRspOk,
340 }
341 ##
342 
343 
344 # -----------------------------------------------------------------------------
345 # CLASS: BsProxyNetMsgs
346 # -----------------------------------------------------------------------------
347 
348 class BsProxyNetMsgs(NetMsgsITV):
349  """ BsProxy NetMsgs Class. """
350 
351  #--
352  def __init__(self, **kwargs):
353  """ BsProxy NetMsgs initialization. """
354  kwargs['msgsetname'] = 'BsProxyMsgSet'
355  NetMsgsITV.__init__(self, BsProxySetMsgDef, **kwargs)
356  ##
357 ##
BotSense Swigged Core Python Interface Module.
Definition: BotSenseCore.py:1