equal
deleted
inserted
replaced
33 * Convenience function to read() and return the value of the given type |
33 * Convenience function to read() and return the value of the given type |
34 * |
34 * |
35 * @return T The value |
35 * @return T The value |
36 */ |
36 */ |
37 template <typename T> T read_val (void); |
37 template <typename T> T read_val (void); |
38 |
38 |
39 /** |
39 // @{ |
40 * @defgroup read_* Read methods |
40 /** |
41 * Collection of methods to write out simple types, these convert from network-endianness and return the value |
41 * Collection of methods to write out simple types, these convert from network-endianness and return the value |
42 * |
|
43 * @{ |
|
44 */ |
42 */ |
45 |
43 |
46 /** 32-bit unsigned int */ |
44 /** 32-bit unsigned int */ |
47 uint32_t read_uint32 (void); |
45 uint32_t read_uint32 (void); |
48 |
46 |
62 int8_t read_int8 (void); |
60 int8_t read_int8 (void); |
63 |
61 |
64 /** 32-bit float */ |
62 /** 32-bit float */ |
65 float read_float32 (void); |
63 float read_float32 (void); |
66 |
64 |
67 /** |
65 // @} |
68 * @} |
|
69 */ |
|
70 |
66 |
71 /** |
67 /** |
72 * Read a Vector from the packet: |
68 * Read a Vector from the packet: |
73 * float32 vec_x |
69 * float32 vec_x |
74 * float32 vec_y |
70 * float32 vec_y |
96 * |
92 * |
97 * @param val The value |
93 * @param val The value |
98 */ |
94 */ |
99 template <typename T> void write_val (const T &val); |
95 template <typename T> void write_val (const T &val); |
100 |
96 |
101 /** |
97 // @{ |
102 * @defgroup write* Write methods |
98 /** |
103 * Collection of methods to write out simple types, these convert the given value to network-byte-order |
99 * Collection of methods to write out simple types, these convert the given value to network-byte-order |
104 * |
|
105 * @{ |
|
106 */ |
100 */ |
107 void write_uint32 (uint32_t val); |
101 void write_uint32 (uint32_t val); |
108 void write_uint16 (uint16_t val); |
102 void write_uint16 (uint16_t val); |
109 void write_uint8 (uint8_t val); |
103 void write_uint8 (uint8_t val); |
110 void write_int32 (int32_t val); |
104 void write_int32 (int32_t val); |
111 void write_int16 (int16_t val); |
105 void write_int16 (int16_t val); |
112 void write_int8 (int8_t val); |
106 void write_int8 (int8_t val); |
113 void write_float32 (float val); |
107 void write_float32 (float val); |
114 |
108 |
115 /** |
109 // @{ |
116 * @} |
|
117 */ |
|
118 |
110 |
119 /** |
111 /** |
120 * Write a vector to the packet: |
112 * Write a vector to the packet: |
121 * float32 vec_x |
113 * float32 vec_x |
122 * float32 vec_y |
114 * float32 vec_y |