This file contains 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
/** | |
* bcd2number -> takes a nodejs buffer with a BCD and returns the corresponding number. | |
* @param buffer The node.js Buffer object | |
* @param offset The byte offset in the buffer where the BCD starts | |
* @param length The number of bytes to read (a single byte represents 2 digits) | |
* @return number | |
*/ | |
var bcd2number = function(buffer, offset, length) | |
{ | |
var n = 0; |