Package phones ::
Module p_etsi
|
|
1
2
3 """Various descriptions of data specific to GSM phones"""
4
5 from prototypes import *
6 from prototypeslg import *
7
8
9 UINT=UINTlsb
10 BOOL=BOOLlsb
11
13 __fields=['command']
14
23
24
27
28
44
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
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
68 try: self.__field_command
69 except:
70 self.__field_command=USTRING(**{ 'terminator': None, 'default': 'E0V1' })
71 return self.__field_command.getvalue()
72
74 if isinstance(value,USTRING):
75 self.__field_command=value
76 else:
77 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': 'E0V1' })
78
80
81 command=property(__getfield_command, __setfield_command, __delfield_command, None)
82
85
87 yield ('command', self.__field_command, None)
88
89
90
91
93 __fields=['command']
94
103
104
107
108
124
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
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
148 try: self.__field_command
149 except:
150 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GSN' })
151 return self.__field_command.getvalue()
152
154 if isinstance(value,USTRING):
155 self.__field_command=value
156 else:
157 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GSN' })
158
160
161 command=property(__getfield_command, __setfield_command, __delfield_command, None)
162
165
167 yield ('command', self.__field_command, None)
168
169
170
171
173 __fields=['command', 'esn']
174
183
184
187
188
200
201
202
203 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
210
211
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
224 return self.__field_command.getvalue()
225
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
233
234 command=property(__getfield_command, __setfield_command, __delfield_command, None)
235
238
240 if isinstance(value,CSVSTRING):
241 self.__field_esn=value
242 else:
243 self.__field_esn=CSVSTRING(value,**{'quotechar': None, 'terminator': None})
244
246
247 esn=property(__getfield_esn, __setfield_esn, __delfield_esn, None)
248
251
253 yield ('command', self.__field_command, None)
254 yield ('esn', self.__field_esn, None)
255
256
257
258
260 __fields=['command']
261
270
271
274
275
291
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
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
315 try: self.__field_command
316 except:
317 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+CIMI' })
318 return self.__field_command.getvalue()
319
321 if isinstance(value,USTRING):
322 self.__field_command=value
323 else:
324 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+CIMI' })
325
327
328 command=property(__getfield_command, __setfield_command, __delfield_command, None)
329
332
334 yield ('command', self.__field_command, None)
335
336
337
338
340 __fields=['value']
341
350
351
354
355
371
372
373
374 - def writetobuffer(self,buf,autolog=True,logtitle="<written data>"):
380
381
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
392 return self.__field_value.getvalue()
393
395 if isinstance(value,USTRING):
396 self.__field_value=value
397 else:
398 self.__field_value=USTRING(value,**{ 'terminator': None })
399
401
402 value=property(__getfield_value, __setfield_value, __delfield_value, None)
403
406
408 yield ('value', self.__field_value, None)
409
410
411
412
414 __fields=['command']
415
424
425
428
429
445
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
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
469 try: self.__field_command
470 except:
471 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMI'})
472 return self.__field_command.getvalue()
473
475 if isinstance(value,USTRING):
476 self.__field_command=value
477 else:
478 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GMI'})
479
481
482 command=property(__getfield_command, __setfield_command, __delfield_command, None)
483
486
488 yield ('command', self.__field_command, None)
489
490
491
492
494 __fields=['command']
495
504
505
508
509
525
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
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
549 try: self.__field_command
550 except:
551 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMM' })
552 return self.__field_command.getvalue()
553
555 if isinstance(value,USTRING):
556 self.__field_command=value
557 else:
558 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GMM' })
559
561
562 command=property(__getfield_command, __setfield_command, __delfield_command, None)
563
566
568 yield ('command', self.__field_command, None)
569
570
571
572
574 __fields=['command']
575
584
585
588
589
605
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
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
629 try: self.__field_command
630 except:
631 self.__field_command=USTRING(**{ 'terminator': None, 'default': '+GMR' })
632 return self.__field_command.getvalue()
633
635 if isinstance(value,USTRING):
636 self.__field_command=value
637 else:
638 self.__field_command=USTRING(value,**{ 'terminator': None, 'default': '+GMR' })
639
641
642 command=property(__getfield_command, __setfield_command, __delfield_command, None)
643
646
648 yield ('command', self.__field_command, None)
649