HEBI C++ API  3.9.0
message_helpers.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "hebi.h"
4 
5 #include "bit_set.hpp"
6 #include "color.hpp"
7 
8 namespace hebi {
9 
10 HebiStatusCode floatGetter(const HebiCommandRef& ref, int field, float* value);
11 HebiStatusCode floatGetter(const HebiFeedbackRef& ref, int field, float* value);
12 HebiStatusCode floatGetter(const HebiInfoRef& ref, int field, float* value);
13 
14 HebiStatusCode highResAngleGetter(const HebiCommandRef& ref, int field, int64_t* revs, float* offset);
15 HebiStatusCode highResAngleGetter(const HebiFeedbackRef& ref, int field, int64_t* revs, float* offset);
16 HebiStatusCode highResAngleGetter(const HebiInfoRef& ref, int field, int64_t* revs, float* offset);
17 
18 HebiStatusCode numberedFloatGetter(const HebiCommandRef& ref, int field, size_t number, float* value);
19 HebiStatusCode numberedFloatGetter(const HebiFeedbackRef& ref, int field, size_t number, float* value);
20 HebiStatusCode numberedFloatGetter(const HebiInfoRef& ref, int field, size_t number, float* value);
21 
22 HebiStatusCode vector3fGetter(const HebiCommandRef& ref, int field, HebiVector3f* value);
23 HebiStatusCode vector3fGetter(const HebiFeedbackRef& ref, int field, HebiVector3f* value);
24 HebiStatusCode vector3fGetter(const HebiInfoRef& ref, int field, HebiVector3f* value);
25 
26 HebiStatusCode quaternionfGetter(const HebiCommandRef& ref, int field, HebiQuaternionf* value);
27 HebiStatusCode quaternionfGetter(const HebiFeedbackRef& ref, int field, HebiQuaternionf* value);
28 HebiStatusCode quaternionfGetter(const HebiInfoRef& ref, int field, HebiQuaternionf* value);
29 
30 HebiStatusCode floatIoPinGetter(const HebiCommandRef& ref, int index, size_t pin_number, float* value);
31 HebiStatusCode floatIoPinGetter(const HebiFeedbackRef& ref, int index, size_t pin_number, float* value);
32 HebiStatusCode floatIoPinGetter(const HebiInfoRef& ref, int index, size_t pin_number, float* value);
33 
34 HebiStatusCode intIoPinGetter(const HebiCommandRef& ref, int index, size_t pin_number, int64_t* value);
35 HebiStatusCode intIoPinGetter(const HebiFeedbackRef& ref, int index, size_t pin_number, int64_t* value);
36 HebiStatusCode intIoPinGetter(const HebiInfoRef& ref, int index, size_t pin_number, int64_t* value);
37 
38 bool flagGetter(const HebiCommandRef& ref, int field);
39 bool flagGetter(const HebiFeedbackRef& ref, int field);
40 bool flagGetter(const HebiInfoRef& ref, int field);
41 
42 HebiStatusCode boolGetter(const HebiCommandRef& ref, int field, bool* value);
43 HebiStatusCode boolGetter(const HebiFeedbackRef& ref, int field, bool* value);
44 HebiStatusCode boolGetter(const HebiInfoRef& ref, int field, bool* value);
45 
46 HebiStatusCode enumGetter(const HebiCommandRef& ref, int field, int32_t* value);
47 HebiStatusCode enumGetter(const HebiFeedbackRef& ref, int field, int32_t* value);
48 HebiStatusCode enumGetter(const HebiInfoRef& ref, int field, int32_t* value);
49 
50 HebiStatusCode uint64Getter(const HebiCommandRef& ref, int field, uint64_t* value);
51 HebiStatusCode uint64Getter(const HebiFeedbackRef& ref, int field, uint64_t* value);
52 HebiStatusCode uint64Getter(const HebiInfoRef& ref, int field, uint64_t* value);
53 
54 HebiStatusCode ledGetter(const HebiCommandRef ref, int field, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a);
55 HebiStatusCode ledGetter(const HebiFeedbackRef ref, int field, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a);
56 HebiStatusCode ledGetter(const HebiInfoRef ref, int field, uint8_t* r, uint8_t* g, uint8_t* b, uint8_t* a);
57 
58 void hebiCommandSetFloat(HebiCommandRef& command, HebiCommandFloatField field, const float* value);
59 
60 void hebiCommandSetHighResAngle(HebiCommandRef& command, HebiCommandHighResAngleField field,
61  const int64_t* int_part, const float* dec_part);
62 
63 void hebiCommandSetNumberedFloat(HebiCommandRef& command, HebiCommandNumberedFloatField field, size_t number,
64  const float* value);
65 
66 void hebiCommandSetIoPinFloat(HebiCommandRef& command, HebiCommandIoPinBank bank, size_t pin_number,
67  const float* value);
68 
69 void hebiCommandSetIoPinInt(HebiCommandRef& command, HebiCommandIoPinBank bank, size_t pin_number,
70  const int64_t* value);
71 
72 void hebiCommandSetFlag(HebiCommandRef& command, HebiCommandFlagField field, int32_t value);
73 
74 void hebiCommandSetBool(HebiCommandRef& command, HebiCommandBoolField field, const int32_t* value);
75 
76 void hebiCommandSetEnum(HebiCommandRef& command, HebiCommandEnumField field, const int32_t* value);
77 
78 void hebiCommandSetUInt64(HebiCommandRef& command, HebiCommandUInt64Field field, const uint64_t* value);
79 
80 void hebiCommandSetLed(HebiCommandRef& command, HebiCommandLedField field, const Color* color);
81 
82 } // namespace hebi
void hebiCommandSetBool(HebiCommandRef &command, HebiCommandBoolField field, const int32_t *value)
Definition: message_helpers.cpp:457
HebiStatusCode ledGetter(const RefT &ref, MetadataT &metadata, int field, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *a)
Definition: message_helpers.cpp:356
void hebiCommandSetIoPinFloat(HebiCommandRef &command, HebiCommandIoPinBank bank, size_t pin_number, const float *value)
Definition: message_helpers.cpp:508
void hebiCommandSetNumberedFloat(HebiCommandRef &command, HebiCommandNumberedFloatField field, size_t number, const float *value)
Definition: message_helpers.cpp:436
void hebiCommandSetEnum(HebiCommandRef &command, HebiCommandEnumField field, const int32_t *value)
Definition: message_helpers.cpp:388
HebiStatusCode numberedFloatGetter(const RefT &ref, MetadataT &metadata, int field, size_t number, float *value)
Definition: message_helpers.cpp:81
Definition: arm.cpp:8
void hebiCommandSetHighResAngle(HebiCommandRef &command, HebiCommandHighResAngleField field, const int64_t *int_part, const float *dec_part)
Definition: message_helpers.cpp:418
void hebiCommandSetUInt64(HebiCommandRef &command, HebiCommandUInt64Field field, const uint64_t *value)
Definition: message_helpers.cpp:530
HebiStatusCode floatGetter(const RefT &ref, MetadataT &metadata, int field, float *value)
Definition: message_helpers.cpp:21
HebiStatusCode boolGetter(const RefT &ref, MetadataT &metadata, int field, bool *value)
Definition: message_helpers.cpp:269
HebiStatusCode enumGetter(const RefT &ref, MetadataT &metadata, int field, int32_t *value)
Definition: message_helpers.cpp:298
HebiStatusCode highResAngleGetter(const RefT &ref, MetadataT &metadata, int field, int64_t *revs, float *offset)
Definition: message_helpers.cpp:50
void hebiCommandSetLed(HebiCommandRef &command, HebiCommandLedField field, const Color *color)
Definition: message_helpers.cpp:545
void hebiCommandSetFlag(HebiCommandRef &command, HebiCommandFlagField field, int32_t value)
Definition: message_helpers.cpp:472
bool flagGetter(const RefT &ref, MetadataT &metadata, int field)
Definition: message_helpers.cpp:246
HebiStatusCode floatIoPinGetter(const RefT &ref, MetadataT &metadata, int index, size_t pin_number, float *value)
Definition: message_helpers.cpp:172
void hebiCommandSetIoPinInt(HebiCommandRef &command, HebiCommandIoPinBank bank, size_t pin_number, const int64_t *value)
Definition: message_helpers.cpp:486
HebiStatusCode intIoPinGetter(const RefT &ref, MetadataT &metadata, int index, size_t pin_number, int64_t *value)
Definition: message_helpers.cpp:209
HebiStatusCode uint64Getter(const RefT &ref, MetadataT &metadata, int field, uint64_t *value)
Definition: message_helpers.cpp:327
void hebiCommandSetFloat(HebiCommandRef &command, HebiCommandFloatField field, const float *value)
Definition: message_helpers.cpp:403
HebiStatusCode quaternionfGetter(const RefT &ref, MetadataT &metadata, int field, HebiQuaternionf *value)
Definition: message_helpers.cpp:143
HebiStatusCode vector3fGetter(const RefT &ref, MetadataT &metadata, int field, HebiVector3f *value)
Definition: message_helpers.cpp:114