File tree Expand file tree Collapse file tree
infinite_sense_core/include Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,9 +16,9 @@ class Messenger {
1616 Messenger (const Messenger&) = delete ;
1717 Messenger (const Messenger&&) = delete ;
1818 Messenger& operator =(const Messenger&) = delete ;
19- std::string GetPubEndpoint () const ;
2019 void Pub (const std::string& topic, const std::string& metadata);
2120 void PubStruct (const std::string& topic, const void * data, size_t size);
21+ [[nodiscard]] std::string GetPubEndpoint () const ;
2222 [[noreturn]] void WaitAsk ();
2323
2424 private:
Original file line number Diff line number Diff line change 33
44#include < thread>
55#include < memory>
6-
76namespace infinite_sense {
87class Ptp ;
98class NetManager {
109 public:
1110 explicit NetManager (std::string target_ip, unsigned short port);
12-
1311 ~NetManager ();
14-
1512 void Start ();
16-
1713 void Stop ();
18-
1914 private:
20-
2115 void Receive () const ;
22-
2316 void TimeStampSynchronization () const ;
2417 std::shared_ptr<UDPSocket> net_ptr_;
2518 std::shared_ptr<Ptp> ptp_;
26-
2719 unsigned short port_{};
2820 std::string target_ip_;
29-
3021 std::thread rx_thread_, tx_thread_;
3122 bool started_{false };
32- size_t frame_count_{0 };
33- bool config_{false };
3423};
3524} // namespace infinite_sense
Original file line number Diff line number Diff line change 55namespace infinite_sense {
66class Ptp {
77 public:
8+
89 Ptp () = default ;
9- void ReceivePtpData (const nlohmann::json &data );
10+ void ReceivePtpData (const nlohmann::json &);
1011 void SendPtpData () const ;
11- void SetUsbPtr (const std::shared_ptr<serial::Serial> &serial_ptr );
12- void SetNetPtr (const std::shared_ptr<UDPSocket> &net_ptr , const std::string &target_ip , unsigned short port );
12+ void SetUsbPtr (const std::shared_ptr<serial::Serial> &);
13+ void SetNetPtr (const std::shared_ptr<UDPSocket> &, const std::string &, unsigned short );
1314
1415 private:
1516 std::shared_ptr<serial::Serial> serial_ptr_{nullptr };
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class Sensor {
2121 void SetParams (const std::map<std::string, TriggerDevice> ¶ms_in) { params = params_in; };
2222
2323 private:
24- virtual void Receive (void *handle , const std::string &) = 0;
24+ virtual void Receive (void *, const std::string &) = 0;
2525
2626 protected:
2727 bool is_running{false };
Original file line number Diff line number Diff line change @@ -8,26 +8,17 @@ namespace infinite_sense {
88class Ptp ;
99class UsbManager {
1010 public:
11- explicit UsbManager (const std::string &port, int baud_rate);
12-
11+ explicit UsbManager (const std::string &, int );
1312 ~UsbManager ();
14-
15- [[nodiscard]] bool IsAvailable () const { return serial_ptr_->isOpen (); }
16-
1713 void Start ();
18-
1914 void Stop ();
20-
2115 private:
22-
2316 void Receive () const ;
24-
2517 void TimeStampSynchronization () const ;
2618 std::string port_;
2719 std::shared_ptr<serial::Serial> serial_ptr_;
2820 std::shared_ptr<Ptp> ptp_;
2921 std::thread rx_thread_, tx_thread_;
3022 bool started_{false };
31- size_t frame_count_{0 };
3223};
3324} // namespace infinite_sense
You can’t perform that action at this time.
0 commit comments