77 |
#include <thread>
78 | #include <array>
79 | #include <future>
80 | #include <chrono>
81 | #include <boost/asio.hpp>
82 | #include <boost/bind.hpp>
83 |
84 |
Go to the source code of this file.
85 |
96 |
97 |
98 |
103 |
104 |
105 |
--------------------------------------------------------------------------------
/doc/html/_serial_port_8cpp.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
70 |
Here are the classes, structs, unions and interfaces with brief descriptions:
71 |
[detail level 1 2 ]
75 |
76 |
77 |
78 |
83 |
84 |
85 |
--------------------------------------------------------------------------------
/doc/html/bc_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/bc_s.png
--------------------------------------------------------------------------------
/doc/html/bdwn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/bdwn.png
--------------------------------------------------------------------------------
/doc/html/classes.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
74 |
75 |
This is the complete list of members for serial::Serial , including all inherited members.
76 |
90 |
91 |
96 |
97 |
98 |
--------------------------------------------------------------------------------
/doc/html/closed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/closed.png
--------------------------------------------------------------------------------
/doc/html/dir_2c5165dfc253fd514319589541070b54.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: build/CMakeFiles/feature_tests.c File Reference
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
62 |
63 |
64 |
68 |
69 |
76 |
77 |
78 |
80 | int main (int argc, char **argv)
81 |
82 |
83 |
85 | const char features []
86 |
87 |
88 |
89 |
90 |
◆ main()
91 |
92 |
93 |
94 |
95 |
96 | int main
97 | (
98 | int
99 | argc ,
100 |
101 |
102 |
103 |
104 | char **
105 | argv
106 |
107 |
108 |
109 | )
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
◆ features
120 |
121 |
122 |
123 |
124 |
125 | const char features[]
126 |
127 |
128 |
129 |
Initial value: = {"\n"
"C_FEATURE:"
"0"
"c_function_prototypes\n"
"C_FEATURE:"
"0"
"c_variadic_macros\n"
}
130 |
131 |
132 |
133 |
134 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/doc/html/feature__tests_8cxx.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: build/CMakeFiles/feature_tests.cxx File Reference
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
62 |
63 |
64 |
68 |
69 |
76 |
77 |
78 |
80 | int main (int argc, char **argv)
81 |
82 |
83 |
85 | const char features []
86 |
87 |
88 |
89 |
90 |
◆ main()
91 |
92 |
93 |
94 |
95 |
96 | int main
97 | (
98 | int
99 | argc ,
100 |
101 |
102 |
103 |
104 | char **
105 | argv
106 |
107 |
108 |
109 | )
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
◆ features
120 |
121 |
122 |
123 |
124 |
125 | const char features[]
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
139 |
140 |
141 |
--------------------------------------------------------------------------------
/doc/html/folderclosed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/folderclosed.png
--------------------------------------------------------------------------------
/doc/html/folderopen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/folderopen.png
--------------------------------------------------------------------------------
/doc/html/functions.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: Class Members
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
66 |
Here is a list of all class members with links to the classes they belong to:
98 |
99 |
100 |
105 |
106 |
107 |
--------------------------------------------------------------------------------
/doc/html/functions_func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: Class Members - Functions
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
87 |
88 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/doc/html/functions_type.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: Class Members - Typedefs
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
81 |
82 |
87 |
88 |
89 |
--------------------------------------------------------------------------------
/doc/html/globals_defs.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: File Members
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
103 |
104 |
109 |
110 |
111 |
--------------------------------------------------------------------------------
/doc/html/globals_func.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: File Members
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
76 |
77 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/doc/html/globals_vars.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: File Members
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
89 |
90 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/doc/html/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: Main Page
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
69 |
70 |
71 |
72 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/doc/html/menu.js:
--------------------------------------------------------------------------------
1 | /*
2 | @licstart The following is the entire license notice for the
3 | JavaScript code in this file.
4 |
5 | Copyright (C) 1997-2017 by Dimitri van Heesch
6 |
7 | This program is free software; you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation; either version 2 of the License, or
10 | (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License along
18 | with this program; if not, write to the Free Software Foundation, Inc.,
19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 |
21 | @licend The above is the entire license notice
22 | for the JavaScript code in this file
23 | */
24 | function initMenu(relPath,searchEnabled,serverSide,searchPage,search) {
25 | function makeTree(data,relPath) {
26 | var result='';
27 | if ('children' in data) {
28 | result+='';
35 | }
36 | return result;
37 | }
38 |
39 | $('#main-nav').append(makeTree(menudata,relPath));
40 | $('#main-nav').children(':first').addClass('sm sm-dox').attr('id','main-menu');
41 | if (searchEnabled) {
42 | if (serverSide) {
43 | $('#main-menu').append(' ');
44 | } else {
45 | $('#main-menu').append(' ');
46 | }
47 | }
48 | $('#main-menu').smartmenus();
49 | }
50 | /* @license-end */
51 |
--------------------------------------------------------------------------------
/doc/html/menudata.js:
--------------------------------------------------------------------------------
1 | /*
2 | @ @licstart The following is the entire license notice for the
3 | JavaScript code in this file.
4 |
5 | Copyright (C) 1997-2017 by Dimitri van Heesch
6 |
7 | This program is free software; you can redistribute it and/or modify
8 | it under the terms of the GNU General Public License as published by
9 | the Free Software Foundation; either version 2 of the License, or
10 | (at your option) any later version.
11 |
12 | This program is distributed in the hope that it will be useful,
13 | but WITHOUT ANY WARRANTY; without even the implied warranty of
14 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 | GNU General Public License for more details.
16 |
17 | You should have received a copy of the GNU General Public License along
18 | with this program; if not, write to the Free Software Foundation, Inc.,
19 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 |
21 | @licend The above is the entire license notice
22 | for the JavaScript code in this file
23 | */
24 | var menudata={children:[
25 | {text:"Main Page",url:"index.html"},
26 | {text:"Namespaces",url:"namespaces.html",children:[
27 | {text:"Namespace List",url:"namespaces.html"}]},
28 | {text:"Classes",url:"annotated.html",children:[
29 | {text:"Class List",url:"annotated.html"},
30 | {text:"Class Index",url:"classes.html"},
31 | {text:"Class Members",url:"functions.html",children:[
32 | {text:"All",url:"functions.html"},
33 | {text:"Functions",url:"functions_func.html"},
34 | {text:"Typedefs",url:"functions_type.html"}]}]},
35 | {text:"Files",url:"files.html",children:[
36 | {text:"File List",url:"files.html"},
37 | {text:"File Members",url:"globals.html",children:[
38 | {text:"All",url:"globals.html",children:[
39 | {text:"a",url:"globals.html#index_a"},
40 | {text:"c",url:"globals.html#index_c"},
41 | {text:"d",url:"globals.html#index_d"},
42 | {text:"f",url:"globals.html#index_f"},
43 | {text:"h",url:"globals.html#index_h"},
44 | {text:"i",url:"globals.html#index_i"},
45 | {text:"m",url:"globals.html#index_m"},
46 | {text:"p",url:"globals.html#index_p"},
47 | {text:"s",url:"globals.html#index_s"}]},
48 | {text:"Functions",url:"globals_func.html"},
49 | {text:"Variables",url:"globals_vars.html"},
50 | {text:"Macros",url:"globals_defs.html"}]}]}]}
51 |
--------------------------------------------------------------------------------
/doc/html/namespaces.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: Namespace List
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
52 |
56 |
57 |
58 |
59 |
60 |
63 |
64 |
65 |
69 |
70 |
Here is a list of all namespaces with brief descriptions:
75 |
76 |
77 |
82 |
83 |
84 |
--------------------------------------------------------------------------------
/doc/html/namespaceserial.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | Serial: serial Namespace Reference
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | Serial
25 | V.1.0.0
26 |
27 | Cross-Platform, Serial Port Library built on Boost.Asio in Modern C++ 17
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
40 |
41 |
42 |
49 |
50 |
51 |
55 |
56 |
57 |
58 |
59 |
62 |
63 |
64 |
65 |
71 |
72 |
73 |
75 | class Serial
76 |
77 |
78 |
79 |
80 |
85 |
86 |
87 |
--------------------------------------------------------------------------------
/doc/html/nav_f.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/nav_f.png
--------------------------------------------------------------------------------
/doc/html/nav_g.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/nav_g.png
--------------------------------------------------------------------------------
/doc/html/nav_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/nav_h.png
--------------------------------------------------------------------------------
/doc/html/open.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/open.png
--------------------------------------------------------------------------------
/doc/html/search/all_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['architecture_5fid',['ARCHITECTURE_ID',['../_c_make_c_compiler_id_8c.html#aba35d0d200deaeb06aee95ca297acb28',1,'ARCHITECTURE_ID(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#aba35d0d200deaeb06aee95ca297acb28',1,'ARCHITECTURE_ID(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['c_5fdialect',['C_DIALECT',['../_c_make_c_compiler_id_8c.html#a07f8e5783674099cd7f5110e22a78cdb',1,'CMakeCCompilerId.c']]],
4 | ['close',['close',['../classserial_1_1_serial.html#a501082725b61e4baf615266065bbac5f',1,'serial::Serial']]],
5 | ['cmakeccompilerid_2ec',['CMakeCCompilerId.c',['../_c_make_c_compiler_id_8c.html',1,'']]],
6 | ['cmakecxxcompilerid_2ecpp',['CMakeCXXCompilerId.cpp',['../_c_make_c_x_x_compiler_id_8cpp.html',1,'']]],
7 | ['compiler_5fid',['COMPILER_ID',['../_c_make_c_compiler_id_8c.html#a81dee0709ded976b2e0319239f72d174',1,'COMPILER_ID(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a81dee0709ded976b2e0319239f72d174',1,'COMPILER_ID(): CMakeCXXCompilerId.cpp']]],
8 | ['cxx_5fstd',['CXX_STD',['../_c_make_c_x_x_compiler_id_8cpp.html#a34cc889e576a1ae6c84ae9e0a851ba21',1,'CMakeCXXCompilerId.cpp']]]
9 | ];
10 |
--------------------------------------------------------------------------------
/doc/html/search/all_2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['dec',['DEC',['../_c_make_c_compiler_id_8c.html#ad1280362da42492bbc11aa78cbf776ad',1,'DEC(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#ad1280362da42492bbc11aa78cbf776ad',1,'DEC(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_3.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['errorcode',['errorCode',['../classserial_1_1_serial.html#af7d30495c321c8ebc8d81278b2df2706',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_4.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['feature_5ftests_2ec',['feature_tests.c',['../feature__tests_8c.html',1,'']]],
4 | ['feature_5ftests_2ecxx',['feature_tests.cxx',['../feature__tests_8cxx.html',1,'']]],
5 | ['features',['features',['../feature__tests_8c.html#a1582568e32f689337602a16bf8a5bff0',1,'features(): feature_tests.c'],['../feature__tests_8cxx.html#a1582568e32f689337602a16bf8a5bff0',1,'features(): feature_tests.cxx']]],
6 | ['flowcontroltype',['flowControlType',['../classserial_1_1_serial.html#a99b2dca0960526547c5a4a573237c615',1,'serial::Serial']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/doc/html/search/all_5.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_5.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['hex',['HEX',['../_c_make_c_compiler_id_8c.html#a46d5d95daa1bef867bd0179594310ed5',1,'HEX(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a46d5d95daa1bef867bd0179594310ed5',1,'HEX(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_6.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_6.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['info_5farch',['info_arch',['../_c_make_c_compiler_id_8c.html#a59647e99d304ed33b15cb284c27ed391',1,'info_arch(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a59647e99d304ed33b15cb284c27ed391',1,'info_arch(): CMakeCXXCompilerId.cpp']]],
4 | ['info_5fcompiler',['info_compiler',['../_c_make_c_compiler_id_8c.html#a4b0efeb7a5d59313986b3a0390f050f6',1,'info_compiler(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a4b0efeb7a5d59313986b3a0390f050f6',1,'info_compiler(): CMakeCXXCompilerId.cpp']]],
5 | ['info_5flanguage_5fdialect_5fdefault',['info_language_dialect_default',['../_c_make_c_compiler_id_8c.html#a1ce162bad2fe6966ac8b33cc19e120b8',1,'info_language_dialect_default(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a1ce162bad2fe6966ac8b33cc19e120b8',1,'info_language_dialect_default(): CMakeCXXCompilerId.cpp']]],
6 | ['info_5fplatform',['info_platform',['../_c_make_c_compiler_id_8c.html#a2321403dee54ee23f0c2fa849c60f7d4',1,'info_platform(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a2321403dee54ee23f0c2fa849c60f7d4',1,'info_platform(): CMakeCXXCompilerId.cpp']]],
7 | ['isopen',['isOpen',['../classserial_1_1_serial.html#adeab783cf03aca6b51640a871876ab04',1,'serial::Serial']]]
8 | ];
9 |
--------------------------------------------------------------------------------
/doc/html/search/all_7.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_7.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['main',['main',['../_c_make_c_compiler_id_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): CMakeCXXCompilerId.cpp'],['../feature__tests_8c.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): feature_tests.c'],['../feature__tests_8cxx.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): feature_tests.cxx'],['../_serial_port_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4',1,'main(): SerialPort.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_8.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_8.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['open',['open',['../classserial_1_1_serial.html#aaef0c8a34738616876ae2397ba64ba86',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_9.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_9.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['paritytype',['parityType',['../classserial_1_1_serial.html#a4ab9d6bc487d9f07907917d3b5e7c90f',1,'serial::Serial']]],
4 | ['platform_5fid',['PLATFORM_ID',['../_c_make_c_compiler_id_8c.html#adbc5372f40838899018fadbc89bd588b',1,'PLATFORM_ID(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#adbc5372f40838899018fadbc89bd588b',1,'PLATFORM_ID(): CMakeCXXCompilerId.cpp']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/doc/html/search/all_a.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_a.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['receive',['receive',['../classserial_1_1_serial.html#ace8d009eb8a44748f0085f611b8b8fb5',1,'serial::Serial::receive()'],['../classserial_1_1_serial.html#a20f135c34016f3dd2ebef5d8e3526685',1,'serial::Serial::receive(size_t const num_bytes)'],['../classserial_1_1_serial.html#a76259c27ce0cdf1d4344ccf10e0a3686',1,'serial::Serial::receive(size_t const num_bytes, unsigned int timeout)']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/all_b.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_b.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['serial',['Serial',['../classserial_1_1_serial.html',1,'serial::Serial'],['../namespaceserial.html',1,'serial'],['../classserial_1_1_serial.html#ab4d8c523610ac8640b52a69b5287b93c',1,'serial::Serial::Serial()']]],
4 | ['serial_2ecpp',['Serial.cpp',['../_serial_8cpp.html',1,'']]],
5 | ['serial_2eh',['Serial.h',['../_serial_8h.html',1,'']]],
6 | ['serialport_2ecpp',['SerialPort.cpp',['../_serial_port_8cpp.html',1,'']]],
7 | ['stopbitstype',['stopBitsType',['../classserial_1_1_serial.html#ae41b45f62e5e46f53f650f2a2678b407',1,'serial::Serial']]],
8 | ['stringify',['STRINGIFY',['../_c_make_c_compiler_id_8c.html#a43e1cad902b6477bec893cb6430bd6c8',1,'STRINGIFY(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a43e1cad902b6477bec893cb6430bd6c8',1,'STRINGIFY(): CMakeCXXCompilerId.cpp']]],
9 | ['stringify_5fhelper',['STRINGIFY_HELPER',['../_c_make_c_compiler_id_8c.html#a2ae9b72bb13abaabfcf2ee0ba7d3fa1d',1,'STRINGIFY_HELPER(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a2ae9b72bb13abaabfcf2ee0ba7d3fa1d',1,'STRINGIFY_HELPER(): CMakeCXXCompilerId.cpp']]]
10 | ];
11 |
--------------------------------------------------------------------------------
/doc/html/search/all_c.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/all_c.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['_7eserial',['~Serial',['../classserial_1_1_serial.html#a071000a2f5f77a40df8311fad5044481',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/classes_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/classes_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['serial',['Serial',['../classserial_1_1_serial.html',1,'serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/close.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/search/close.png
--------------------------------------------------------------------------------
/doc/html/search/defines_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/defines_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['architecture_5fid',['ARCHITECTURE_ID',['../_c_make_c_compiler_id_8c.html#aba35d0d200deaeb06aee95ca297acb28',1,'ARCHITECTURE_ID(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#aba35d0d200deaeb06aee95ca297acb28',1,'ARCHITECTURE_ID(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/defines_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/defines_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['c_5fdialect',['C_DIALECT',['../_c_make_c_compiler_id_8c.html#a07f8e5783674099cd7f5110e22a78cdb',1,'CMakeCCompilerId.c']]],
4 | ['compiler_5fid',['COMPILER_ID',['../_c_make_c_compiler_id_8c.html#a81dee0709ded976b2e0319239f72d174',1,'COMPILER_ID(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a81dee0709ded976b2e0319239f72d174',1,'COMPILER_ID(): CMakeCXXCompilerId.cpp']]],
5 | ['cxx_5fstd',['CXX_STD',['../_c_make_c_x_x_compiler_id_8cpp.html#a34cc889e576a1ae6c84ae9e0a851ba21',1,'CMakeCXXCompilerId.cpp']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/doc/html/search/defines_2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/defines_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['dec',['DEC',['../_c_make_c_compiler_id_8c.html#ad1280362da42492bbc11aa78cbf776ad',1,'DEC(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#ad1280362da42492bbc11aa78cbf776ad',1,'DEC(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/defines_3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/defines_3.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['hex',['HEX',['../_c_make_c_compiler_id_8c.html#a46d5d95daa1bef867bd0179594310ed5',1,'HEX(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a46d5d95daa1bef867bd0179594310ed5',1,'HEX(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/defines_4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/defines_4.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['platform_5fid',['PLATFORM_ID',['../_c_make_c_compiler_id_8c.html#adbc5372f40838899018fadbc89bd588b',1,'PLATFORM_ID(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#adbc5372f40838899018fadbc89bd588b',1,'PLATFORM_ID(): CMakeCXXCompilerId.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/defines_5.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/defines_5.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['stringify',['STRINGIFY',['../_c_make_c_compiler_id_8c.html#a43e1cad902b6477bec893cb6430bd6c8',1,'STRINGIFY(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a43e1cad902b6477bec893cb6430bd6c8',1,'STRINGIFY(): CMakeCXXCompilerId.cpp']]],
4 | ['stringify_5fhelper',['STRINGIFY_HELPER',['../_c_make_c_compiler_id_8c.html#a2ae9b72bb13abaabfcf2ee0ba7d3fa1d',1,'STRINGIFY_HELPER(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a2ae9b72bb13abaabfcf2ee0ba7d3fa1d',1,'STRINGIFY_HELPER(): CMakeCXXCompilerId.cpp']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/doc/html/search/files_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/files_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['cmakeccompilerid_2ec',['CMakeCCompilerId.c',['../_c_make_c_compiler_id_8c.html',1,'']]],
4 | ['cmakecxxcompilerid_2ecpp',['CMakeCXXCompilerId.cpp',['../_c_make_c_x_x_compiler_id_8cpp.html',1,'']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/doc/html/search/files_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/files_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['feature_5ftests_2ec',['feature_tests.c',['../feature__tests_8c.html',1,'']]],
4 | ['feature_5ftests_2ecxx',['feature_tests.cxx',['../feature__tests_8cxx.html',1,'']]]
5 | ];
6 |
--------------------------------------------------------------------------------
/doc/html/search/files_2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/files_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['serial_2ecpp',['Serial.cpp',['../_serial_8cpp.html',1,'']]],
4 | ['serial_2eh',['Serial.h',['../_serial_8h.html',1,'']]],
5 | ['serialport_2ecpp',['SerialPort.cpp',['../_serial_port_8cpp.html',1,'']]]
6 | ];
7 |
--------------------------------------------------------------------------------
/doc/html/search/functions_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['close',['close',['../classserial_1_1_serial.html#a501082725b61e4baf615266065bbac5f',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/functions_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['isopen',['isOpen',['../classserial_1_1_serial.html#adeab783cf03aca6b51640a871876ab04',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/functions_2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['main',['main',['../_c_make_c_compiler_id_8c.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97',1,'main(int argc, char *argv[]): CMakeCXXCompilerId.cpp'],['../feature__tests_8c.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): feature_tests.c'],['../feature__tests_8cxx.html#a3c04138a5bfe5d72780bb7e82a18e627',1,'main(int argc, char **argv): feature_tests.cxx'],['../_serial_port_8cpp.html#ae66f6b31b5ad750f1fe042a706a4e3d4',1,'main(): SerialPort.cpp']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/functions_3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_3.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['open',['open',['../classserial_1_1_serial.html#aaef0c8a34738616876ae2397ba64ba86',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/functions_4.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_4.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['receive',['receive',['../classserial_1_1_serial.html#ace8d009eb8a44748f0085f611b8b8fb5',1,'serial::Serial::receive()'],['../classserial_1_1_serial.html#a20f135c34016f3dd2ebef5d8e3526685',1,'serial::Serial::receive(size_t const num_bytes)'],['../classserial_1_1_serial.html#a76259c27ce0cdf1d4344ccf10e0a3686',1,'serial::Serial::receive(size_t const num_bytes, unsigned int timeout)']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/functions_5.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_5.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['serial',['Serial',['../classserial_1_1_serial.html#ab4d8c523610ac8640b52a69b5287b93c',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/functions_6.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/functions_6.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['_7eserial',['~Serial',['../classserial_1_1_serial.html#a071000a2f5f77a40df8311fad5044481',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/mag_sel.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/search/mag_sel.png
--------------------------------------------------------------------------------
/doc/html/search/namespaces_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/namespaces_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['serial',['serial',['../namespaceserial.html',1,'']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/nomatches.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/doc/html/search/search.css:
--------------------------------------------------------------------------------
1 | /*---------------- Search Box */
2 |
3 | #FSearchBox {
4 | float: left;
5 | }
6 |
7 | #MSearchBox {
8 | white-space : nowrap;
9 | float: none;
10 | margin-top: 8px;
11 | right: 0px;
12 | width: 170px;
13 | height: 24px;
14 | z-index: 102;
15 | }
16 |
17 | #MSearchBox .left
18 | {
19 | display:block;
20 | position:absolute;
21 | left:10px;
22 | width:20px;
23 | height:19px;
24 | background:url('search_l.png') no-repeat;
25 | background-position:right;
26 | }
27 |
28 | #MSearchSelect {
29 | display:block;
30 | position:absolute;
31 | width:20px;
32 | height:19px;
33 | }
34 |
35 | .left #MSearchSelect {
36 | left:4px;
37 | }
38 |
39 | .right #MSearchSelect {
40 | right:5px;
41 | }
42 |
43 | #MSearchField {
44 | display:block;
45 | position:absolute;
46 | height:19px;
47 | background:url('search_m.png') repeat-x;
48 | border:none;
49 | width:115px;
50 | margin-left:20px;
51 | padding-left:4px;
52 | color: #909090;
53 | outline: none;
54 | font: 9pt Arial, Verdana, sans-serif;
55 | -webkit-border-radius: 0px;
56 | }
57 |
58 | #FSearchBox #MSearchField {
59 | margin-left:15px;
60 | }
61 |
62 | #MSearchBox .right {
63 | display:block;
64 | position:absolute;
65 | right:10px;
66 | top:8px;
67 | width:20px;
68 | height:19px;
69 | background:url('search_r.png') no-repeat;
70 | background-position:left;
71 | }
72 |
73 | #MSearchClose {
74 | display: none;
75 | position: absolute;
76 | top: 4px;
77 | background : none;
78 | border: none;
79 | margin: 0px 4px 0px 0px;
80 | padding: 0px 0px;
81 | outline: none;
82 | }
83 |
84 | .left #MSearchClose {
85 | left: 6px;
86 | }
87 |
88 | .right #MSearchClose {
89 | right: 2px;
90 | }
91 |
92 | .MSearchBoxActive #MSearchField {
93 | color: #000000;
94 | }
95 |
96 | /*---------------- Search filter selection */
97 |
98 | #MSearchSelectWindow {
99 | display: none;
100 | position: absolute;
101 | left: 0; top: 0;
102 | border: 1px solid #90A5CE;
103 | background-color: #F9FAFC;
104 | z-index: 10001;
105 | padding-top: 4px;
106 | padding-bottom: 4px;
107 | -moz-border-radius: 4px;
108 | -webkit-border-top-left-radius: 4px;
109 | -webkit-border-top-right-radius: 4px;
110 | -webkit-border-bottom-left-radius: 4px;
111 | -webkit-border-bottom-right-radius: 4px;
112 | -webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
113 | }
114 |
115 | .SelectItem {
116 | font: 8pt Arial, Verdana, sans-serif;
117 | padding-left: 2px;
118 | padding-right: 12px;
119 | border: 0px;
120 | }
121 |
122 | span.SelectionMark {
123 | margin-right: 4px;
124 | font-family: monospace;
125 | outline-style: none;
126 | text-decoration: none;
127 | }
128 |
129 | a.SelectItem {
130 | display: block;
131 | outline-style: none;
132 | color: #000000;
133 | text-decoration: none;
134 | padding-left: 6px;
135 | padding-right: 12px;
136 | }
137 |
138 | a.SelectItem:focus,
139 | a.SelectItem:active {
140 | color: #000000;
141 | outline-style: none;
142 | text-decoration: none;
143 | }
144 |
145 | a.SelectItem:hover {
146 | color: #FFFFFF;
147 | background-color: #3D578C;
148 | outline-style: none;
149 | text-decoration: none;
150 | cursor: pointer;
151 | display: block;
152 | }
153 |
154 | /*---------------- Search results window */
155 |
156 | iframe#MSearchResults {
157 | width: 60ex;
158 | height: 15em;
159 | }
160 |
161 | #MSearchResultsWindow {
162 | display: none;
163 | position: absolute;
164 | left: 0; top: 0;
165 | border: 1px solid #000;
166 | background-color: #EEF1F7;
167 | z-index:10000;
168 | }
169 |
170 | /* ----------------------------------- */
171 |
172 |
173 | #SRIndex {
174 | clear:both;
175 | padding-bottom: 15px;
176 | }
177 |
178 | .SREntry {
179 | font-size: 10pt;
180 | padding-left: 1ex;
181 | }
182 |
183 | .SRPage .SREntry {
184 | font-size: 8pt;
185 | padding: 1px 5px;
186 | }
187 |
188 | body.SRPage {
189 | margin: 5px 2px;
190 | }
191 |
192 | .SRChildren {
193 | padding-left: 3ex; padding-bottom: .5em
194 | }
195 |
196 | .SRPage .SRChildren {
197 | display: none;
198 | }
199 |
200 | .SRSymbol {
201 | font-weight: bold;
202 | color: #425E97;
203 | font-family: Arial, Verdana, sans-serif;
204 | text-decoration: none;
205 | outline: none;
206 | }
207 |
208 | a.SRScope {
209 | display: block;
210 | color: #425E97;
211 | font-family: Arial, Verdana, sans-serif;
212 | text-decoration: none;
213 | outline: none;
214 | }
215 |
216 | a.SRSymbol:focus, a.SRSymbol:active,
217 | a.SRScope:focus, a.SRScope:active {
218 | text-decoration: underline;
219 | }
220 |
221 | span.SRScope {
222 | padding-left: 4px;
223 | }
224 |
225 | .SRPage .SRStatus {
226 | padding: 2px 5px;
227 | font-size: 8pt;
228 | font-style: italic;
229 | }
230 |
231 | .SRResult {
232 | display: none;
233 | }
234 |
235 | DIV.searchresults {
236 | margin-left: 10px;
237 | margin-right: 10px;
238 | }
239 |
240 | /*---------------- External search page results */
241 |
242 | .searchresult {
243 | background-color: #F0F3F8;
244 | }
245 |
246 | .pages b {
247 | color: white;
248 | padding: 5px 5px 3px 5px;
249 | background-image: url("../tab_a.png");
250 | background-repeat: repeat-x;
251 | text-shadow: 0 1px 1px #000000;
252 | }
253 |
254 | .pages {
255 | line-height: 17px;
256 | margin-left: 4px;
257 | text-decoration: none;
258 | }
259 |
260 | .hl {
261 | font-weight: bold;
262 | }
263 |
264 | #searchresults {
265 | margin-bottom: 20px;
266 | }
267 |
268 | .searchpages {
269 | margin-top: 10px;
270 | }
271 |
272 |
--------------------------------------------------------------------------------
/doc/html/search/search_l.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/search/search_l.png
--------------------------------------------------------------------------------
/doc/html/search/search_m.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/search/search_m.png
--------------------------------------------------------------------------------
/doc/html/search/search_r.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/search/search_r.png
--------------------------------------------------------------------------------
/doc/html/search/searchdata.js:
--------------------------------------------------------------------------------
1 | var indexSectionsWithContent =
2 | {
3 | 0: "acdefhimoprs~",
4 | 1: "s",
5 | 2: "s",
6 | 3: "cfs",
7 | 4: "cimors~",
8 | 5: "fi",
9 | 6: "efps",
10 | 7: "acdhps"
11 | };
12 |
13 | var indexSectionNames =
14 | {
15 | 0: "all",
16 | 1: "classes",
17 | 2: "namespaces",
18 | 3: "files",
19 | 4: "functions",
20 | 5: "variables",
21 | 6: "typedefs",
22 | 7: "defines"
23 | };
24 |
25 | var indexSectionLabels =
26 | {
27 | 0: "All",
28 | 1: "Classes",
29 | 2: "Namespaces",
30 | 3: "Files",
31 | 4: "Functions",
32 | 5: "Variables",
33 | 6: "Typedefs",
34 | 7: "Macros"
35 | };
36 |
37 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['errorcode',['errorCode',['../classserial_1_1_serial.html#af7d30495c321c8ebc8d81278b2df2706',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['flowcontroltype',['flowControlType',['../classserial_1_1_serial.html#a99b2dca0960526547c5a4a573237c615',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_2.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_2.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['paritytype',['parityType',['../classserial_1_1_serial.html#a4ab9d6bc487d9f07907917d3b5e7c90f',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_3.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/typedefs_3.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['stopbitstype',['stopBitsType',['../classserial_1_1_serial.html#ae41b45f62e5e46f53f650f2a2678b407',1,'serial::Serial']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/variables_0.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/variables_0.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['features',['features',['../feature__tests_8c.html#a1582568e32f689337602a16bf8a5bff0',1,'features(): feature_tests.c'],['../feature__tests_8cxx.html#a1582568e32f689337602a16bf8a5bff0',1,'features(): feature_tests.cxx']]]
4 | ];
5 |
--------------------------------------------------------------------------------
/doc/html/search/variables_1.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
Loading...
12 |
13 |
18 |
Searching...
19 |
No Matches
20 |
28 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/doc/html/search/variables_1.js:
--------------------------------------------------------------------------------
1 | var searchData=
2 | [
3 | ['info_5farch',['info_arch',['../_c_make_c_compiler_id_8c.html#a59647e99d304ed33b15cb284c27ed391',1,'info_arch(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a59647e99d304ed33b15cb284c27ed391',1,'info_arch(): CMakeCXXCompilerId.cpp']]],
4 | ['info_5fcompiler',['info_compiler',['../_c_make_c_compiler_id_8c.html#a4b0efeb7a5d59313986b3a0390f050f6',1,'info_compiler(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a4b0efeb7a5d59313986b3a0390f050f6',1,'info_compiler(): CMakeCXXCompilerId.cpp']]],
5 | ['info_5flanguage_5fdialect_5fdefault',['info_language_dialect_default',['../_c_make_c_compiler_id_8c.html#a1ce162bad2fe6966ac8b33cc19e120b8',1,'info_language_dialect_default(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a1ce162bad2fe6966ac8b33cc19e120b8',1,'info_language_dialect_default(): CMakeCXXCompilerId.cpp']]],
6 | ['info_5fplatform',['info_platform',['../_c_make_c_compiler_id_8c.html#a2321403dee54ee23f0c2fa849c60f7d4',1,'info_platform(): CMakeCCompilerId.c'],['../_c_make_c_x_x_compiler_id_8cpp.html#a2321403dee54ee23f0c2fa849c60f7d4',1,'info_platform(): CMakeCXXCompilerId.cpp']]]
7 | ];
8 |
--------------------------------------------------------------------------------
/doc/html/splitbar.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/splitbar.png
--------------------------------------------------------------------------------
/doc/html/sync_off.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/sync_off.png
--------------------------------------------------------------------------------
/doc/html/sync_on.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/sync_on.png
--------------------------------------------------------------------------------
/doc/html/tab_a.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/tab_a.png
--------------------------------------------------------------------------------
/doc/html/tab_b.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/tab_b.png
--------------------------------------------------------------------------------
/doc/html/tab_h.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/tab_h.png
--------------------------------------------------------------------------------
/doc/html/tab_s.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/html/tab_s.png
--------------------------------------------------------------------------------
/doc/images/readme.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/karthickai/serial/55e4e3bfd90c84236f4d4f5743b1502d8e6cb43a/doc/images/readme.jpg
--------------------------------------------------------------------------------
/examples/SerialEcho.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "../include/Serial.h"
4 |
5 | int main()
6 | {
7 | std::cout << "Serial Port Virtual Emulator!\n";
8 | std::cout << "It will echos msg serially\n\n";
9 | std::cout << "Enter the COM PORT : ";
10 | std::string comport{};
11 | std::cin >> comport;
12 | std::cout << "\nEnter the baud rate : ";
13 | unsigned int baud{};
14 | std::cin >> baud;
15 | std::cout << std::endl;
16 |
17 |
18 | serial::Serial s;
19 | s.open(comport, baud);
20 |
21 | if (s.isOpen()) {
22 | std::cout << "COM PORT OPENED\n";
23 |
24 | while (true) {
25 | std::future> future = s.receiveAsync(1);
26 |
27 | std::vector const received_data = future.get();
28 |
29 | s.transmitAsync(received_data);
30 | }
31 | }
32 |
33 | std::cout << "COM PORT OPENED\n";
34 |
35 |
36 | s.close();
37 | }
38 |
--------------------------------------------------------------------------------
/include/Serial.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include
4 | #include
5 | #include
6 | #include
7 |
8 | #include
9 | #include
10 |
11 | namespace serial {
12 |
13 | class Serial
14 | {
15 |
16 | public:
17 | typedef boost::asio::serial_port_base::flow_control::type flowControlType;
18 | typedef boost::asio::serial_port_base::parity::type parityType;
19 | typedef boost::asio::serial_port_base::stop_bits::type stopBitsType;
20 | typedef boost::system::errc::errc_t errorCode;
21 |
22 | public:
23 | Serial();
24 | ~Serial();
25 |
26 | void open(std::string,
27 | unsigned int = 115200,
28 | flowControlType = flowControlType::none,
29 | unsigned int = 8,
30 | parityType = parityType::none,
31 | stopBitsType = stopBitsType::one);
32 |
33 | bool isOpen() const;
34 | void close();
35 | std::future> receiveAsync(size_t const num_bytes);
36 | std::future> receiveAsync(size_t const num_bytes, unsigned int timeout);
37 |
38 | void transmit(std::vector const& data);
39 | std::size_t transmitAsync(const std::vector& v);
40 |
41 |
42 |
43 |
44 | private:
45 |
46 | boost::asio::io_context io_context;
47 | boost::asio::serial_port serial_port;
48 | boost::asio::io_context::work serial_work;
49 |
50 | void asyncRead();
51 | void asyncReadHandler(boost::system::error_code const& error, size_t bytes_transferred);
52 | int16_t readByte();
53 | std::vector readBuffer(size_t len);
54 | std::vector readBufferTimeout(size_t len);
55 |
56 |
57 | std::array buf;
58 |
59 |
60 | std::vector usableReadBuffer;
61 | std::size_t readBufferSize = 256;
62 | std::unique_ptr asyncReadThread;
63 | mutable std::mutex readBufferMtx;
64 |
65 |
66 | mutable std::mutex errMtx;
67 | int error_value{};
68 | void setError(const int error_value);
69 | int getError() const;
70 |
71 | unsigned int timeoutVal = 60000;
72 |
73 |
74 |
75 | mutable std::mutex writeMtx;
76 | std::condition_variable writeCv;
77 | bool writeLocked = false;
78 | void asyncWriteHandler(const boost::system::error_code& error, std::size_t bytes_transferred);
79 |
80 |
81 | };
82 |
83 |
84 | Serial::Serial() : io_context(), serial_port(io_context), serial_work(io_context), asyncReadThread(nullptr), buf{} {};
85 |
86 |
87 | Serial::~Serial() {
88 | if (serial_port.is_open())
89 | close();
90 | }
91 |
92 | void Serial::open(std::string dev_node, unsigned int baud, flowControlType flowControl, unsigned int characterSize, parityType parity, stopBitsType stopBits)
93 | {
94 |
95 | serial_port.open(dev_node);
96 | if (!serial_port.is_open())
97 | return;
98 |
99 | serial_port.set_option(boost::asio::serial_port_base::baud_rate(baud));
100 | serial_port.set_option(boost::asio::serial_port_base::flow_control(flowControl));
101 | serial_port.set_option(boost::asio::serial_port_base::character_size(characterSize));
102 | serial_port.set_option(boost::asio::serial_port_base::parity(parity));
103 | serial_port.set_option(boost::asio::serial_port_base::stop_bits(stopBits));
104 |
105 | asyncReadThread.reset(new std::thread([this] { io_context.run(); }));
106 |
107 | asyncRead();
108 |
109 | }
110 |
111 |
112 | bool Serial::isOpen() const
113 | {
114 | return serial_port.is_open();
115 | }
116 |
117 |
118 | void Serial::close()
119 | {
120 | if (!serial_port.is_open())
121 | return;
122 |
123 | serial_port.cancel();
124 |
125 | io_context.stop();
126 | asyncReadThread->join();
127 |
128 | serial_port.close();
129 | }
130 |
131 |
132 | void Serial::asyncRead() {
133 |
134 | serial_port.async_read_some(
135 | boost::asio::buffer(buf, buf.size()),
136 | [this](const boost::system::error_code& error, std::size_t bytes_transferred) {
137 | asyncReadHandler(error, bytes_transferred);
138 | });
139 | }
140 |
141 |
142 | void Serial::asyncReadHandler(const boost::system::error_code& error, std::size_t bytes_transferred)
143 | {
144 | if (error)
145 | setError(error.value());
146 |
147 |
148 | std::unique_lock lk(readBufferMtx);
149 | for (auto i = 0; i < bytes_transferred; i++)
150 | {
151 | usableReadBuffer.push_back(buf[i]);
152 | }
153 |
154 | if (usableReadBuffer.size() > readBufferSize)
155 | {
156 |
157 | unsigned int overflow = usableReadBuffer.size() - readBufferSize;
158 | usableReadBuffer.erase(usableReadBuffer.begin(), usableReadBuffer.begin() + overflow);
159 | }
160 | lk.unlock();
161 |
162 | asyncRead();
163 |
164 | }
165 |
166 | void Serial::asyncWriteHandler(const boost::system::error_code& error, std::size_t bytes_transferred)
167 | {
168 | if (error)
169 | setError(error.value());
170 |
171 | std::unique_lock lk(writeMtx);
172 | writeLocked = false;
173 | lk.unlock();
174 | writeCv.notify_one();
175 | }
176 |
177 |
178 | int16_t Serial::readByte()
179 | {
180 | std::unique_lock lk(readBufferMtx);
181 |
182 | if (!usableReadBuffer.size())
183 | return -1;
184 |
185 | int res = usableReadBuffer[0];
186 | usableReadBuffer.erase(usableReadBuffer.begin());
187 | return res;
188 | }
189 |
190 |
191 | std::vector Serial::readBuffer(size_t len)
192 | {
193 | std::vector res;
194 |
195 | while (res.size() < len)
196 | {
197 | const int16_t b = readByte();
198 | if (b > -1)
199 | {
200 | res.push_back((uint8_t)b);
201 | }
202 | }
203 | return res;
204 | }
205 |
206 |
207 | std::vector Serial::readBufferTimeout(size_t len)
208 | {
209 | auto start = std::chrono::system_clock::now();
210 | bool timeout = false;
211 | std::vector res;
212 |
213 | while (res.size() < len && !timeout)
214 | {
215 | auto now = std::chrono::system_clock::now();
216 | auto elapsed = std::chrono::duration_cast(now - start);
217 | if (elapsed.count() >= timeoutVal)
218 | {
219 | timeout = true;
220 | }
221 | else
222 | {
223 | const int16_t b = readByte();
224 | if (b > -1)
225 | {
226 | res.push_back((uint8_t)b);
227 | }
228 | }
229 | }
230 | return res;
231 | }
232 |
233 |
234 |
235 | std::future> Serial::receiveAsync(size_t const num_bytes)
236 | {
237 | return std::async(std::launch::deferred, boost::bind(&Serial::readBuffer, this, num_bytes));
238 | }
239 |
240 | std::future> Serial::receiveAsync(size_t const num_bytes, unsigned int timeout)
241 | {
242 | timeoutVal = timeout;
243 | return std::async(std::launch::deferred, boost::bind(&Serial::readBufferTimeout, this, num_bytes));
244 | }
245 |
246 |
247 | void Serial::transmit(std::vector const& data)
248 | {
249 | boost::asio::write(serial_port, boost::asio::buffer(data));
250 | }
251 |
252 |
253 | std::size_t Serial::transmitAsync(const std::vector& v)
254 | {
255 | std::unique_lock lk(writeMtx);
256 | if (writeLocked)
257 | writeCv.wait(lk);
258 |
259 | writeLocked = true;
260 | lk.unlock();
261 |
262 | boost::asio::async_write(
263 | serial_port,
264 | boost::asio::buffer(v, v.size()),
265 | [this](const boost::system::error_code& error, std::size_t bytes_transferred) {
266 | asyncWriteHandler(error, bytes_transferred);
267 | });
268 |
269 | return v.size();
270 | }
271 |
272 |
273 | void Serial::setError(const int error)
274 | {
275 | std::unique_lock elk(errMtx);
276 | error_value = error;
277 |
278 | }
279 |
280 | int Serial::getError() const
281 | {
282 | std::unique_lock lk(errMtx);
283 | return error_value;
284 | }
285 |
286 | }
287 |
288 |
289 |
--------------------------------------------------------------------------------
/src/SerialPort.cpp:
--------------------------------------------------------------------------------
1 |
2 | #include
3 | #include "Serial.h"
4 |
5 | int main()
6 | {
7 | std::cout << "Serial Port Library!\n";
8 |
9 | serial::Serial s;
10 | std::cout << s.isOpen() << std::endl;
11 | s.open("COM3");
12 | std::cout << s.isOpen() << std::endl;
13 |
14 | auto start = std::chrono::system_clock::now();
15 |
16 | auto future = s.receiveAsync(5, 5000);
17 | auto const v = future.get();
18 |
19 | auto end = std::chrono::system_clock::now();
20 | std::chrono::duration elapsed_seconds = end - start;
21 |
22 | if (v.size() < 1)
23 | std::cout << "TIMEOUT" << "elapsed time: " << elapsed_seconds.count() << std::endl;
24 | else {
25 | for (auto val : v) {
26 | std::cout << std::hex << val << " ";
27 | }
28 | std::cout << std::endl;
29 | s.transmit(v);
30 | }
31 |
32 | s.close();
33 | }
34 |
--------------------------------------------------------------------------------