Campbell 4WPB100 Especificaciones Pagina 65

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 70
  • Tabla de contenidos
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 64
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:
Vista de pagina 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70

Comentarios a estos manuales

Sin comentarios