14 #ifndef ECL_CONCEPTS_DEVICES_HPP_ 15 #define ECL_CONCEPTS_DEVICES_HPP_ 38 template <
typename Implementation>
75 template <
typename Implementation>
90 char write_buffer[] = {
'd',
'u',
'd',
'e',
'\n' };
92 result = output_char_device.open();
93 no_written = output_char_device.write(
'\n');
94 no_written = output_char_device.write(write_buffer,5);
95 output_char_device.flush();
115 template <
typename Implementation>
132 char read_buffer[10];
134 no_read = input_output_char_device.read(c);
135 no_read = input_output_char_device.read(read_buffer,10);
137 char write_buffer[] = {
'd',
'u',
'd',
'e',
'\n' };
138 no_written = input_output_char_device.write(
'\n');
139 no_written = input_output_char_device.write(write_buffer,5);
140 input_output_char_device.flush();
158 template <
typename Implementation>
173 signed char sbuffer[10];
177 unsigned char usbuffer[10];
180 result = input_byte_device.isOpen();
181 no_read = input_byte_device.read(sc);
182 no_read = input_byte_device.read(sbuffer,10);
183 no_read = input_byte_device.read(c);
184 no_read = input_byte_device.read(buffer,10);
185 no_read = input_byte_device.read(usc);
186 no_read = input_byte_device.read(usbuffer,10);
204 template <
typename Implementation>
221 signed char sc =
'\n';
223 unsigned char usc = 0x01;
224 signed char s_write_buffer[] = {
'd',
'u',
'd',
'e',
'\n' };
225 char write_buffer[] = {
'd',
'u',
'd',
'e',
'\n' };
226 unsigned char us_write_buffer[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
228 result = output_byte_device.isOpen();
229 no_written = output_byte_device.write(sc);
230 no_written = output_byte_device.write(c);
231 no_written = output_byte_device.write(usc);
232 no_written = output_byte_device.write(s_write_buffer,5);
233 no_written = output_byte_device.write(write_buffer,5);
234 no_written = output_byte_device.write(us_write_buffer,5);
235 output_byte_device.flush();
254 template <
typename Implementation>
273 signed char sbuffer[10];
277 unsigned char usbuffer[10];
280 result = input_output_byte_device.isOpen();
281 no_read = input_output_byte_device.read(sc);
282 no_read = input_output_byte_device.read(sbuffer,10);
283 no_read = input_output_byte_device.read(c);
284 no_read = input_output_byte_device.read(buffer,10);
285 no_read = input_output_byte_device.read(usc);
286 no_read = input_output_byte_device.read(usbuffer,10);
292 signed char s_write_buffer[] = {
'd',
'u',
'd',
'e',
'\n' };
293 char write_buffer[] = {
'd',
'u',
'd',
'e',
'\n' };
294 unsigned char us_write_buffer[] = { 0x01, 0x02, 0x03, 0x04, 0x05 };
295 no_written = input_output_byte_device.write(sc);
296 no_written = input_output_byte_device.write(c);
297 no_written = input_output_byte_device.write(usc);
298 no_written = input_output_byte_device.write(s_write_buffer,5);
299 no_written = input_output_byte_device.write(write_buffer,5);
300 no_written = input_output_byte_device.write(us_write_buffer,5);
301 input_output_byte_device.flush();
Embedded control libraries.
Validates functionality for the output char device concept.
Implementation output_char_device
ecl_compile_time_concept_test(OutputCharDeviceConcept)
Implements a concept test for output char devices.
Implementation output_byte_device
Validates functionality for the output byte device concept.
Mechanisms enabling compile time checking of metaprogramming concepts.
ecl_compile_time_concept_test(OutputByteDeviceConcept)
Implements a concept test for output byte devices.