Package phones :: Module p_etsi
[hide private]
[frames] | no frames]

Source Code for Module phones.p_etsi

  1  # THIS FILE IS AUTOMATICALLY GENERATED.  EDIT THE SOURCE FILE NOT THIS ONE 
  2   
  3  """Various descriptions of data specific to GSM phones""" 
  4   
  5  from prototypes import * 
  6  from prototypeslg import * 
  7   
  8  # We use LSB for all integer like fields 
  9  UINT=UINTlsb 
 10  BOOL=BOOLlsb 
 11   
12 -class echo_off(BaseProtogenClass):
13 __fields=['command'] 14
15 - def __init__(self, *args, **kwargs):
16 dict={} 17 # What was supplied to this function 18 dict.update(kwargs) 19 # Parent constructor 20 super(echo_off,self).__init__(**dict) 21 if self.__class__ is echo_off: 22 self._update(args,dict)
23 24
25 - def getfields(self):
26 return self.__fields
27 28
29 - def _update(self, args, kwargs):
30 super(echo_off,self)._update(args,kwargs) 31 keys=kwargs.keys() 32 for key in keys: 33 if key in self.__fields: 34 setattr(self, key, kwargs[key]) 35 del kwargs[key] 36 # Were any unrecognized kwargs passed in? 37 if __debug__: 38 self._complainaboutunusedargs(echo_off,kwargs) 39 if len(args): 40 dict2={ 'terminator': None, 'default': 'E0V1' } 41 dict2.update(kwargs) 42 kwargs=dict2 43 self.__field_command=USTRING(*args,**dict2)
44 # Make all P fields that haven't already been constructed 45 46
47 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
48 'Writes this packet to the supplied buffer' 49 self._bufferstartoffset=buf.getcurrentoffset() 50 try: self.__field_command 51 except: 52 self.__field_command=USTRING(**{ 'terminator': None, 'default': 'E0V1' }) 53 self.__field_command.writetobuffer(buf) 54 self._bufferendoffset=buf.getcurrentoffset() 55 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
56 57
58 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
59 'Reads this packet from the supplied buffer' 60 self._bufferstartoffset=buf.getcurrentoffset() 61 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 62 self.__field_command=USTRING(**{ 'terminator': None, 'default': 'E0V1' }) 63 self.__field_command.readfrombuffer(buf) 64 self._bufferendoffset=buf.getcurrentoffset()
65 66
67 - def __getfield_command(self):
68 try: self.__field_command 69 except: 70 self.__field_command=USTRING(**{ 'terminator': None, 'default': 'E0V1' }) 71 return self.__field_command.getvalue()
72
73 - def __setfield_command(self, value):
74 if isinstance(value,USTRING): 75 self.__field_command=value 76 else: 77 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': 'E0V1' })
78
79 - def __delfield_command(self): del self.__field_command
80 81 command=property(__getfield_command, __setfield_command, __delfield_command, None) 82
83 - def iscontainer(self):
84 return True
85
86 - def containerelements(self):
87 yield ('command', self.__field_command, None)
88 89 90 91
92 -class esnrequest(BaseProtogenClass):
93 __fields=['command'] 94
95 - def __init__(self, *args, **kwargs):
96 dict={} 97 # What was supplied to this function 98 dict.update(kwargs) 99 # Parent constructor 100 super(esnrequest,self).__init__(**dict) 101 if self.__class__ is esnrequest: 102 self._update(args,dict)
103 104
105 - def getfields(self):
106 return self.__fields
107 108
109 - def _update(self, args, kwargs):
110 super(esnrequest,self)._update(args,kwargs) 111 keys=kwargs.keys() 112 for key in keys: 113 if key in self.__fields: 114 setattr(self, key, kwargs[key]) 115 del kwargs[key] 116 # Were any unrecognized kwargs passed in? 117 if __debug__: 118 self._complainaboutunusedargs(esnrequest,kwargs) 119 if len(args): 120 dict2={ 'terminator': None, 'default': '+GSN' } 121 dict2.update(kwargs) 122 kwargs=dict2 123 self.__field_command=USTRING(*args,**dict2)
124 # Make all P fields that haven't already been constructed 125 126
127 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
128 'Writes this packet to the supplied buffer' 129 self._bufferstartoffset=buf.getcurrentoffset() 130 try: self.__field_command 131 except: 132 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GSN' }) 133 self.__field_command.writetobuffer(buf) 134 self._bufferendoffset=buf.getcurrentoffset() 135 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
136 137
138 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
139 'Reads this packet from the supplied buffer' 140 self._bufferstartoffset=buf.getcurrentoffset() 141 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 142 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GSN' }) 143 self.__field_command.readfrombuffer(buf) 144 self._bufferendoffset=buf.getcurrentoffset()
145 146
147 - def __getfield_command(self):
148 try: self.__field_command 149 except: 150 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GSN' }) 151 return self.__field_command.getvalue()
152
153 - def __setfield_command(self, value):
154 if isinstance(value,USTRING): 155 self.__field_command=value 156 else: 157 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GSN' })
158
159 - def __delfield_command(self): del self.__field_command
160 161 command=property(__getfield_command, __setfield_command, __delfield_command, None) 162
163 - def iscontainer(self):
164 return True
165
166 - def containerelements(self):
167 yield ('command', self.__field_command, None)
168 169 170 171
172 -class esnresponse(BaseProtogenClass):
173 __fields=['command', 'esn'] 174
175 - def __init__(self, *args, **kwargs):
176 dict={} 177 # What was supplied to this function 178 dict.update(kwargs) 179 # Parent constructor 180 super(esnresponse,self).__init__(**dict) 181 if self.__class__ is esnresponse: 182 self._update(args,dict)
183 184
185 - def getfields(self):
186 return self.__fields
187 188
189 - def _update(self, args, kwargs):
190 super(esnresponse,self)._update(args,kwargs) 191 keys=kwargs.keys() 192 for key in keys: 193 if key in self.__fields: 194 setattr(self, key, kwargs[key]) 195 del kwargs[key] 196 # Were any unrecognized kwargs passed in? 197 if __debug__: 198 self._complainaboutunusedargs(esnresponse,kwargs) 199 if len(args): raise TypeError('Unexpected arguments supplied: '+`args`)
200 # Make all P fields that haven't already been constructed 201 202
203 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
204 'Writes this packet to the supplied buffer' 205 self._bufferstartoffset=buf.getcurrentoffset() 206 self.__field_command.writetobuffer(buf) 207 self.__field_esn.writetobuffer(buf) 208 self._bufferendoffset=buf.getcurrentoffset() 209 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
210 211
212 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
213 'Reads this packet from the supplied buffer' 214 self._bufferstartoffset=buf.getcurrentoffset() 215 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 216 self.__field_command=CSVSTRING(**{'quotechar': None, 'terminator': ord(' '), 'default': '+GSN'}) 217 self.__field_command.readfrombuffer(buf) 218 self.__field_esn=CSVSTRING(**{'quotechar': None, 'terminator': None}) 219 self.__field_esn.readfrombuffer(buf) 220 self._bufferendoffset=buf.getcurrentoffset()
221 222
223 - def __getfield_command(self):
224 return self.__field_command.getvalue()
225
226 - def __setfield_command(self, value):
227 if isinstance(value,CSVSTRING): 228 self.__field_command=value 229 else: 230 self.__field_command=CSVSTRING(value,**{'quotechar': None, 'terminator': ord(' '), 'default': '+GSN'})
231
232 - def __delfield_command(self): del self.__field_command
233 234 command=property(__getfield_command, __setfield_command, __delfield_command, None) 235
236 - def __getfield_esn(self):
237 return self.__field_esn.getvalue()
238
239 - def __setfield_esn(self, value):
240 if isinstance(value,CSVSTRING): 241 self.__field_esn=value 242 else: 243 self.__field_esn=CSVSTRING(value,**{'quotechar': None, 'terminator': None})
244
245 - def __delfield_esn(self): del self.__field_esn
246 247 esn=property(__getfield_esn, __setfield_esn, __delfield_esn, None) 248
249 - def iscontainer(self):
250 return True
251
252 - def containerelements(self):
253 yield ('command', self.__field_command, None) 254 yield ('esn', self.__field_esn, None)
255 256 257 258
259 -class SIM_ID_Req(BaseProtogenClass):
260 __fields=['command'] 261
262 - def __init__(self, *args, **kwargs):
263 dict={} 264 # What was supplied to this function 265 dict.update(kwargs) 266 # Parent constructor 267 super(SIM_ID_Req,self).__init__(**dict) 268 if self.__class__ is SIM_ID_Req: 269 self._update(args,dict)
270 271
272 - def getfields(self):
273 return self.__fields
274 275
276 - def _update(self, args, kwargs):
277 super(SIM_ID_Req,self)._update(args,kwargs) 278 keys=kwargs.keys() 279 for key in keys: 280 if key in self.__fields: 281 setattr(self, key, kwargs[key]) 282 del kwargs[key] 283 # Were any unrecognized kwargs passed in? 284 if __debug__: 285 self._complainaboutunusedargs(SIM_ID_Req,kwargs) 286 if len(args): 287 dict2={ 'terminator': None, 'default': '+CIMI' } 288 dict2.update(kwargs) 289 kwargs=dict2 290 self.__field_command=USTRING(*args,**dict2)
291 # Make all P fields that haven't already been constructed 292 293
294 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
295 'Writes this packet to the supplied buffer' 296 self._bufferstartoffset=buf.getcurrentoffset() 297 try: self.__field_command 298 except: 299 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+CIMI' }) 300 self.__field_command.writetobuffer(buf) 301 self._bufferendoffset=buf.getcurrentoffset() 302 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
303 304
305 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
306 'Reads this packet from the supplied buffer' 307 self._bufferstartoffset=buf.getcurrentoffset() 308 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 309 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+CIMI' }) 310 self.__field_command.readfrombuffer(buf) 311 self._bufferendoffset=buf.getcurrentoffset()
312 313
314 - def __getfield_command(self):
315 try: self.__field_command 316 except: 317 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+CIMI' }) 318 return self.__field_command.getvalue()
319
320 - def __setfield_command(self, value):
321 if isinstance(value,USTRING): 322 self.__field_command=value 323 else: 324 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+CIMI' })
325
326 - def __delfield_command(self): del self.__field_command
327 328 command=property(__getfield_command, __setfield_command, __delfield_command, None) 329
330 - def iscontainer(self):
331 return True
332
333 - def containerelements(self):
334 yield ('command', self.__field_command, None)
335 336 337 338
339 -class single_value_resp(BaseProtogenClass):
340 __fields=['value'] 341
342 - def __init__(self, *args, **kwargs):
343 dict={} 344 # What was supplied to this function 345 dict.update(kwargs) 346 # Parent constructor 347 super(single_value_resp,self).__init__(**dict) 348 if self.__class__ is single_value_resp: 349 self._update(args,dict)
350 351
352 - def getfields(self):
353 return self.__fields
354 355
356 - def _update(self, args, kwargs):
357 super(single_value_resp,self)._update(args,kwargs) 358 keys=kwargs.keys() 359 for key in keys: 360 if key in self.__fields: 361 setattr(self, key, kwargs[key]) 362 del kwargs[key] 363 # Were any unrecognized kwargs passed in? 364 if __debug__: 365 self._complainaboutunusedargs(single_value_resp,kwargs) 366 if len(args): 367 dict2={ 'terminator': None } 368 dict2.update(kwargs) 369 kwargs=dict2 370 self.__field_value=USTRING(*args,**dict2)
371 # Make all P fields that haven't already been constructed 372 373
374 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
375 'Writes this packet to the supplied buffer' 376 self._bufferstartoffset=buf.getcurrentoffset() 377 self.__field_value.writetobuffer(buf) 378 self._bufferendoffset=buf.getcurrentoffset() 379 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
380 381
382 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
383 'Reads this packet from the supplied buffer' 384 self._bufferstartoffset=buf.getcurrentoffset() 385 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 386 self.__field_value=USTRING(**{ 'terminator': None }) 387 self.__field_value.readfrombuffer(buf) 388 self._bufferendoffset=buf.getcurrentoffset()
389 390
391 - def __getfield_value(self):
392 return self.__field_value.getvalue()
393
394 - def __setfield_value(self, value):
395 if isinstance(value,USTRING): 396 self.__field_value=value 397 else: 398 self.__field_value=USTRING(value,**{ 'terminator': None })
399
400 - def __delfield_value(self): del self.__field_value
401 402 value=property(__getfield_value, __setfield_value, __delfield_value, None) 403
404 - def iscontainer(self):
405 return True
406
407 - def containerelements(self):
408 yield ('value', self.__field_value, None)
409 410 411 412
413 -class manufacturer_id_req(BaseProtogenClass):
414 __fields=['command'] 415
416 - def __init__(self, *args, **kwargs):
417 dict={} 418 # What was supplied to this function 419 dict.update(kwargs) 420 # Parent constructor 421 super(manufacturer_id_req,self).__init__(**dict) 422 if self.__class__ is manufacturer_id_req: 423 self._update(args,dict)
424 425
426 - def getfields(self):
427 return self.__fields
428 429
430 - def _update(self, args, kwargs):
431 super(manufacturer_id_req,self)._update(args,kwargs) 432 keys=kwargs.keys() 433 for key in keys: 434 if key in self.__fields: 435 setattr(self, key, kwargs[key]) 436 del kwargs[key] 437 # Were any unrecognized kwargs passed in? 438 if __debug__: 439 self._complainaboutunusedargs(manufacturer_id_req,kwargs) 440 if len(args): 441 dict2={ 'terminator': None, 'default': '+GMI'} 442 dict2.update(kwargs) 443 kwargs=dict2 444 self.__field_command=USTRING(*args,**dict2)
445 # Make all P fields that haven't already been constructed 446 447
448 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
449 'Writes this packet to the supplied buffer' 450 self._bufferstartoffset=buf.getcurrentoffset() 451 try: self.__field_command 452 except: 453 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMI'}) 454 self.__field_command.writetobuffer(buf) 455 self._bufferendoffset=buf.getcurrentoffset() 456 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
457 458
459 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
460 'Reads this packet from the supplied buffer' 461 self._bufferstartoffset=buf.getcurrentoffset() 462 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 463 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMI'}) 464 self.__field_command.readfrombuffer(buf) 465 self._bufferendoffset=buf.getcurrentoffset()
466 467
468 - def __getfield_command(self):
469 try: self.__field_command 470 except: 471 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMI'}) 472 return self.__field_command.getvalue()
473
474 - def __setfield_command(self, value):
475 if isinstance(value,USTRING): 476 self.__field_command=value 477 else: 478 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GMI'})
479
480 - def __delfield_command(self): del self.__field_command
481 482 command=property(__getfield_command, __setfield_command, __delfield_command, None) 483
484 - def iscontainer(self):
485 return True
486
487 - def containerelements(self):
488 yield ('command', self.__field_command, None)
489 490 491 492
493 -class model_id_req(BaseProtogenClass):
494 __fields=['command'] 495
496 - def __init__(self, *args, **kwargs):
497 dict={} 498 # What was supplied to this function 499 dict.update(kwargs) 500 # Parent constructor 501 super(model_id_req,self).__init__(**dict) 502 if self.__class__ is model_id_req: 503 self._update(args,dict)
504 505
506 - def getfields(self):
507 return self.__fields
508 509
510 - def _update(self, args, kwargs):
511 super(model_id_req,self)._update(args,kwargs) 512 keys=kwargs.keys() 513 for key in keys: 514 if key in self.__fields: 515 setattr(self, key, kwargs[key]) 516 del kwargs[key] 517 # Were any unrecognized kwargs passed in? 518 if __debug__: 519 self._complainaboutunusedargs(model_id_req,kwargs) 520 if len(args): 521 dict2={ 'terminator': None, 'default': '+GMM' } 522 dict2.update(kwargs) 523 kwargs=dict2 524 self.__field_command=USTRING(*args,**dict2)
525 # Make all P fields that haven't already been constructed 526 527
528 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
529 'Writes this packet to the supplied buffer' 530 self._bufferstartoffset=buf.getcurrentoffset() 531 try: self.__field_command 532 except: 533 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMM' }) 534 self.__field_command.writetobuffer(buf) 535 self._bufferendoffset=buf.getcurrentoffset() 536 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
537 538
539 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
540 'Reads this packet from the supplied buffer' 541 self._bufferstartoffset=buf.getcurrentoffset() 542 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 543 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMM' }) 544 self.__field_command.readfrombuffer(buf) 545 self._bufferendoffset=buf.getcurrentoffset()
546 547
548 - def __getfield_command(self):
549 try: self.__field_command 550 except: 551 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMM' }) 552 return self.__field_command.getvalue()
553
554 - def __setfield_command(self, value):
555 if isinstance(value,USTRING): 556 self.__field_command=value 557 else: 558 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GMM' })
559
560 - def __delfield_command(self): del self.__field_command
561 562 command=property(__getfield_command, __setfield_command, __delfield_command, None) 563
564 - def iscontainer(self):
565 return True
566
567 - def containerelements(self):
568 yield ('command', self.__field_command, None)
569 570 571 572
573 -class firmware_version_req(BaseProtogenClass):
574 __fields=['command'] 575
576 - def __init__(self, *args, **kwargs):
577 dict={} 578 # What was supplied to this function 579 dict.update(kwargs) 580 # Parent constructor 581 super(firmware_version_req,self).__init__(**dict) 582 if self.__class__ is firmware_version_req: 583 self._update(args,dict)
584 585
586 - def getfields(self):
587 return self.__fields
588 589
590 - def _update(self, args, kwargs):
591 super(firmware_version_req,self)._update(args,kwargs) 592 keys=kwargs.keys() 593 for key in keys: 594 if key in self.__fields: 595 setattr(self, key, kwargs[key]) 596 del kwargs[key] 597 # Were any unrecognized kwargs passed in? 598 if __debug__: 599 self._complainaboutunusedargs(firmware_version_req,kwargs) 600 if len(args): 601 dict2={ 'terminator': None, 'default': '+GMR' } 602 dict2.update(kwargs) 603 kwargs=dict2 604 self.__field_command=USTRING(*args,**dict2)
605 # Make all P fields that haven't already been constructed 606 607
608 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
609 'Writes this packet to the supplied buffer' 610 self._bufferstartoffset=buf.getcurrentoffset() 611 try: self.__field_command 612 except: 613 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMR' }) 614 self.__field_command.writetobuffer(buf) 615 self._bufferendoffset=buf.getcurrentoffset() 616 if autolog and self._bufferstartoffset==0: self.autologwrite(buf, logtitle=logtitle)
617 618
619 - def readfrombuffer(self,buf,autolog=True,logtitle="<read data>"):
620 'Reads this packet from the supplied buffer' 621 self._bufferstartoffset=buf.getcurrentoffset() 622 if autolog and self._bufferstartoffset==0: self.autologread(buf, logtitle=logtitle) 623 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMR' }) 624 self.__field_command.readfrombuffer(buf) 625 self._bufferendoffset=buf.getcurrentoffset()
626 627
628 - def __getfield_command(self):
629 try: self.__field_command 630 except: 631 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMR' }) 632 return self.__field_command.getvalue()
633
634 - def __setfield_command(self, value):
635 if isinstance(value,USTRING): 636 self.__field_command=value 637 else: 638 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GMR' })
639
640 - def __delfield_command(self): del self.__field_command
641 642 command=property(__getfield_command, __setfield_command, __delfield_command, None) 643
644 - def iscontainer(self):
645 return True
646
647 - def containerelements(self):
648 yield ('command', self.__field_command, None)
649