PageRenderTime 138ms CodeModel.GetById 31ms RepoModel.GetById 1ms app.codeStats 0ms

/cereal/gen/c/car.capnp.h

https://gitlab.com/jerdog/openpilot
C Header | 319 lines | 260 code | 58 blank | 1 comment | 1 complexity | 5d8e895ae6f371b49add8ace3d5e169d MD5 | raw file
  1. #ifndef CAPN_8E2AF1E78AF8B8D
  2. #define CAPN_8E2AF1E78AF8B8D
  3. /* AUTO GENERATED - DO NOT EDIT */
  4. #include <capnp_c.h>
  5. #if CAPN_VERSION != 1
  6. #error "version mismatch between capnp_c.h and generated code"
  7. #endif
  8. #include "c++.capnp.h"
  9. #include "java.capnp.h"
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. struct cereal_CarState;
  14. struct cereal_CarState_WheelSpeeds;
  15. struct cereal_CarState_CruiseState;
  16. struct cereal_CarState_ButtonEvent;
  17. struct cereal_RadarState;
  18. struct cereal_RadarState_RadarPoint;
  19. struct cereal_CarControl;
  20. struct cereal_CarControl_CruiseControl;
  21. struct cereal_CarControl_HUDControl;
  22. struct cereal_CarParams;
  23. typedef struct {capn_ptr p;} cereal_CarState_ptr;
  24. typedef struct {capn_ptr p;} cereal_CarState_WheelSpeeds_ptr;
  25. typedef struct {capn_ptr p;} cereal_CarState_CruiseState_ptr;
  26. typedef struct {capn_ptr p;} cereal_CarState_ButtonEvent_ptr;
  27. typedef struct {capn_ptr p;} cereal_RadarState_ptr;
  28. typedef struct {capn_ptr p;} cereal_RadarState_RadarPoint_ptr;
  29. typedef struct {capn_ptr p;} cereal_CarControl_ptr;
  30. typedef struct {capn_ptr p;} cereal_CarControl_CruiseControl_ptr;
  31. typedef struct {capn_ptr p;} cereal_CarControl_HUDControl_ptr;
  32. typedef struct {capn_ptr p;} cereal_CarParams_ptr;
  33. typedef struct {capn_ptr p;} cereal_CarState_list;
  34. typedef struct {capn_ptr p;} cereal_CarState_WheelSpeeds_list;
  35. typedef struct {capn_ptr p;} cereal_CarState_CruiseState_list;
  36. typedef struct {capn_ptr p;} cereal_CarState_ButtonEvent_list;
  37. typedef struct {capn_ptr p;} cereal_RadarState_list;
  38. typedef struct {capn_ptr p;} cereal_RadarState_RadarPoint_list;
  39. typedef struct {capn_ptr p;} cereal_CarControl_list;
  40. typedef struct {capn_ptr p;} cereal_CarControl_CruiseControl_list;
  41. typedef struct {capn_ptr p;} cereal_CarControl_HUDControl_list;
  42. typedef struct {capn_ptr p;} cereal_CarParams_list;
  43. enum cereal_CarState_Error {
  44. cereal_CarState_Error_commIssue = 0,
  45. cereal_CarState_Error_steerUnavailable = 1,
  46. cereal_CarState_Error_brakeUnavailable = 2,
  47. cereal_CarState_Error_gasUnavailable = 3,
  48. cereal_CarState_Error_wrongGear = 4,
  49. cereal_CarState_Error_doorOpen = 5,
  50. cereal_CarState_Error_seatbeltNotLatched = 6,
  51. cereal_CarState_Error_espDisabled = 7,
  52. cereal_CarState_Error_wrongCarMode = 8,
  53. cereal_CarState_Error_steerTemporarilyUnavailable = 9,
  54. cereal_CarState_Error_reverseGear = 10
  55. };
  56. enum cereal_CarState_ButtonEvent_Type {
  57. cereal_CarState_ButtonEvent_Type_unknown = 0,
  58. cereal_CarState_ButtonEvent_Type_leftBlinker = 1,
  59. cereal_CarState_ButtonEvent_Type_rightBlinker = 2,
  60. cereal_CarState_ButtonEvent_Type_accelCruise = 3,
  61. cereal_CarState_ButtonEvent_Type_decelCruise = 4,
  62. cereal_CarState_ButtonEvent_Type_cancel = 5,
  63. cereal_CarState_ButtonEvent_Type_altButton1 = 6,
  64. cereal_CarState_ButtonEvent_Type_altButton2 = 7,
  65. cereal_CarState_ButtonEvent_Type_altButton3 = 8
  66. };
  67. enum cereal_RadarState_Error {
  68. cereal_RadarState_Error_notValid = 0
  69. };
  70. enum cereal_CarControl_HUDControl_VisualAlert {
  71. cereal_CarControl_HUDControl_VisualAlert_none = 0,
  72. cereal_CarControl_HUDControl_VisualAlert_fcw = 1,
  73. cereal_CarControl_HUDControl_VisualAlert_steerRequired = 2,
  74. cereal_CarControl_HUDControl_VisualAlert_brakePressed = 3,
  75. cereal_CarControl_HUDControl_VisualAlert_wrongGear = 4,
  76. cereal_CarControl_HUDControl_VisualAlert_seatbeltUnbuckled = 5,
  77. cereal_CarControl_HUDControl_VisualAlert_speedTooHigh = 6
  78. };
  79. enum cereal_CarControl_HUDControl_AudibleAlert {
  80. cereal_CarControl_HUDControl_AudibleAlert_none = 0,
  81. cereal_CarControl_HUDControl_AudibleAlert_beepSingle = 1,
  82. cereal_CarControl_HUDControl_AudibleAlert_beepTriple = 2,
  83. cereal_CarControl_HUDControl_AudibleAlert_beepRepeated = 3,
  84. cereal_CarControl_HUDControl_AudibleAlert_chimeSingle = 4,
  85. cereal_CarControl_HUDControl_AudibleAlert_chimeDouble = 5,
  86. cereal_CarControl_HUDControl_AudibleAlert_chimeRepeated = 6,
  87. cereal_CarControl_HUDControl_AudibleAlert_chimeContinuous = 7
  88. };
  89. struct cereal_CarState {
  90. capn_list16 errors;
  91. float vEgo;
  92. cereal_CarState_WheelSpeeds_ptr wheelSpeeds;
  93. float gas;
  94. unsigned gasPressed : 1;
  95. float brake;
  96. unsigned brakePressed : 1;
  97. float steeringAngle;
  98. float steeringTorque;
  99. unsigned steeringPressed : 1;
  100. cereal_CarState_CruiseState_ptr cruiseState;
  101. cereal_CarState_ButtonEvent_list buttonEvents;
  102. capn_list64 canMonoTimes;
  103. };
  104. static const size_t cereal_CarState_word_count = 3;
  105. static const size_t cereal_CarState_pointer_count = 5;
  106. static const size_t cereal_CarState_struct_bytes_count = 64;
  107. struct cereal_CarState_WheelSpeeds {
  108. float fl;
  109. float fr;
  110. float rl;
  111. float rr;
  112. };
  113. static const size_t cereal_CarState_WheelSpeeds_word_count = 2;
  114. static const size_t cereal_CarState_WheelSpeeds_pointer_count = 0;
  115. static const size_t cereal_CarState_WheelSpeeds_struct_bytes_count = 16;
  116. struct cereal_CarState_CruiseState {
  117. unsigned enabled : 1;
  118. float speed;
  119. };
  120. static const size_t cereal_CarState_CruiseState_word_count = 1;
  121. static const size_t cereal_CarState_CruiseState_pointer_count = 0;
  122. static const size_t cereal_CarState_CruiseState_struct_bytes_count = 8;
  123. struct cereal_CarState_ButtonEvent {
  124. unsigned pressed : 1;
  125. enum cereal_CarState_ButtonEvent_Type type;
  126. };
  127. static const size_t cereal_CarState_ButtonEvent_word_count = 1;
  128. static const size_t cereal_CarState_ButtonEvent_pointer_count = 0;
  129. static const size_t cereal_CarState_ButtonEvent_struct_bytes_count = 8;
  130. struct cereal_RadarState {
  131. capn_list16 errors;
  132. cereal_RadarState_RadarPoint_list points;
  133. capn_list64 canMonoTimes;
  134. };
  135. static const size_t cereal_RadarState_word_count = 0;
  136. static const size_t cereal_RadarState_pointer_count = 3;
  137. static const size_t cereal_RadarState_struct_bytes_count = 24;
  138. struct cereal_RadarState_RadarPoint {
  139. uint64_t trackId;
  140. float dRel;
  141. float yRel;
  142. float vRel;
  143. float aRel;
  144. float yvRel;
  145. };
  146. static const size_t cereal_RadarState_RadarPoint_word_count = 4;
  147. static const size_t cereal_RadarState_RadarPoint_pointer_count = 0;
  148. static const size_t cereal_RadarState_RadarPoint_struct_bytes_count = 32;
  149. struct cereal_CarControl {
  150. unsigned enabled : 1;
  151. float gas;
  152. float brake;
  153. float steeringTorque;
  154. cereal_CarControl_CruiseControl_ptr cruiseControl;
  155. cereal_CarControl_HUDControl_ptr hudControl;
  156. };
  157. static const size_t cereal_CarControl_word_count = 2;
  158. static const size_t cereal_CarControl_pointer_count = 2;
  159. static const size_t cereal_CarControl_struct_bytes_count = 32;
  160. struct cereal_CarControl_CruiseControl {
  161. unsigned cancel : 1;
  162. unsigned override : 1;
  163. float speedOverride;
  164. float accelOverride;
  165. };
  166. static const size_t cereal_CarControl_CruiseControl_word_count = 2;
  167. static const size_t cereal_CarControl_CruiseControl_pointer_count = 0;
  168. static const size_t cereal_CarControl_CruiseControl_struct_bytes_count = 16;
  169. struct cereal_CarControl_HUDControl {
  170. unsigned speedVisible : 1;
  171. float setSpeed;
  172. unsigned lanesVisible : 1;
  173. unsigned leadVisible : 1;
  174. enum cereal_CarControl_HUDControl_VisualAlert visualAlert;
  175. enum cereal_CarControl_HUDControl_AudibleAlert audibleAlert;
  176. };
  177. static const size_t cereal_CarControl_HUDControl_word_count = 2;
  178. static const size_t cereal_CarControl_HUDControl_pointer_count = 0;
  179. static const size_t cereal_CarControl_HUDControl_struct_bytes_count = 16;
  180. struct cereal_CarParams {
  181. capn_text carName;
  182. capn_text radarName;
  183. capn_text carFingerprint;
  184. unsigned enableSteer : 1;
  185. unsigned enableGas : 1;
  186. unsigned enableBrake : 1;
  187. unsigned enableCruise : 1;
  188. float wheelBase;
  189. float steerRatio;
  190. float uiSpeedFudge;
  191. float slipFactor;
  192. float steerKp;
  193. float steerKi;
  194. };
  195. static const size_t cereal_CarParams_word_count = 4;
  196. static const size_t cereal_CarParams_pointer_count = 3;
  197. static const size_t cereal_CarParams_struct_bytes_count = 56;
  198. cereal_CarState_ptr cereal_new_CarState(struct capn_segment*);
  199. cereal_CarState_WheelSpeeds_ptr cereal_new_CarState_WheelSpeeds(struct capn_segment*);
  200. cereal_CarState_CruiseState_ptr cereal_new_CarState_CruiseState(struct capn_segment*);
  201. cereal_CarState_ButtonEvent_ptr cereal_new_CarState_ButtonEvent(struct capn_segment*);
  202. cereal_RadarState_ptr cereal_new_RadarState(struct capn_segment*);
  203. cereal_RadarState_RadarPoint_ptr cereal_new_RadarState_RadarPoint(struct capn_segment*);
  204. cereal_CarControl_ptr cereal_new_CarControl(struct capn_segment*);
  205. cereal_CarControl_CruiseControl_ptr cereal_new_CarControl_CruiseControl(struct capn_segment*);
  206. cereal_CarControl_HUDControl_ptr cereal_new_CarControl_HUDControl(struct capn_segment*);
  207. cereal_CarParams_ptr cereal_new_CarParams(struct capn_segment*);
  208. cereal_CarState_list cereal_new_CarState_list(struct capn_segment*, int len);
  209. cereal_CarState_WheelSpeeds_list cereal_new_CarState_WheelSpeeds_list(struct capn_segment*, int len);
  210. cereal_CarState_CruiseState_list cereal_new_CarState_CruiseState_list(struct capn_segment*, int len);
  211. cereal_CarState_ButtonEvent_list cereal_new_CarState_ButtonEvent_list(struct capn_segment*, int len);
  212. cereal_RadarState_list cereal_new_RadarState_list(struct capn_segment*, int len);
  213. cereal_RadarState_RadarPoint_list cereal_new_RadarState_RadarPoint_list(struct capn_segment*, int len);
  214. cereal_CarControl_list cereal_new_CarControl_list(struct capn_segment*, int len);
  215. cereal_CarControl_CruiseControl_list cereal_new_CarControl_CruiseControl_list(struct capn_segment*, int len);
  216. cereal_CarControl_HUDControl_list cereal_new_CarControl_HUDControl_list(struct capn_segment*, int len);
  217. cereal_CarParams_list cereal_new_CarParams_list(struct capn_segment*, int len);
  218. void cereal_read_CarState(struct cereal_CarState*, cereal_CarState_ptr);
  219. void cereal_read_CarState_WheelSpeeds(struct cereal_CarState_WheelSpeeds*, cereal_CarState_WheelSpeeds_ptr);
  220. void cereal_read_CarState_CruiseState(struct cereal_CarState_CruiseState*, cereal_CarState_CruiseState_ptr);
  221. void cereal_read_CarState_ButtonEvent(struct cereal_CarState_ButtonEvent*, cereal_CarState_ButtonEvent_ptr);
  222. void cereal_read_RadarState(struct cereal_RadarState*, cereal_RadarState_ptr);
  223. void cereal_read_RadarState_RadarPoint(struct cereal_RadarState_RadarPoint*, cereal_RadarState_RadarPoint_ptr);
  224. void cereal_read_CarControl(struct cereal_CarControl*, cereal_CarControl_ptr);
  225. void cereal_read_CarControl_CruiseControl(struct cereal_CarControl_CruiseControl*, cereal_CarControl_CruiseControl_ptr);
  226. void cereal_read_CarControl_HUDControl(struct cereal_CarControl_HUDControl*, cereal_CarControl_HUDControl_ptr);
  227. void cereal_read_CarParams(struct cereal_CarParams*, cereal_CarParams_ptr);
  228. void cereal_write_CarState(const struct cereal_CarState*, cereal_CarState_ptr);
  229. void cereal_write_CarState_WheelSpeeds(const struct cereal_CarState_WheelSpeeds*, cereal_CarState_WheelSpeeds_ptr);
  230. void cereal_write_CarState_CruiseState(const struct cereal_CarState_CruiseState*, cereal_CarState_CruiseState_ptr);
  231. void cereal_write_CarState_ButtonEvent(const struct cereal_CarState_ButtonEvent*, cereal_CarState_ButtonEvent_ptr);
  232. void cereal_write_RadarState(const struct cereal_RadarState*, cereal_RadarState_ptr);
  233. void cereal_write_RadarState_RadarPoint(const struct cereal_RadarState_RadarPoint*, cereal_RadarState_RadarPoint_ptr);
  234. void cereal_write_CarControl(const struct cereal_CarControl*, cereal_CarControl_ptr);
  235. void cereal_write_CarControl_CruiseControl(const struct cereal_CarControl_CruiseControl*, cereal_CarControl_CruiseControl_ptr);
  236. void cereal_write_CarControl_HUDControl(const struct cereal_CarControl_HUDControl*, cereal_CarControl_HUDControl_ptr);
  237. void cereal_write_CarParams(const struct cereal_CarParams*, cereal_CarParams_ptr);
  238. void cereal_get_CarState(struct cereal_CarState*, cereal_CarState_list, int i);
  239. void cereal_get_CarState_WheelSpeeds(struct cereal_CarState_WheelSpeeds*, cereal_CarState_WheelSpeeds_list, int i);
  240. void cereal_get_CarState_CruiseState(struct cereal_CarState_CruiseState*, cereal_CarState_CruiseState_list, int i);
  241. void cereal_get_CarState_ButtonEvent(struct cereal_CarState_ButtonEvent*, cereal_CarState_ButtonEvent_list, int i);
  242. void cereal_get_RadarState(struct cereal_RadarState*, cereal_RadarState_list, int i);
  243. void cereal_get_RadarState_RadarPoint(struct cereal_RadarState_RadarPoint*, cereal_RadarState_RadarPoint_list, int i);
  244. void cereal_get_CarControl(struct cereal_CarControl*, cereal_CarControl_list, int i);
  245. void cereal_get_CarControl_CruiseControl(struct cereal_CarControl_CruiseControl*, cereal_CarControl_CruiseControl_list, int i);
  246. void cereal_get_CarControl_HUDControl(struct cereal_CarControl_HUDControl*, cereal_CarControl_HUDControl_list, int i);
  247. void cereal_get_CarParams(struct cereal_CarParams*, cereal_CarParams_list, int i);
  248. void cereal_set_CarState(const struct cereal_CarState*, cereal_CarState_list, int i);
  249. void cereal_set_CarState_WheelSpeeds(const struct cereal_CarState_WheelSpeeds*, cereal_CarState_WheelSpeeds_list, int i);
  250. void cereal_set_CarState_CruiseState(const struct cereal_CarState_CruiseState*, cereal_CarState_CruiseState_list, int i);
  251. void cereal_set_CarState_ButtonEvent(const struct cereal_CarState_ButtonEvent*, cereal_CarState_ButtonEvent_list, int i);
  252. void cereal_set_RadarState(const struct cereal_RadarState*, cereal_RadarState_list, int i);
  253. void cereal_set_RadarState_RadarPoint(const struct cereal_RadarState_RadarPoint*, cereal_RadarState_RadarPoint_list, int i);
  254. void cereal_set_CarControl(const struct cereal_CarControl*, cereal_CarControl_list, int i);
  255. void cereal_set_CarControl_CruiseControl(const struct cereal_CarControl_CruiseControl*, cereal_CarControl_CruiseControl_list, int i);
  256. void cereal_set_CarControl_HUDControl(const struct cereal_CarControl_HUDControl*, cereal_CarControl_HUDControl_list, int i);
  257. void cereal_set_CarParams(const struct cereal_CarParams*, cereal_CarParams_list, int i);
  258. #ifdef __cplusplus
  259. }
  260. #endif
  261. #endif