Skip to content

Commit 6629f67

Browse files
authored
Add message priorities to RemoteConnection (#1497)
* add priority argument to the sendMessage and broadcastMessage methods * update send buffer size limits * update priority levels * clang-format * switch back to logging all >=info foxglove log message as depthai INFO logs * change websocketpp portfile data and use Luxonis's fork * add queue size message dropping (as opposed to number of buffered bytes) * revert PointCloudData bindings clang format * remove unused code * simplify code structure * bump visualizer commit, bump ws-protocol commit * update websocketpp commit and sha512 sum
1 parent 7e3cebb commit 6629f67

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+173
-15
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# "full commit hash of depthai visualizer static files"
2-
set(DEPTHAI_VISUALIZER_COMMIT "0.12.33")
2+
set(DEPTHAI_VISUALIZER_COMMIT "1.5.18")

cmake/ports/websocketpp/portfile.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
vcpkg_from_github(
44
OUT_SOURCE_PATH SOURCE_PATH
5-
REPO amini-allight/websocketpp
6-
REF ee8cf4257e001d939839cff5b1766a835b749cd6 # 0.8.2
7-
SHA512 b8af1874655b29786e03ffd4bc91bcfdcad8a2a83cb26544269ec7f5a6464e83a36c2015a997d6128a088b92d22594ca47022cb250558f4bf97cb793e81f045d
5+
REPO luxonis/websocketpp
6+
REF cebc62c393f07e664121f9b801ee7e8a1b273cee
7+
SHA512 ca48ebf3c7811e6194eeb97ba86b72c49d442f831549995c67edb4827b1b859c30b636ddd6478a5c9814a5438a40a59e59d3c4a76bdc9330d7cf28e3d1a5070b
88
HEAD_REF develop
99
)
1010

include/depthai/pipeline/datatype/ADatatype.hpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ class ADatatype {
2525
virtual ~ADatatype();
2626
virtual void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const;
2727

28+
/**
29+
* @brief Get the datatype of this specific message
30+
* @return DatatypeEnum
31+
*/
32+
virtual DatatypeEnum getDatatype() const {
33+
return DatatypeEnum::ADatatype;
34+
}
35+
2836
std::shared_ptr<Memory> data;
2937
};
3038

include/depthai/pipeline/datatype/AprilTagConfig.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class AprilTagConfig : public Buffer {
1717
~AprilTagConfig() override;
1818
void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override;
1919

20+
DatatypeEnum getDatatype() const override {
21+
return DatatypeEnum::AprilTagConfig;
22+
}
23+
2024
/**
2125
* Supported AprilTag families.
2226
*/

include/depthai/pipeline/datatype/AprilTags.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@ class AprilTags : public Buffer {
7171
~AprilTags() override;
7272
void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override;
7373

74+
DatatypeEnum getDatatype() const override {
75+
return DatatypeEnum::AprilTags;
76+
}
77+
7478
std::vector<AprilTag> aprilTags;
7579
DEPTHAI_SERIALIZE(AprilTags, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, aprilTags);
7680
};

include/depthai/pipeline/datatype/BenchmarkReport.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ class BenchmarkReport : public Buffer {
2121
~BenchmarkReport() override;
2222
void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override;
2323

24+
DatatypeEnum getDatatype() const override {
25+
return DatatypeEnum::BenchmarkReport;
26+
}
27+
2428
DEPTHAI_SERIALIZE(BenchmarkReport, Buffer::sequenceNum, Buffer::ts, Buffer::tsDevice, fps, timeTotal, numMessagesReceived, averageLatency, latencies);
2529
};
2630

include/depthai/pipeline/datatype/Buffer.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ class Buffer : public ADatatype {
2727
~Buffer() override;
2828
void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override;
2929

30+
DatatypeEnum getDatatype() const override {
31+
return DatatypeEnum::Buffer;
32+
}
33+
3034
/**
3135
* @brief Get non-owning reference to internal buffer
3236
* @returns Reference to internal buffer

include/depthai/pipeline/datatype/CameraControl.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -796,6 +796,10 @@ class CameraControl : public Buffer {
796796
~CameraControl() override;
797797
void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override;
798798

799+
DatatypeEnum getDatatype() const override {
800+
return DatatypeEnum::CameraControl;
801+
}
802+
799803
DEPTHAI_SERIALIZE(CameraControl,
800804
cmdMask,
801805
autoFocusMode,

include/depthai/pipeline/datatype/DynamicCalibrationControl.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,11 @@ class DynamicCalibrationControl : public Buffer {
112112

113113
void serialize(std::vector<std::uint8_t>& metadata, DatatypeEnum& datatype) const override {
114114
metadata = utility::serialize(*this);
115-
datatype = DatatypeEnum::DynamicCalibrationControl;
115+
datatype = this->getDatatype();
116+
}
117+
118+
DatatypeEnum getDatatype() const override {
119+
return DatatypeEnum::DynamicCalibrationControl;
116120
}
117121
};
118122

0 commit comments

Comments
 (0)