Campbell 4WPB100 Spezifikationen Seite 65

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 70
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 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:
Seitenansicht 64
1 2 ... 60 61 62 63 64 65 66 67 68 69 70

Kommentare zu diesen Handbüchern

Keine Kommentare