diff options
author | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2013-12-24 12:00:20 -0500 |
---|---|---|
committer | Christopher Peplin <chris.peplin@rhubarbtech.com> | 2013-12-24 12:00:20 -0500 |
commit | 39a420f13e8000e2dfa53777b9e51594ba03e5d4 (patch) | |
tree | 95d8a0975bf7016a71b64fea1162375a1b916985 /src/canutil/read.h | |
parent | bc1baf25a0844861713829c0e9e69e4a2d447cc6 (diff) |
Add test cases from vi-firmware.
Diffstat (limited to 'src/canutil/read.h')
-rw-r--r-- | src/canutil/read.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/canutil/read.h b/src/canutil/read.h index 815f26b0..6ac4eebe 100644 --- a/src/canutil/read.h +++ b/src/canutil/read.h @@ -4,10 +4,26 @@ #include <stdint.h> #include <stdbool.h> +#ifdef __cplusplus +extern "C" { +#endif + +/* Public: Parse a CAN signal from a message and apply required transformation. + * + * signal - The details of the signal to decode and forward. + * data - The raw bytes of the CAN message that contains the signal, assumed + * to be in big-endian byte order from CAN. + * + * Returns the final, transformed value of the signal. + */ float parseFloat(uint64_t data, uint8_t bitPosition, uint8_t bitSize, float factor, float offset); bool parseBoolean(uint64_t data, uint8_t bitPosition, uint8_t bitSize, float factor, float offset); +#ifdef __cplusplus +} +#endif + #endif // __READ_H__ |