-
Notifications
You must be signed in to change notification settings - Fork 0
/
ttypes.py
696 lines (624 loc) · 21.4 KB
/
ttypes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
#
# Autogenerated by Thrift Compiler (0.9.1)
#
# DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
#
# options string: py
#
from thrift.Thrift import TType, TMessageType, TException, TApplicationException
from thrift.transport import TTransport
from thrift.protocol import TBinaryProtocol, TProtocol
try:
from thrift.protocol import fastbinary
except:
fastbinary = None
class emExceptionType:
CRITICAL = 0
NONFATAL = 1
_VALUES_TO_NAMES = {
0: "CRITICAL",
1: "NONFATAL",
}
_NAMES_TO_VALUES = {
"CRITICAL": 0,
"NONFATAL": 1,
}
class emLogEventType:
"""
Standard types of waveform that the signal generator can produce
"""
emNULL = 0
CONFIG = 1
emERROR = 2
MISC = 3
COMMAND = 4
RESPONSE = 5
DONOTLOG = 6
DISPLAYASMESSAGEBOX = 7
_VALUES_TO_NAMES = {
0: "emNULL",
1: "CONFIG",
2: "emERROR",
3: "MISC",
4: "COMMAND",
5: "RESPONSE",
6: "DONOTLOG",
7: "DISPLAYASMESSAGEBOX",
}
_NAMES_TO_VALUES = {
"emNULL": 0,
"CONFIG": 1,
"emERROR": 2,
"MISC": 3,
"COMMAND": 4,
"RESPONSE": 5,
"DONOTLOG": 6,
"DISPLAYASMESSAGEBOX": 7,
}
class emSequenceOperationType:
"""
The EM controller plays back a set of operations. Think of it as a multitrack audio editing software. Logcally, each PIN has its own queue of operations. Each of these operations has a start and end time, and a set of parameters to define what each pin will be doing during that time. Operations are one of a few basic types:
"""
emNULL = 0
ARBITRARY = 1
RECORD = 2
WAIT = 3
PREDEFINED = 4
CONSTANT = 5
DIGITAL = 6
CONSTANT_FROM_REGISTER = 7
_VALUES_TO_NAMES = {
0: "emNULL",
1: "ARBITRARY",
2: "RECORD",
3: "WAIT",
4: "PREDEFINED",
5: "CONSTANT",
6: "DIGITAL",
7: "CONSTANT_FROM_REGISTER",
}
_NAMES_TO_VALUES = {
"emNULL": 0,
"ARBITRARY": 1,
"RECORD": 2,
"WAIT": 3,
"PREDEFINED": 4,
"CONSTANT": 5,
"DIGITAL": 6,
"CONSTANT_FROM_REGISTER": 7,
}
class emWaveFormType:
"""
Standard types of waveform that the signal generator can produce
"""
emNULL = 0
ARBITRARY = 1
PWM = 2
SAW = 3
SINE = 4
_VALUES_TO_NAMES = {
0: "emNULL",
1: "ARBITRARY",
2: "PWM",
3: "SAW",
4: "SINE",
}
_NAMES_TO_VALUES = {
"emNULL": 0,
"ARBITRARY": 1,
"PWM": 2,
"SAW": 3,
"SINE": 4,
}
class emLogServerSettings:
"""
Structure to encapsulate log setting
Attributes:
- logServer: URL for log server
- experimentName: Name of experiment
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'logServer', None, None, ), # 1
(2, TType.STRING, 'experimentName', None, None, ), # 2
)
def __init__(self, logServer=None, experimentName=None,):
self.logServer = logServer
self.experimentName = experimentName
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.logServer = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.experimentName = iprot.readString();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('emLogServerSettings')
if self.logServer is not None:
oprot.writeFieldBegin('logServer', TType.STRING, 1)
oprot.writeString(self.logServer)
oprot.writeFieldEnd()
if self.experimentName is not None:
oprot.writeFieldBegin('experimentName', TType.STRING, 2)
oprot.writeString(self.experimentName)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class emException(TException):
"""
The device directly controlling the EM should make sure sensible things are happening, and if not throw an exception. All methods should return problems via exceptions. Exceptions should contain as much information as possible. Exceptions can be fatal or non fatal. On a fatal exception, the controlling program should probably abandon what it is doing and reset.
Attributes:
- errorCode: Error codes, to be defined in documentation
- Reason: Why the error was thrown
- Source: Where (e.g. module, line number) the error came from
- exceptionType: What type of error this is
"""
thrift_spec = (
None, # 0
(1, TType.I32, 'errorCode', None, None, ), # 1
(2, TType.STRING, 'Reason', None, None, ), # 2
(3, TType.STRING, 'Source', None, None, ), # 3
(4, TType.I32, 'exceptionType', None, None, ), # 4
)
def __init__(self, errorCode=None, Reason=None, Source=None, exceptionType=None,):
self.errorCode = errorCode
self.Reason = Reason
self.Source = Source
self.exceptionType = exceptionType
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.I32:
self.errorCode = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.STRING:
self.Reason = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.STRING:
self.Source = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.I32:
self.exceptionType = iprot.readI32();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('emException')
if self.errorCode is not None:
oprot.writeFieldBegin('errorCode', TType.I32, 1)
oprot.writeI32(self.errorCode)
oprot.writeFieldEnd()
if self.Reason is not None:
oprot.writeFieldBegin('Reason', TType.STRING, 2)
oprot.writeString(self.Reason)
oprot.writeFieldEnd()
if self.Source is not None:
oprot.writeFieldBegin('Source', TType.STRING, 3)
oprot.writeString(self.Source)
oprot.writeFieldEnd()
if self.exceptionType is not None:
oprot.writeFieldBegin('exceptionType', TType.I32, 4)
oprot.writeI32(self.exceptionType)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __str__(self):
return repr(self)
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class emWaveForm:
"""
Structure for an arbitrary wave form.
Attributes:
- Samples: Buffer holding the values
- Rate: Playback rate
- SampleCount: Length of the buffer
"""
thrift_spec = (
None, # 0
(1, TType.LIST, 'Samples', (TType.I32,None), None, ), # 1
(2, TType.I32, 'Rate', None, None, ), # 2
(3, TType.I32, 'SampleCount', None, None, ), # 3
)
def __init__(self, Samples=None, Rate=None, SampleCount=None,):
self.Samples = Samples
self.Rate = Rate
self.SampleCount = SampleCount
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.LIST:
self.Samples = []
(_etype3, _size0) = iprot.readListBegin()
for _i4 in xrange(_size0):
_elem5 = iprot.readI32();
self.Samples.append(_elem5)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.I32:
self.Rate = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I32:
self.SampleCount = iprot.readI32();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('emWaveForm')
if self.Samples is not None:
oprot.writeFieldBegin('Samples', TType.LIST, 1)
oprot.writeListBegin(TType.I32, len(self.Samples))
for iter6 in self.Samples:
oprot.writeI32(iter6)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.Rate is not None:
oprot.writeFieldBegin('Rate', TType.I32, 2)
oprot.writeI32(self.Rate)
oprot.writeFieldEnd()
if self.SampleCount is not None:
oprot.writeFieldBegin('SampleCount', TType.I32, 3)
oprot.writeI32(self.SampleCount)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class emSequenceItem:
"""
Definition of an operation to be performed. Not all parameters may be used. It will depend on the operationType. If something can't be performed by the EM, exceptions should be thrown when adding to the buffers. Timings are defined by FPGA ticks, which will need to be converted to Hz.
Attributes:
- operationType: What the action is
- pin: Where the action is applied to, as a list of connections to the material
- startTime: Ticks it should start at
- endTime: Ticks it should end at
- frequency: Definition of signal, if appropriate
- phase
- cycleTime
- amplitude
- waveFormType: Predefined wave form, eg. square, sawtooth, sine
- waveForm: If playing back an arbitrary signal, buffer is attached here
- waitForTrigger: If >=0 wait for a trigger on certain pin before running
- ValueSourceRegister: if CONSTANT_FROM_REGISTER, then use this value
"""
thrift_spec = (
None, # 0
(1, TType.I32, 'operationType', None, None, ), # 1
(2, TType.LIST, 'pin', (TType.I32,None), None, ), # 2
(3, TType.I64, 'startTime', None, None, ), # 3
(4, TType.I64, 'endTime', None, None, ), # 4
(5, TType.I32, 'frequency', None, 0, ), # 5
(6, TType.I32, 'phase', None, 0, ), # 6
(7, TType.I32, 'cycleTime', None, 0, ), # 7
(8, TType.I32, 'amplitude', None, 0, ), # 8
(9, TType.I32, 'waveFormType', None, None, ), # 9
(10, TType.STRUCT, 'waveForm', (emWaveForm, emWaveForm.thrift_spec), None, ), # 10
(11, TType.I32, 'waitForTrigger', None, -1, ), # 11
(12, TType.I32, 'ValueSourceRegister', None, -1, ), # 12
)
def __init__(self, operationType=None, pin=None, startTime=None, endTime=None, frequency=thrift_spec[5][4], phase=thrift_spec[6][4], cycleTime=thrift_spec[7][4], amplitude=thrift_spec[8][4], waveFormType=None, waveForm=None, waitForTrigger=thrift_spec[11][4], ValueSourceRegister=thrift_spec[12][4],):
self.operationType = operationType
self.pin = pin
self.startTime = startTime
self.endTime = endTime
self.frequency = frequency
self.phase = phase
self.cycleTime = cycleTime
self.amplitude = amplitude
self.waveFormType = waveFormType
self.waveForm = waveForm
self.waitForTrigger = waitForTrigger
self.ValueSourceRegister = ValueSourceRegister
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.I32:
self.operationType = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.LIST:
self.pin = []
(_etype10, _size7) = iprot.readListBegin()
for _i11 in xrange(_size7):
_elem12 = iprot.readI32();
self.pin.append(_elem12)
iprot.readListEnd()
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.I64:
self.startTime = iprot.readI64();
else:
iprot.skip(ftype)
elif fid == 4:
if ftype == TType.I64:
self.endTime = iprot.readI64();
else:
iprot.skip(ftype)
elif fid == 5:
if ftype == TType.I32:
self.frequency = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 6:
if ftype == TType.I32:
self.phase = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 7:
if ftype == TType.I32:
self.cycleTime = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 8:
if ftype == TType.I32:
self.amplitude = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 9:
if ftype == TType.I32:
self.waveFormType = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 10:
if ftype == TType.STRUCT:
self.waveForm = emWaveForm()
self.waveForm.read(iprot)
else:
iprot.skip(ftype)
elif fid == 11:
if ftype == TType.I32:
self.waitForTrigger = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 12:
if ftype == TType.I32:
self.ValueSourceRegister = iprot.readI32();
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('emSequenceItem')
if self.operationType is not None:
oprot.writeFieldBegin('operationType', TType.I32, 1)
oprot.writeI32(self.operationType)
oprot.writeFieldEnd()
if self.pin is not None:
oprot.writeFieldBegin('pin', TType.LIST, 2)
oprot.writeListBegin(TType.I32, len(self.pin))
for iter13 in self.pin:
oprot.writeI32(iter13)
oprot.writeListEnd()
oprot.writeFieldEnd()
if self.startTime is not None:
oprot.writeFieldBegin('startTime', TType.I64, 3)
oprot.writeI64(self.startTime)
oprot.writeFieldEnd()
if self.endTime is not None:
oprot.writeFieldBegin('endTime', TType.I64, 4)
oprot.writeI64(self.endTime)
oprot.writeFieldEnd()
if self.frequency is not None:
oprot.writeFieldBegin('frequency', TType.I32, 5)
oprot.writeI32(self.frequency)
oprot.writeFieldEnd()
if self.phase is not None:
oprot.writeFieldBegin('phase', TType.I32, 6)
oprot.writeI32(self.phase)
oprot.writeFieldEnd()
if self.cycleTime is not None:
oprot.writeFieldBegin('cycleTime', TType.I32, 7)
oprot.writeI32(self.cycleTime)
oprot.writeFieldEnd()
if self.amplitude is not None:
oprot.writeFieldBegin('amplitude', TType.I32, 8)
oprot.writeI32(self.amplitude)
oprot.writeFieldEnd()
if self.waveFormType is not None:
oprot.writeFieldBegin('waveFormType', TType.I32, 9)
oprot.writeI32(self.waveFormType)
oprot.writeFieldEnd()
if self.waveForm is not None:
oprot.writeFieldBegin('waveForm', TType.STRUCT, 10)
self.waveForm.write(oprot)
oprot.writeFieldEnd()
if self.waitForTrigger is not None:
oprot.writeFieldBegin('waitForTrigger', TType.I32, 11)
oprot.writeI32(self.waitForTrigger)
oprot.writeFieldEnd()
if self.ValueSourceRegister is not None:
oprot.writeFieldBegin('ValueSourceRegister', TType.I32, 12)
oprot.writeI32(self.ValueSourceRegister)
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)
class emDebugInfo:
"""
Debug struct
Attributes:
- stateBlob
- stateBlobLength
- values
"""
thrift_spec = (
None, # 0
(1, TType.STRING, 'stateBlob', None, None, ), # 1
(2, TType.I32, 'stateBlobLength', None, None, ), # 2
(3, TType.MAP, 'values', (TType.STRING,None,TType.STRING,None), None, ), # 3
)
def __init__(self, stateBlob=None, stateBlobLength=None, values=None,):
self.stateBlob = stateBlob
self.stateBlobLength = stateBlobLength
self.values = values
def read(self, iprot):
if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
return
iprot.readStructBegin()
while True:
(fname, ftype, fid) = iprot.readFieldBegin()
if ftype == TType.STOP:
break
if fid == 1:
if ftype == TType.STRING:
self.stateBlob = iprot.readString();
else:
iprot.skip(ftype)
elif fid == 2:
if ftype == TType.I32:
self.stateBlobLength = iprot.readI32();
else:
iprot.skip(ftype)
elif fid == 3:
if ftype == TType.MAP:
self.values = {}
(_ktype15, _vtype16, _size14 ) = iprot.readMapBegin()
for _i18 in xrange(_size14):
_key19 = iprot.readString();
_val20 = iprot.readString();
self.values[_key19] = _val20
iprot.readMapEnd()
else:
iprot.skip(ftype)
else:
iprot.skip(ftype)
iprot.readFieldEnd()
iprot.readStructEnd()
def write(self, oprot):
if oprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and self.thrift_spec is not None and fastbinary is not None:
oprot.trans.write(fastbinary.encode_binary(self, (self.__class__, self.thrift_spec)))
return
oprot.writeStructBegin('emDebugInfo')
if self.stateBlob is not None:
oprot.writeFieldBegin('stateBlob', TType.STRING, 1)
oprot.writeString(self.stateBlob)
oprot.writeFieldEnd()
if self.stateBlobLength is not None:
oprot.writeFieldBegin('stateBlobLength', TType.I32, 2)
oprot.writeI32(self.stateBlobLength)
oprot.writeFieldEnd()
if self.values is not None:
oprot.writeFieldBegin('values', TType.MAP, 3)
oprot.writeMapBegin(TType.STRING, TType.STRING, len(self.values))
for kiter21,viter22 in self.values.items():
oprot.writeString(kiter21)
oprot.writeString(viter22)
oprot.writeMapEnd()
oprot.writeFieldEnd()
oprot.writeFieldStop()
oprot.writeStructEnd()
def validate(self):
return
def __repr__(self):
L = ['%s=%r' % (key, value)
for key, value in self.__dict__.iteritems()]
return '%s(%s)' % (self.__class__.__name__, ', '.join(L))
def __eq__(self, other):
return isinstance(other, self.__class__) and self.__dict__ == other.__dict__
def __ne__(self, other):
return not (self == other)