diff options
author | Brad Davis <[email protected]> | 2014-09-04 14:32:18 -0700 |
---|---|---|
committer | Brad Davis <[email protected]> | 2014-09-04 14:32:18 -0700 |
commit | 32dc394487af8e4fb1b43fb852f1d5448eaf7f31 (patch) | |
tree | be53f49e96e8e2bba1dada04197cf508b60b4eaf /LibOVR/Src/OVR_SerialFormat.h | |
parent | 85d370840fa4d49a63331a203460fe763288d417 (diff) |
Updating to windows 0.4.2
Diffstat (limited to 'LibOVR/Src/OVR_SerialFormat.h')
-rw-r--r-- | LibOVR/Src/OVR_SerialFormat.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/LibOVR/Src/OVR_SerialFormat.h b/LibOVR/Src/OVR_SerialFormat.h index 1050e74..22151f7 100644 --- a/LibOVR/Src/OVR_SerialFormat.h +++ b/LibOVR/Src/OVR_SerialFormat.h @@ -117,11 +117,28 @@ public: }; +// Generates a Human-readable labels with built-in checksums +// Returns false on error +bool GenerateHumanString(int dataBits, // Number of bits to store + int checkBits, // Number of extra bits of checksum data + const unsigned char* input, // Bytes stored LSB-first + int dataBytes, // Size of data buffer in bytes + String& resultStr); // Output string + +// Returns number of bytes written to result, or zero on failure +int ProcessHumanString(int dataBits, // Number of bits to expect + int checkBits, // Number of extra bits of checksum data + String humanStr, // Human readable input string + unsigned char* result, // Output data buffer stored LSB-first + int resultBytes); // Size of result buffer in bytes + + //#define SERIAL_FORMAT_UNIT_TEST #ifdef SERIAL_FORMAT_UNIT_TEST void TestSerialFormatStuff(); #endif + } // OVR #endif // OVR_SerialFormat_h |