interprocess_data.h 791 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. /*
  2. * interprocess_data.h
  3. *
  4. * Created on: Aug 27, 2024
  5. * Author: jakubski
  6. */
  7. #ifndef INC_INTERPROCESS_DATA_H_
  8. #define INC_INTERPROCESS_DATA_H_
  9. #include "serial_protocol.h"
  10. #include "stdint.h"
  11. struct _IntegerValues {
  12. int32_t value[2];
  13. };
  14. struct _FloatValues {
  15. float value[2];
  16. };
  17. struct _MixedValues {
  18. int32_t value1;
  19. float value2;
  20. };
  21. typedef struct _FloatValues FloatValues;
  22. typedef struct _IntegerValues IntegerValues;
  23. typedef struct _MixedValues MixedValues;
  24. struct _InterProcessData {
  25. SerialProtocolCommands spCommand;
  26. union _values {
  27. IntegerValues integerValues;
  28. FloatValues flaotValues;
  29. MixedValues mixedValues;
  30. } values;
  31. };
  32. typedef struct _InterProcessData InterProcessData;
  33. #endif /* INC_INTERPROCESS_DATA_H_ */