diff options
author | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-20 10:24:05 +0000 |
---|---|---|
committer | Romain Forlot <romain.forlot@iot.bzh> | 2017-06-20 10:24:05 +0000 |
commit | 32e25cbca210a359b09768537b6f443fe90a3070 (patch) | |
tree | 3309794c15d8a8f8e9c1c08cad072ee1378813ba /CAN-binder/libs/bitfield-c/src/canutil/read.h | |
parent | 76c43dec62b2e21cd6446360c00d4fe6b437533f (diff) |
Separation Generator to a dedicated repo
Change-Id: Id94831651c3266861435272a6e36c7884bef2c45
Signed-off-by: Romain Forlot <romain.forlot@iot.bzh>
Diffstat (limited to 'CAN-binder/libs/bitfield-c/src/canutil/read.h')
-rw-r--r-- | CAN-binder/libs/bitfield-c/src/canutil/read.h | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/CAN-binder/libs/bitfield-c/src/canutil/read.h b/CAN-binder/libs/bitfield-c/src/canutil/read.h deleted file mode 100644 index 86fea785..00000000 --- a/CAN-binder/libs/bitfield-c/src/canutil/read.h +++ /dev/null @@ -1,81 +0,0 @@ -#ifndef __READ_H__ -#define __READ_H__ - -#include <stdint.h> -#include <stdbool.h> - -#ifdef __cplusplus -extern "C" { -#endif - -/* Public: Parse a CAN signal from a message and apply required transformation. - * - * source - the payload containing the signal. - * bit_offset - the starting bit for the signal. - * bit_size - the width of the signal. - * factor - the transformation factor for the signal value, applied after - * pulling out the bit field. Use 1.0 for no factor. - * offset - the transformation offset for the signal value, applied after - * pulling out the bit field. Use 0 for no offset. - * - * Returns the decoded and transformed value of the signal. - */ -float eightbyte_parse_float(const uint64_t source, const uint8_t bit_offset, - const uint8_t bit_size, const float factor, const float offset); - -/* Public: Parse a CAN signal from a message storage as a byte array and apply - * required transformation. - * - * source - the payload containing the signal. - * source_size - the size of the payload in bytes. - * bit_offset - the starting bit for the signal. - * bit_size - the width of the signal. - * factor - the transformation factor for the signal value, applied after - * pulling out the bit field. Use 1.0 for no factor. - * offset - the transformation offset for the signal value, applied after - * pulling out the bit field. Use 0 for no offset. - * - * Returns the decoded and transformed value of the signal. - */ -float bitfield_parse_float(const uint8_t source[], const uint16_t source_size, - const uint8_t bit_offset, const uint8_t bit_size, const float factor, - const float offset); - -/* Public: Parse a CAN signal from a message and interpret it as a boolean. - * - * source - the payload containing the signal. - * bit_offset - the starting bit for the signal. - * bit_size - the width of the signal. - * factor - the transformation factor for the signal value, applied after - * pulling out the bit field. Use 1.0 for no factor. - * offset - the transformation offset for the signal value, applied after - * pulling out the bit field. Use 0 for no offset. - * - * Returns false if the value was 0, otherwise true. - */ -bool eightbyte_parse_bool(uint64_t source, uint8_t bit_offset, uint8_t bit_size, - float factor, float offset); - -/* Public: Parse a CAN signal from a message storage as a byte array and - * interpret it as a boolean. - * - * source - the payload containing the signal. - * source_size - the size of the payload in bytes. - * bit_offset - the starting bit for the signal. - * bit_size - the width of the signal. - * factor - the transformation factor for the signal value, applied after - * pulling out the bit field. Use 1.0 for no factor. - * offset - the transformation offset for the signal value, applied after - * pulling out the bit field. Use 0 for no offset. - * - * Returns false if the value was 0, otherwise true. - */ -bool bitfield_parse_bool(const uint8_t source[], const uint16_t source_size, - const uint8_t bit_offset, const uint8_t bit_size, const float factor, - const float offset); - -#ifdef __cplusplus -} -#endif - -#endif // __READ_H__ |