15 std::mutex* p_connection_mtx,
bool* p_is_connected):
16 p_finger_data_mtx_(p_finger_data_mtx),
17 p_connection_mtx_(p_connection_mtx),
18 p_is_connected_(p_is_connected)
38 bool no_exceptions =
true;
40 std::string port_name =
"/dev/ttyUSB";
41 port_name += std::to_string(port_num);
45 this->Open(port_name);
47 catch (LibSerial::OpenFailed& e)
49 no_exceptions =
false;
51 catch (std::runtime_error& e)
53 no_exceptions =
false;
58 this->SetBaudRate(LibSerial::BaudRate::BAUD_115200);
59 this->FlushIOBuffers();
67 bool no_exceptions =
true;
73 catch (LibSerial::NotOpen& e)
77 catch (std::runtime_error& e)
79 no_exceptions =
false;
92 WriteByte((
char) 0x2A);
93 WriteByte((
char) 0x0D);
95 catch (LibSerial::NotOpen& e)
99 catch (std::runtime_error& e)
112 bool& is_checking_on)
114 bool no_exceptions =
true;
120 catch (LibSerial::NotOpen& e)
122 no_exceptions =
false;
124 catch (std::runtime_error& e)
126 no_exceptions =
false;
147 is_checking_on =
false;