Specifications
64
ValueBytes.append(ord(BinaryMessage[BytePointer +
offset]))
BytePointer = BytePointer + ValueBytesNum
Value = GFP2toDEC(ValueBytes)
if Value == 8191:
DataLine = DataLine + "NAN"
elif Value == 8190:
DataLine = DataLine + "INF"
elif Value == -8190:
DataLine = DataLine + "-INF"
else:
DataLine = DataLine + str(Value)
#print ValueBytes, Value
except IndexError:
DataLine = DataLine + '?'
if MessageFormat[1][ValueNum] == 'l':
try:
for offset in range(0,ValueBytesNum):
ValueBytes.append(ord(BinaryMessage[BytePointer +
offset]))
BytePointer = BytePointer + ValueBytesNum
Value = GLI4toDEC(ValueBytes)
DataLine = DataLine + str(Value)
if Value == -2147483648:
DataLine = DataLine + "NAN"
else:
DataLine = DataLine + str(Value)
#print ValueBytes, Value
#print ValueBytes, Value
except IndexError:
DataLine = DataLine + '?'
elif MessageFormat[1][ValueNum] == 't':
try:
for offset in range(0,ValueBytesNum):
ValueBytes.append(ord(BinaryMessage[BytePointer +
offset]))
BytePointer = BytePointer + ValueBytesNum
Value = GLI4toDEC(ValueBytes)
DataLine = DataLine + time.strftime("%Y-%m-%d
%H:%M:%S", time.gmtime(Value + EpochOffset)) + ',' + str(Value)
#print ValueBytes, Value, time.asctime(time.gmtime(Value +
631148400))
except IndexError:
DataLine = DataLine + '?'
elif MessageFormat[1][ValueNum] == 'g':
try: