aboutsummaryrefslogtreecommitdiffstats
path: root/LibOVR/Src/OVR_SerialFormat.h
diff options
context:
space:
mode:
Diffstat (limited to 'LibOVR/Src/OVR_SerialFormat.h')
-rw-r--r--LibOVR/Src/OVR_SerialFormat.h17
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