Last active
July 21, 2016 13:33
-
-
Save RReverser/bf31bfd30a09362c95a78894a73d359b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var jBinary = require('jbinary'); | |
var FLGTypeSet = { | |
'jBinary.all': ['array', 'LOG_T'], | |
'jBinary.littleEndian': true, | |
STEP_T: { | |
tempSp: 'float', | |
tempRamp: 'float', | |
humpSp: 'float', | |
time: 'TIME_T' | |
}, | |
TIME_T: { | |
hour: 'int16', | |
min: 'int8', | |
type: 'int8' | |
}, | |
DATE_T: { | |
day: 'int8', | |
month: 'int8', | |
year: 'int16' | |
}, | |
LOG_T: { | |
time: 'TIME_T', // time of log | |
date: 'DATE_T', // date of log | |
temp: 'float', // chamber temperature | |
tempSp: 'float', // temperature set point | |
tmpRamp: 'float', // temperature ramp | |
hum: 'float', // chamber humidity | |
humSp: 'float', // humidity set point | |
light: 'uint8', // chamber light | |
fan: 'uint8', // chamber fan | |
_align1: ['skip', 2], | |
tmpMax: 'float', // maximum temperature allowed | |
tmpMin: 'float', // minimum temperature allowed | |
humMax: 'float', // maximum humidity allowed | |
humMin: 'float', // minimum humidity allowed | |
roomTemp: 'uint8', // room temperature | |
_align2: ['skip', 1], | |
alarmStatus: 'uint16' // alarm status (refer to alarm mask defines) | |
} | |
} | |
jBinary.load('10.FLG', FLGTypeSet, function(err, binary) { | |
console.log(binary.readAll()); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment