mirror of
https://github.com/PhotonVision/photonvision
synced 2026-07-02 02:51:40 +00:00
Create timesync JNI for testing client (#1433)
This commit is contained in:
@@ -28,6 +28,7 @@ void StructType::Pack(Packet& packet, const PhotonPipelineMetadata& value) {
|
||||
packet.Pack<int64_t>(value.sequenceID);
|
||||
packet.Pack<int64_t>(value.captureTimestampMicros);
|
||||
packet.Pack<int64_t>(value.publishTimestampMicros);
|
||||
packet.Pack<int64_t>(value.timeSinceLastPong);
|
||||
}
|
||||
|
||||
PhotonPipelineMetadata StructType::Unpack(Packet& packet) {
|
||||
@@ -35,6 +36,7 @@ PhotonPipelineMetadata StructType::Unpack(Packet& packet) {
|
||||
.sequenceID = packet.Unpack<int64_t>(),
|
||||
.captureTimestampMicros = packet.Unpack<int64_t>(),
|
||||
.publishTimestampMicros = packet.Unpack<int64_t>(),
|
||||
.timeSinceLastPong = packet.Unpack<int64_t>(),
|
||||
}};
|
||||
}
|
||||
|
||||
|
||||
@@ -34,12 +34,12 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<PhotonPipelineMetadata> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "626e70461cbdb274fb43ead09c255f4e";
|
||||
return "ac0a45f686457856fb30af77699ea356";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
return "int64 sequenceID;int64 captureTimestampMicros;int64 "
|
||||
"publishTimestampMicros;";
|
||||
"publishTimestampMicros;int64 timeSinceLastPong;";
|
||||
}
|
||||
|
||||
static photon::PhotonPipelineMetadata Unpack(photon::Packet& packet);
|
||||
|
||||
@@ -39,11 +39,11 @@ namespace photon {
|
||||
template <>
|
||||
struct WPILIB_DLLEXPORT SerdeType<PhotonPipelineResult> {
|
||||
static constexpr std::string_view GetSchemaHash() {
|
||||
return "5eeaa293d0c69aea90eaddea786a2b3b";
|
||||
return "4b2ff16a964b5e2bf04be0c1454d91c4";
|
||||
}
|
||||
|
||||
static constexpr std::string_view GetSchema() {
|
||||
return "PhotonPipelineMetadata:626e70461cbdb274fb43ead09c255f4e "
|
||||
return "PhotonPipelineMetadata:ac0a45f686457856fb30af77699ea356 "
|
||||
"metadata;PhotonTrackedTarget:cc6dbb5c5c1e0fa808108019b20863f1 "
|
||||
"targets[?];optional "
|
||||
"MultiTargetPNPResult:541096947e9f3ca2d3f425ff7b04aa7b "
|
||||
|
||||
@@ -29,6 +29,7 @@ struct PhotonPipelineMetadata_PhotonStruct {
|
||||
int64_t sequenceID;
|
||||
int64_t captureTimestampMicros;
|
||||
int64_t publishTimestampMicros;
|
||||
int64_t timeSinceLastPong;
|
||||
|
||||
friend bool operator==(PhotonPipelineMetadata_PhotonStruct const&,
|
||||
PhotonPipelineMetadata_PhotonStruct const&) = default;
|
||||
|
||||
Reference in New Issue
Block a user