Skip to content

Commit ce9e896

Browse files
committed
format
1 parent 30e9448 commit ce9e896

5 files changed

Lines changed: 7 additions & 26 deletions

File tree

infinite_sense_core/include/messenger.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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:

infinite_sense_core/include/net.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,22 @@
33

44
#include <thread>
55
#include <memory>
6-
76
namespace infinite_sense {
87
class Ptp;
98
class 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

infinite_sense_core/include/ptp.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,12 @@
55
namespace infinite_sense {
66
class 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};

infinite_sense_core/include/sensor.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class Sensor {
2121
void SetParams(const std::map<std::string, TriggerDevice> &params_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};

infinite_sense_core/include/usb.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,26 +8,17 @@ namespace infinite_sense {
88
class Ptp;
99
class 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

0 commit comments

Comments
 (0)