56class CommDriverN2KSerial :
public CommDriverN2K,
60 CommDriverN2KSerial();
63 virtual ~CommDriverN2KSerial();
70 bool SendMessage(std::shared_ptr<const NavMsg> msg,
71 std::shared_ptr<const NavAddr> addr)
override;
73 void AddTxPGN(
int pgn);
75 int SetTXPGN(
int pgn)
override;
80 void SetSecThreadActive(
void) { m_bsec_thread_active =
true; }
81 void SetSecThreadInActive(
void) { m_bsec_thread_active =
false; }
82 bool IsSecThreadActive()
const {
return m_bsec_thread_active; }
84 void SetSecondaryThread(CommDriverN2KSerialThread* secondary_Thread) {
85 m_pSecondary_Thread = secondary_Thread;
87 CommDriverN2KSerialThread* GetSecondaryThread() {
88 return m_pSecondary_Thread;
90 void SetThreadRunFlag(
int run) { m_Thread_run_flag = run; }
92 void handle_N2K_SERIAL_RAW(CommDriverN2KSerialEvent& event);
97 std::atomic_int m_Thread_run_flag;
98 ConnectionParams m_params;
101 void ProcessManagementPacket(std::vector<unsigned char>* payload);
107 int SendMgmtMsg(
unsigned char*
string,
size_t string_size,
108 unsigned char cmd_code,
int timeout_msec,
109 bool* response_flag);
112 std::string m_portstring;
113 std::string m_BaudRate;
116 CommDriverN2KSerialThread* m_pSecondary_Thread;
117 bool m_bsec_thread_active;
119 DriverListener& m_listener;
127 std::string m_device_common_name;
129 int m_manufacturers_code;
131 StatsTimer m_stats_timer;
132 DriverStats m_driver_stats;
133 std::vector<int> pgn_tx_list;