From cec1f04c48d3fd6a999225b656ea616aca2f23e5 Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Sat, 4 Nov 2023 06:33:43 -0400 Subject: [PATCH 1/6] Tracking pause state (#126) * Add a way to get tracking pause state * Generate Flatbuffers --- .../generated/all_generated.h | 124 +++++++++++++++++- .../solarxr_protocol/rpc/ArmsResetMode.java | 26 ---- .../solarxr_protocol/rpc/ArmsResetType.java | 25 ---- .../src/solarxr_protocol/rpc/RpcMessage.java | 4 +- .../rpc/RpcMessageHeader.java | 8 ++ .../solarxr_protocol/rpc/RpcMessageUnion.java | 4 + .../rpc/TrackingPauseStateRequest.java | 47 +++++++ .../rpc/TrackingPauseStateRequestT.java | 16 +++ .../rpc/TrackingPauseStateResponse.java | 59 +++++++++ .../rpc/TrackingPauseStateResponseT.java | 22 ++++ .../src/solarxr_protocol/rpc/ArmsResetMode.kt | 24 ---- .../src/solarxr_protocol/rpc/ArmsResetType.kt | 24 ---- .../src/solarxr_protocol/rpc/RpcMessage.kt | 4 +- .../rpc/TrackingPauseStateRequest.kt | 40 ++++++ .../rpc/TrackingPauseStateResponse.kt | 53 ++++++++ protocol/rust/src/generated/mod.rs | 4 + .../rpc/arms_reset_mode_generated.rs | 103 --------------- .../rpc/arms_reset_type_generated.rs | 103 --------------- .../rpc/rpc_message_generated.rs | 14 +- .../rpc/rpc_message_header_generated.rs | 46 +++++++ .../tracking_pause_state_request_generated.rs | 91 +++++++++++++ ...tracking_pause_state_response_generated.rs | 109 +++++++++++++++ protocol/typescript/src/all_generated.ts | 2 + .../solarxr-protocol/rpc/arms-reset-mode.ts | 18 --- .../solarxr-protocol/rpc/arms-reset-type.ts | 18 --- .../rpc/rpc-message-header.ts | 4 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 18 ++- .../rpc/tracking-pause-state-request.ts | 57 ++++++++ .../rpc/tracking-pause-state-response.ts | 75 +++++++++++ schema/rpc.fbs | 10 ++ 30 files changed, 795 insertions(+), 357 deletions(-) delete mode 100644 protocol/java/src/solarxr_protocol/rpc/ArmsResetMode.java delete mode 100644 protocol/java/src/solarxr_protocol/rpc/ArmsResetType.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java delete mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetMode.kt delete mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetType.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt delete mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_mode_generated.rs delete mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_type_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs delete mode 100644 protocol/typescript/src/solarxr-protocol/rpc/arms-reset-mode.ts delete mode 100644 protocol/typescript/src/solarxr-protocol/rpc/arms-reset-type.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index dd7a63da..242addeb 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -330,6 +330,12 @@ struct ClearMountingResetRequestBuilder; struct SaveFileNotification; struct SaveFileNotificationBuilder; +struct TrackingPauseStateRequest; +struct TrackingPauseStateRequestBuilder; + +struct TrackingPauseStateResponse; +struct TrackingPauseStateResponseBuilder; + } // namespace rpc namespace pub_sub { @@ -882,11 +888,13 @@ enum class RpcMessage : uint8_t { AutoBoneStopRecordingRequest = 49, AutoBoneCancelRecordingRequest = 50, SaveFileNotification = 51, + TrackingPauseStateRequest = 52, + TrackingPauseStateResponse = 53, MIN = NONE, - MAX = SaveFileNotification + MAX = TrackingPauseStateResponse }; -inline const RpcMessage (&EnumValuesRpcMessage())[52] { +inline const RpcMessage (&EnumValuesRpcMessage())[54] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -939,13 +947,15 @@ inline const RpcMessage (&EnumValuesRpcMessage())[52] { RpcMessage::AutoBoneApplyRequest, RpcMessage::AutoBoneStopRecordingRequest, RpcMessage::AutoBoneCancelRecordingRequest, - RpcMessage::SaveFileNotification + RpcMessage::SaveFileNotification, + RpcMessage::TrackingPauseStateRequest, + RpcMessage::TrackingPauseStateResponse }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[53] = { + static const char * const names[55] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -998,13 +1008,15 @@ inline const char * const *EnumNamesRpcMessage() { "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", + "TrackingPauseStateRequest", + "TrackingPauseStateResponse", nullptr }; return names; } inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::SaveFileNotification)) return ""; + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::TrackingPauseStateResponse)) return ""; const size_t index = static_cast(e); return EnumNamesRpcMessage()[index]; } @@ -1217,6 +1229,14 @@ template<> struct RpcMessageTraits static const RpcMessage enum_value = RpcMessage::SaveFileNotification; }; +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::TrackingPauseStateRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::TrackingPauseStateResponse; +}; + bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); @@ -4196,6 +4216,12 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::SaveFileNotification *message_as_SaveFileNotification() const { return message_type() == solarxr_protocol::rpc::RpcMessage::SaveFileNotification ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::TrackingPauseStateRequest *message_as_TrackingPauseStateRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::TrackingPauseStateResponse *message_as_TrackingPauseStateResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateResponse ? static_cast(message()) : nullptr; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TX_ID, 4) && @@ -4410,6 +4436,14 @@ template<> inline const solarxr_protocol::rpc::SaveFileNotification *RpcMessageH return message_as_SaveFileNotification(); } +template<> inline const solarxr_protocol::rpc::TrackingPauseStateRequest *RpcMessageHeader::message_as() const { + return message_as_TrackingPauseStateRequest(); +} + +template<> inline const solarxr_protocol::rpc::TrackingPauseStateResponse *RpcMessageHeader::message_as() const { + return message_as_TrackingPauseStateResponse(); +} + struct RpcMessageHeaderBuilder { typedef RpcMessageHeader Table; flatbuffers::FlatBufferBuilder &fbb_; @@ -8411,6 +8445,78 @@ inline flatbuffers::Offset CreateSaveFileNotificationDirec expected_filename__); } +/// Requests the current state of tracking pause +struct TrackingPauseStateRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackingPauseStateRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct TrackingPauseStateRequestBuilder { + typedef TrackingPauseStateRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit TrackingPauseStateRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateTrackingPauseStateRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + TrackingPauseStateRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct TrackingPauseStateResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackingPauseStateResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKINGPAUSED = 4 + }; + /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + bool trackingPaused() const { + return GetField(VT_TRACKINGPAUSED, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TRACKINGPAUSED, 1) && + verifier.EndTable(); + } +}; + +struct TrackingPauseStateResponseBuilder { + typedef TrackingPauseStateResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_trackingPaused(bool trackingPaused) { + fbb_.AddElement(TrackingPauseStateResponse::VT_TRACKINGPAUSED, static_cast(trackingPaused), 0); + } + explicit TrackingPauseStateResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateTrackingPauseStateResponse( + flatbuffers::FlatBufferBuilder &_fbb, + bool trackingPaused = false) { + TrackingPauseStateResponseBuilder builder_(_fbb); + builder_.add_trackingPaused(trackingPaused); + return builder_.Finish(); +} + } // namespace rpc namespace pub_sub { @@ -9340,6 +9446,14 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::TrackingPauseStateRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::TrackingPauseStateResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } default: return true; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ArmsResetMode.java b/protocol/java/src/solarxr_protocol/rpc/ArmsResetMode.java deleted file mode 100644 index 884f97b3..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/ArmsResetMode.java +++ /dev/null @@ -1,26 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class ArmsResetMode { - private ArmsResetMode() { } - /** - * Upper arm going back and forearm going forward - */ - public static final int BACK = 0; - /** - * Arms going to the side - */ - public static final int TPOSE = 1; - /** - * Arms going forward - */ - public static final int FORWARD = 2; - - public static final String[] names = { "BACK", "TPOSE", "FORWARD", }; - - public static String name(int e) { return names[e]; } - -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/ArmsResetType.java b/protocol/java/src/solarxr_protocol/rpc/ArmsResetType.java deleted file mode 100644 index 2cae9b2d..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/ArmsResetType.java +++ /dev/null @@ -1,25 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class ArmsResetType { - private ArmsResetType() { } - /** - * Upper arm going back and forearm going forward - */ - public static final int BACK = 0; - /** - * Arms going to the side - */ - public static final int TPOSE = 1; - /** - * Arms going forward - */ - public static final int FRONT = 2; - - public static final String[] names = { "BACK", "TPOSE", "FRONT", }; - - public static String name(int e) { return names[e]; } -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index 76f3396e..adabb0ed 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -57,8 +57,10 @@ private RpcMessage() { } public static final byte AutoBoneStopRecordingRequest = 49; public static final byte AutoBoneCancelRecordingRequest = 50; public static final byte SaveFileNotification = 51; + public static final byte TrackingPauseStateRequest = 52; + public static final byte TrackingPauseStateResponse = 53; - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", }; + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java index eacd808a..df0b46a6 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -256,6 +256,14 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.SaveFileNotification()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SaveFileNotification) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateRequest: + _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.TrackingPauseStateResponse: + _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateResponse) _oMessageValue).unpack() : null); + break; default: break; } _o.setMessage(_oMessage); diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java index 2fe65e9a..611330b5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -72,6 +72,8 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.AutoBoneStopRecordingRequestT asAutoBoneStopRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneStopRecordingRequestT) value; } public solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT asAutoBoneCancelRecordingRequest() { return (solarxr_protocol.rpc.AutoBoneCancelRecordingRequestT) value; } public solarxr_protocol.rpc.SaveFileNotificationT asSaveFileNotification() { return (solarxr_protocol.rpc.SaveFileNotificationT) value; } + public solarxr_protocol.rpc.TrackingPauseStateRequestT asTrackingPauseStateRequest() { return (solarxr_protocol.rpc.TrackingPauseStateRequestT) value; } + public solarxr_protocol.rpc.TrackingPauseStateResponseT asTrackingPauseStateResponse() { return (solarxr_protocol.rpc.TrackingPauseStateResponseT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { switch (_o.type) { @@ -126,6 +128,8 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.AutoBoneStopRecordingRequest: return solarxr_protocol.rpc.AutoBoneStopRecordingRequest.pack(builder, _o.asAutoBoneStopRecordingRequest()); case RpcMessage.AutoBoneCancelRecordingRequest: return solarxr_protocol.rpc.AutoBoneCancelRecordingRequest.pack(builder, _o.asAutoBoneCancelRecordingRequest()); case RpcMessage.SaveFileNotification: return solarxr_protocol.rpc.SaveFileNotification.pack(builder, _o.asSaveFileNotification()); + case RpcMessage.TrackingPauseStateRequest: return solarxr_protocol.rpc.TrackingPauseStateRequest.pack(builder, _o.asTrackingPauseStateRequest()); + case RpcMessage.TrackingPauseStateResponse: return solarxr_protocol.rpc.TrackingPauseStateResponse.pack(builder, _o.asTrackingPauseStateResponse()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java new file mode 100644 index 00000000..b50e1d44 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequest.java @@ -0,0 +1,47 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Requests the current state of tracking pause + */ +@SuppressWarnings("unused") +public final class TrackingPauseStateRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static TrackingPauseStateRequest getRootAsTrackingPauseStateRequest(ByteBuffer _bb) { return getRootAsTrackingPauseStateRequest(_bb, new TrackingPauseStateRequest()); } + public static TrackingPauseStateRequest getRootAsTrackingPauseStateRequest(ByteBuffer _bb, TrackingPauseStateRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public TrackingPauseStateRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startTrackingPauseStateRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endTrackingPauseStateRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public TrackingPauseStateRequest get(int j) { return get(new TrackingPauseStateRequest(), j); } + public TrackingPauseStateRequest get(TrackingPauseStateRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackingPauseStateRequestT unpack() { + TrackingPauseStateRequestT _o = new TrackingPauseStateRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackingPauseStateRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, TrackingPauseStateRequestT _o) { + if (_o == null) return 0; + startTrackingPauseStateRequest(builder); + return endTrackingPauseStateRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java new file mode 100644 index 00000000..c90894bf --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateRequestT.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackingPauseStateRequestT { + + + public TrackingPauseStateRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java new file mode 100644 index 00000000..c91ca8bd --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponse.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class TrackingPauseStateResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static TrackingPauseStateResponse getRootAsTrackingPauseStateResponse(ByteBuffer _bb) { return getRootAsTrackingPauseStateResponse(_bb, new TrackingPauseStateResponse()); } + public static TrackingPauseStateResponse getRootAsTrackingPauseStateResponse(ByteBuffer _bb, TrackingPauseStateResponse obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public TrackingPauseStateResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + */ + public boolean trackingPaused() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createTrackingPauseStateResponse(FlatBufferBuilder builder, + boolean trackingPaused) { + builder.startTable(1); + TrackingPauseStateResponse.addTrackingPaused(builder, trackingPaused); + return TrackingPauseStateResponse.endTrackingPauseStateResponse(builder); + } + + public static void startTrackingPauseStateResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTrackingPaused(FlatBufferBuilder builder, boolean trackingPaused) { builder.addBoolean(0, trackingPaused, false); } + public static int endTrackingPauseStateResponse(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public TrackingPauseStateResponse get(int j) { return get(new TrackingPauseStateResponse(), j); } + public TrackingPauseStateResponse get(TrackingPauseStateResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackingPauseStateResponseT unpack() { + TrackingPauseStateResponseT _o = new TrackingPauseStateResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackingPauseStateResponseT _o) { + boolean _oTrackingPaused = trackingPaused(); + _o.setTrackingPaused(_oTrackingPaused); + } + public static int pack(FlatBufferBuilder builder, TrackingPauseStateResponseT _o) { + if (_o == null) return 0; + return createTrackingPauseStateResponse( + builder, + _o.getTrackingPaused()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java new file mode 100644 index 00000000..2331b48d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/TrackingPauseStateResponseT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackingPauseStateResponseT { + private boolean trackingPaused; + + public boolean getTrackingPaused() { return trackingPaused; } + + public void setTrackingPaused(boolean trackingPaused) { this.trackingPaused = trackingPaused; } + + + public TrackingPauseStateResponseT() { + this.trackingPaused = false; + } +} + diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetMode.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetMode.kt deleted file mode 100644 index 6946dffa..00000000 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetMode.kt +++ /dev/null @@ -1,24 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class ArmsResetMode private constructor() { - companion object { - /** - * Upper arm going back and forearm going forward - */ - const val BACK: UByte = 0u - /** - * Arms going to the side - */ - const val TPOSE: UByte = 1u - /** - * Arms going forward - */ - const val FORWARD: UByte = 2u - val names : Array = arrayOf("BACK", "TPOSE", "FORWARD") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetType.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetType.kt deleted file mode 100644 index 1be8ab8d..00000000 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ArmsResetType.kt +++ /dev/null @@ -1,24 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc - -@Suppress("unused") -class ArmsResetType private constructor() { - companion object { - /** - * Upper arm going back and forearm going forward - */ - const val BACK: UByte = 0u - /** - * Arms going to the side - */ - const val TPOSE: UByte = 1u - /** - * Arms going forward - */ - const val FRONT: UByte = 2u - val names : Array = arrayOf("BACK", "TPOSE", "FRONT") - @JvmStatic - fun name(e: Int) : String = names[e] - } -} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt index db6f9881..3bb4af05 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -57,7 +57,9 @@ class RpcMessage private constructor() { const val AutoBoneStopRecordingRequest: UByte = 49u const val AutoBoneCancelRecordingRequest: UByte = 50u const val SaveFileNotification: UByte = 51u - val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification") + const val TrackingPauseStateRequest: UByte = 52u + const val TrackingPauseStateResponse: UByte = 53u + val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt new file mode 100644 index 00000000..f2aa5eb0 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateRequest.kt @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Requests the current state of tracking pause + */ +@Suppress("unused") +class TrackingPauseStateRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackingPauseStateRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackingPauseStateRequest(_bb: ByteBuffer): TrackingPauseStateRequest = getRootAsTrackingPauseStateRequest(_bb, TrackingPauseStateRequest()) + @JvmStatic + fun getRootAsTrackingPauseStateRequest(_bb: ByteBuffer, obj: TrackingPauseStateRequest): TrackingPauseStateRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startTrackingPauseStateRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endTrackingPauseStateRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt new file mode 100644 index 00000000..256c1a3d --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/TrackingPauseStateResponse.kt @@ -0,0 +1,53 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class TrackingPauseStateResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : TrackingPauseStateResponse { + __init(_i, _bb) + return this + } + /** + * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + */ + val trackingPaused : Boolean + get() { + val o = __offset(4) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsTrackingPauseStateResponse(_bb: ByteBuffer): TrackingPauseStateResponse = getRootAsTrackingPauseStateResponse(_bb, TrackingPauseStateResponse()) + @JvmStatic + fun getRootAsTrackingPauseStateResponse(_bb: ByteBuffer, obj: TrackingPauseStateResponse): TrackingPauseStateResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createTrackingPauseStateResponse(builder: FlatBufferBuilder, trackingPaused: Boolean) : Int { + builder.startTable(1) + addTrackingPaused(builder, trackingPaused) + return endTrackingPauseStateResponse(builder) + } + @JvmStatic + fun startTrackingPauseStateResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addTrackingPaused(builder: FlatBufferBuilder, trackingPaused: Boolean) = builder.addBoolean(0, trackingPaused, false) + @JvmStatic + fun endTrackingPauseStateResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 8c9d8f41..88c2392e 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -282,6 +282,10 @@ pub mod solarxr_protocol { pub use self::clear_mounting_reset_request_generated::*; mod save_file_notification_generated; pub use self::save_file_notification_generated::*; + mod tracking_pause_state_request_generated; + pub use self::tracking_pause_state_request_generated::*; + mod tracking_pause_state_response_generated; + pub use self::tracking_pause_state_response_generated::*; } // rpc mod message_bundle_generated; pub use self::message_bundle_generated::*; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_mode_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_mode_generated.rs deleted file mode 100644 index eb144962..00000000 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_mode_generated.rs +++ /dev/null @@ -1,103 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_ARMS_RESET_MODE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_ARMS_RESET_MODE: u8 = 2; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_ARMS_RESET_MODE: [ArmsResetMode; 3] = [ - ArmsResetMode::BACK, - ArmsResetMode::TPOSE, - ArmsResetMode::FORWARD, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ArmsResetMode(pub u8); -#[allow(non_upper_case_globals)] -impl ArmsResetMode { - /// Upper arm going back and forearm going forward - pub const BACK: Self = Self(0); - /// Arms going to the side - pub const TPOSE: Self = Self(1); - /// Arms going forward - pub const FORWARD: Self = Self(2); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 2; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::BACK, - Self::TPOSE, - Self::FORWARD, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::BACK => Some("BACK"), - Self::TPOSE => Some("TPOSE"), - Self::FORWARD => Some("FORWARD"), - _ => None, - } - } -} -impl core::fmt::Debug for ArmsResetMode { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - if let Some(name) = self.variant_name() { - f.write_str(name) - } else { - f.write_fmt(format_args!("", self.0)) - } - } -} -impl<'a> flatbuffers::Follow<'a> for ArmsResetMode { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ArmsResetMode { - type Output = ArmsResetMode; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ArmsResetMode { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ArmsResetMode { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - u8::run_verifier(v, pos) - } -} - -impl flatbuffers::SimpleToVerifyInSlice for ArmsResetMode {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_type_generated.rs deleted file mode 100644 index aebd191e..00000000 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/arms_reset_type_generated.rs +++ /dev/null @@ -1,103 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify -// @generated -extern crate alloc; -extern crate flatbuffers; -use alloc::boxed::Box; -use alloc::string::{String, ToString}; -use alloc::vec::Vec; -use core::mem; -use core::cmp::Ordering; -use self::flatbuffers::{EndianScalar, Follow}; -use super::*; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MIN_ARMS_RESET_TYPE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_ARMS_RESET_TYPE: u8 = 2; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_ARMS_RESET_TYPE: [ArmsResetType; 3] = [ - ArmsResetType::BACK, - ArmsResetType::TPOSE, - ArmsResetType::FRONT, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ArmsResetType(pub u8); -#[allow(non_upper_case_globals)] -impl ArmsResetType { - /// Upper arm going back and forearm going forward - pub const BACK: Self = Self(0); - /// Arms going to the side - pub const TPOSE: Self = Self(1); - /// Arms going forward - pub const FRONT: Self = Self(2); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 2; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::BACK, - Self::TPOSE, - Self::FRONT, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::BACK => Some("BACK"), - Self::TPOSE => Some("TPOSE"), - Self::FRONT => Some("FRONT"), - _ => None, - } - } -} -impl core::fmt::Debug for ArmsResetType { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - if let Some(name) = self.variant_name() { - f.write_str(name) - } else { - f.write_fmt(format_args!("", self.0)) - } - } -} -impl<'a> flatbuffers::Follow<'a> for ArmsResetType { - type Inner = Self; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = flatbuffers::read_scalar_at::(buf, loc); - Self(b) - } -} - -impl flatbuffers::Push for ArmsResetType { - type Output = ArmsResetType; - #[inline] - unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { - flatbuffers::emplace_scalar::(dst, self.0); - } -} - -impl flatbuffers::EndianScalar for ArmsResetType { - type Scalar = u8; - #[inline] - fn to_little_endian(self) -> u8 { - self.0.to_le() - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(v: u8) -> Self { - let b = u8::from_le(v); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ArmsResetType { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - u8::run_verifier(v, pos) - } -} - -impl flatbuffers::SimpleToVerifyInSlice for ArmsResetType {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs index 0cd73456..124e4569 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs @@ -12,10 +12,10 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_RPC_MESSAGE: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_RPC_MESSAGE: u8 = 51; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 53; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 52] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 54] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -68,6 +68,8 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 52] = [ RpcMessage::AutoBoneStopRecordingRequest, RpcMessage::AutoBoneCancelRecordingRequest, RpcMessage::SaveFileNotification, + RpcMessage::TrackingPauseStateRequest, + RpcMessage::TrackingPauseStateResponse, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -127,9 +129,11 @@ impl RpcMessage { pub const AutoBoneStopRecordingRequest: Self = Self(49); pub const AutoBoneCancelRecordingRequest: Self = Self(50); pub const SaveFileNotification: Self = Self(51); + pub const TrackingPauseStateRequest: Self = Self(52); + pub const TrackingPauseStateResponse: Self = Self(53); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 51; + pub const ENUM_MAX: u8 = 53; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -183,6 +187,8 @@ impl RpcMessage { Self::AutoBoneStopRecordingRequest, Self::AutoBoneCancelRecordingRequest, Self::SaveFileNotification, + Self::TrackingPauseStateRequest, + Self::TrackingPauseStateResponse, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -239,6 +245,8 @@ impl RpcMessage { Self::AutoBoneStopRecordingRequest => Some("AutoBoneStopRecordingRequest"), Self::AutoBoneCancelRecordingRequest => Some("AutoBoneCancelRecordingRequest"), Self::SaveFileNotification => Some("SaveFileNotification"), + Self::TrackingPauseStateRequest => Some("TrackingPauseStateRequest"), + Self::TrackingPauseStateResponse => Some("TrackingPauseStateResponse"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs index 5533a4df..e42236d1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs @@ -834,6 +834,36 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_tracking_pause_state_request(&self) -> Option> { + if self.message_type() == RpcMessage::TrackingPauseStateRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TrackingPauseStateRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_tracking_pause_state_response(&self) -> Option> { + if self.message_type() == RpcMessage::TrackingPauseStateResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { TrackingPauseStateResponse::init_from_table(t) } + }) + } else { + None + } + } + } impl flatbuffers::Verifiable for RpcMessageHeader<'_> { @@ -897,6 +927,8 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::AutoBoneStopRecordingRequest => v.verify_union_variant::>("RpcMessage::AutoBoneStopRecordingRequest", pos), RpcMessage::AutoBoneCancelRecordingRequest => v.verify_union_variant::>("RpcMessage::AutoBoneCancelRecordingRequest", pos), RpcMessage::SaveFileNotification => v.verify_union_variant::>("RpcMessage::SaveFileNotification", pos), + RpcMessage::TrackingPauseStateRequest => v.verify_union_variant::>("RpcMessage::TrackingPauseStateRequest", pos), + RpcMessage::TrackingPauseStateResponse => v.verify_union_variant::>("RpcMessage::TrackingPauseStateResponse", pos), _ => Ok(()), } })? @@ -1315,6 +1347,20 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::TrackingPauseStateRequest => { + if let Some(x) = self.message_as_tracking_pause_state_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::TrackingPauseStateResponse => { + if let Some(x) = self.message_as_tracking_pause_state_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, _ => { let x: Option<()> = None; ds.field("message", &x) diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs new file mode 100644 index 00000000..f1ba88e0 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_request_generated.rs @@ -0,0 +1,91 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackingPauseStateRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests the current state of tracking pause +pub struct TrackingPauseStateRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackingPauseStateRequest<'a> { + type Inner = TrackingPauseStateRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TrackingPauseStateRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackingPauseStateRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args TrackingPauseStateRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackingPauseStateRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for TrackingPauseStateRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .finish(); + Ok(()) + } +} +pub struct TrackingPauseStateRequestArgs { +} +impl<'a> Default for TrackingPauseStateRequestArgs { + #[inline] + fn default() -> Self { + TrackingPauseStateRequestArgs { + } + } +} + +pub struct TrackingPauseStateRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackingPauseStateRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackingPauseStateRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackingPauseStateRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for TrackingPauseStateRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TrackingPauseStateRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs new file mode 100644 index 00000000..210e6b35 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/tracking_pause_state_response_generated.rs @@ -0,0 +1,109 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackingPauseStateResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct TrackingPauseStateResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackingPauseStateResponse<'a> { + type Inner = TrackingPauseStateResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> TrackingPauseStateResponse<'a> { + pub const VT_TRACKINGPAUSED: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackingPauseStateResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TrackingPauseStateResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackingPauseStateResponseBuilder::new(_fbb); + builder.add_trackingPaused(args.trackingPaused); + builder.finish() + } + + + /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + #[inline] + pub fn trackingPaused(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(TrackingPauseStateResponse::VT_TRACKINGPAUSED, Some(false)).unwrap()} + } +} + +impl flatbuffers::Verifiable for TrackingPauseStateResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("trackingPaused", Self::VT_TRACKINGPAUSED, false)? + .finish(); + Ok(()) + } +} +pub struct TrackingPauseStateResponseArgs { + pub trackingPaused: bool, +} +impl<'a> Default for TrackingPauseStateResponseArgs { + #[inline] + fn default() -> Self { + TrackingPauseStateResponseArgs { + trackingPaused: false, + } + } +} + +pub struct TrackingPauseStateResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackingPauseStateResponseBuilder<'a, 'b> { + #[inline] + pub fn add_trackingPaused(&mut self, trackingPaused: bool) { + self.fbb_.push_slot::(TrackingPauseStateResponse::VT_TRACKINGPAUSED, trackingPaused, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackingPauseStateResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackingPauseStateResponseBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for TrackingPauseStateResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("TrackingPauseStateResponse"); + ds.field("trackingPaused", &self.trackingPaused()); + ds.finish() + } +} diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index 831f76bf..56b47a31 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -119,6 +119,8 @@ export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr-proto export { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from './solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; export { TapDetectionSettings, TapDetectionSettingsT } from './solarxr-protocol/rpc/tap-detection-settings.js'; export { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from './solarxr-protocol/rpc/tap-detection-setup-notification.js'; +export { TrackingPauseStateRequest, TrackingPauseStateRequestT } from './solarxr-protocol/rpc/tracking-pause-state-request.js'; +export { TrackingPauseStateResponse, TrackingPauseStateResponseT } from './solarxr-protocol/rpc/tracking-pause-state-response.js'; export { VMCOSCSettings, VMCOSCSettingsT } from './solarxr-protocol/rpc/vmcoscsettings.js'; export { VRCOSCSettings, VRCOSCSettingsT } from './solarxr-protocol/rpc/vrcoscsettings.js'; export { WifiProvisioningStatus } from './solarxr-protocol/rpc/wifi-provisioning-status.js'; diff --git a/protocol/typescript/src/solarxr-protocol/rpc/arms-reset-mode.ts b/protocol/typescript/src/solarxr-protocol/rpc/arms-reset-mode.ts deleted file mode 100644 index b7650080..00000000 --- a/protocol/typescript/src/solarxr-protocol/rpc/arms-reset-mode.ts +++ /dev/null @@ -1,18 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ArmsResetMode { - /** - * Upper arm going back and forearm going forward - */ - BACK = 0, - - /** - * Arms going to the side - */ - TPOSE = 1, - - /** - * Arms going forward - */ - FORWARD = 2 -} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/arms-reset-type.ts b/protocol/typescript/src/solarxr-protocol/rpc/arms-reset-type.ts deleted file mode 100644 index c5d41159..00000000 --- a/protocol/typescript/src/solarxr-protocol/rpc/arms-reset-type.ts +++ /dev/null @@ -1,18 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ArmsResetType { - /** - * Upper arm going back and forearm going forward - */ - BACK = 0, - - /** - * Arms going to the side - */ - TPOSE = 1, - - /** - * Arms going forward - */ - FRONT = 2 -} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts index 86fe4036..cb6e3253 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -54,6 +54,8 @@ import { StatusSystemResponse, StatusSystemResponseT } from '../../solarxr-proto import { StatusSystemUpdate, StatusSystemUpdateT } from '../../solarxr-protocol/rpc/status-system-update.js'; import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; +import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; +import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; @@ -151,7 +153,7 @@ export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|WifiProvisioningStatusResponseT|null = null + public message: AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|WifiProvisioningStatusResponseT|null = null ){} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts index 2f0bae7c..4384683f 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -50,6 +50,8 @@ import { StatusSystemResponse, StatusSystemResponseT } from '../../solarxr-proto import { StatusSystemUpdate, StatusSystemUpdateT } from '../../solarxr-protocol/rpc/status-system-update.js'; import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../../solarxr-protocol/rpc/stop-wifi-provisioning-request.js'; import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; +import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; +import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; @@ -105,13 +107,15 @@ export enum RpcMessage { AutoBoneApplyRequest = 48, AutoBoneStopRecordingRequest = 49, AutoBoneCancelRecordingRequest = 50, - SaveFileNotification = 51 + SaveFileNotification = 51, + TrackingPauseStateRequest = 52, + TrackingPauseStateResponse = 53 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|WifiProvisioningStatusResponse|null -): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|WifiProvisioningStatusResponse|null { + accessor: (obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null +): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -165,15 +169,17 @@ export function unionToRpcMessage( case 'AutoBoneStopRecordingRequest': return accessor(new AutoBoneStopRecordingRequest())! as AutoBoneStopRecordingRequest; case 'AutoBoneCancelRecordingRequest': return accessor(new AutoBoneCancelRecordingRequest())! as AutoBoneCancelRecordingRequest; case 'SaveFileNotification': return accessor(new SaveFileNotification())! as SaveFileNotification; + case 'TrackingPauseStateRequest': return accessor(new TrackingPauseStateRequest())! as TrackingPauseStateRequest; + case 'TrackingPauseStateResponse': return accessor(new TrackingPauseStateResponse())! as TrackingPauseStateResponse; default: return null; } } export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|WifiProvisioningStatusResponse|null, + accessor: (index: number, obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null, index: number -): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|WifiProvisioningStatusResponse|null { +): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -227,6 +233,8 @@ export function unionListToRpcMessage( case 'AutoBoneStopRecordingRequest': return accessor(index, new AutoBoneStopRecordingRequest())! as AutoBoneStopRecordingRequest; case 'AutoBoneCancelRecordingRequest': return accessor(index, new AutoBoneCancelRecordingRequest())! as AutoBoneCancelRecordingRequest; case 'SaveFileNotification': return accessor(index, new SaveFileNotification())! as SaveFileNotification; + case 'TrackingPauseStateRequest': return accessor(index, new TrackingPauseStateRequest())! as TrackingPauseStateRequest; + case 'TrackingPauseStateResponse': return accessor(index, new TrackingPauseStateResponse())! as TrackingPauseStateResponse; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts new file mode 100644 index 00000000..878ca53e --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-request.ts @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Requests the current state of tracking pause + */ +export class TrackingPauseStateRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):TrackingPauseStateRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackingPauseStateRequest(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateRequest):TrackingPauseStateRequest { + return (obj || new TrackingPauseStateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackingPauseStateRequest(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateRequest):TrackingPauseStateRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackingPauseStateRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startTrackingPauseStateRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endTrackingPauseStateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTrackingPauseStateRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + TrackingPauseStateRequest.startTrackingPauseStateRequest(builder); + return TrackingPauseStateRequest.endTrackingPauseStateRequest(builder); +} + +unpack(): TrackingPauseStateRequestT { + return new TrackingPauseStateRequestT(); +} + + +unpackTo(_o: TrackingPauseStateRequestT): void {} +} + +export class TrackingPauseStateRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackingPauseStateRequest.createTrackingPauseStateRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts new file mode 100644 index 00000000..6198eaf1 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/tracking-pause-state-response.ts @@ -0,0 +1,75 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class TrackingPauseStateResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):TrackingPauseStateResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackingPauseStateResponse(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateResponse):TrackingPauseStateResponse { + return (obj || new TrackingPauseStateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackingPauseStateResponse(bb:flatbuffers.ByteBuffer, obj?:TrackingPauseStateResponse):TrackingPauseStateResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackingPauseStateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + */ +trackingPaused():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startTrackingPauseStateResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addTrackingPaused(builder:flatbuffers.Builder, trackingPaused:boolean) { + builder.addFieldInt8(0, +trackingPaused, +false); +} + +static endTrackingPauseStateResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTrackingPauseStateResponse(builder:flatbuffers.Builder, trackingPaused:boolean):flatbuffers.Offset { + TrackingPauseStateResponse.startTrackingPauseStateResponse(builder); + TrackingPauseStateResponse.addTrackingPaused(builder, trackingPaused); + return TrackingPauseStateResponse.endTrackingPauseStateResponse(builder); +} + +unpack(): TrackingPauseStateResponseT { + return new TrackingPauseStateResponseT( + this.trackingPaused() + ); +} + + +unpackTo(_o: TrackingPauseStateResponseT): void { + _o.trackingPaused = this.trackingPaused(); +} +} + +export class TrackingPauseStateResponseT implements flatbuffers.IGeneratedObject { +constructor( + public trackingPaused: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackingPauseStateResponse.createTrackingPauseStateResponse(builder, + this.trackingPaused + ); +} +} diff --git a/schema/rpc.fbs b/schema/rpc.fbs index b122b89e..41135e5e 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -63,6 +63,8 @@ union RpcMessage { AutoBoneStopRecordingRequest, AutoBoneCancelRecordingRequest, SaveFileNotification, + TrackingPauseStateRequest, + TrackingPauseStateResponse, } table RpcMessageHeader { @@ -560,3 +562,11 @@ table SaveFileNotification { /// Recommended filename expected_filename: string; } + +/// Requests the current state of tracking pause +table TrackingPauseStateRequest {} + +table TrackingPauseStateResponse { + /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. + trackingPaused: bool; +} From 8910f60c6ae07c9c865e7eb50f9ed4c490b1e822 Mon Sep 17 00:00:00 2001 From: Uriel Date: Wed, 29 Nov 2023 18:31:21 -0300 Subject: [PATCH 2/6] add a timed out status (#128) --- .../solarxr_protocol/generated/all_generated.h | 13 ++++++++----- .../solarxr_protocol/datatypes/TrackerStatus.java | 3 ++- .../src/solarxr_protocol/datatypes/TrackerStatus.kt | 3 ++- .../datatypes/tracker_status_generated.rs | 10 +++++++--- .../solarxr-protocol/datatypes/tracker-status.ts | 3 ++- schema/datatypes/datatypes.fbs | 1 + 6 files changed, 22 insertions(+), 11 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 242addeb..2d477329 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -640,37 +640,40 @@ enum class TrackerStatus : uint8_t { BUSY = 3, ERROR = 4, OCCLUDED = 5, + TIMED_OUT = 6, MIN = NONE, - MAX = OCCLUDED + MAX = TIMED_OUT }; -inline const TrackerStatus (&EnumValuesTrackerStatus())[6] { +inline const TrackerStatus (&EnumValuesTrackerStatus())[7] { static const TrackerStatus values[] = { TrackerStatus::NONE, TrackerStatus::DISCONNECTED, TrackerStatus::OK, TrackerStatus::BUSY, TrackerStatus::ERROR, - TrackerStatus::OCCLUDED + TrackerStatus::OCCLUDED, + TrackerStatus::TIMED_OUT }; return values; } inline const char * const *EnumNamesTrackerStatus() { - static const char * const names[7] = { + static const char * const names[8] = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", + "TIMED_OUT", nullptr }; return names; } inline const char *EnumNameTrackerStatus(TrackerStatus e) { - if (flatbuffers::IsOutRange(e, TrackerStatus::NONE, TrackerStatus::OCCLUDED)) return ""; + if (flatbuffers::IsOutRange(e, TrackerStatus::NONE, TrackerStatus::TIMED_OUT)) return ""; const size_t index = static_cast(e); return EnumNamesTrackerStatus()[index]; } diff --git a/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java b/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java index 0babf123..6a7a778a 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java @@ -11,8 +11,9 @@ private TrackerStatus() { } public static final int BUSY = 3; public static final int ERROR = 4; public static final int OCCLUDED = 5; + public static final int TIMED_OUT = 6; - public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", }; + public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt index 85ff542a..dd5ed25a 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/TrackerStatus.kt @@ -11,7 +11,8 @@ class TrackerStatus private constructor() { const val BUSY: UByte = 3u const val ERROR: UByte = 4u const val OCCLUDED: UByte = 5u - val names : Array = arrayOf("NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED") + const val TIMEDOUT: UByte = 6u + val names : Array = arrayOf("NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", "TIMED_OUT") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs index 9d51c85a..5ca956de 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs @@ -12,16 +12,17 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_TRACKER_STATUS: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_TRACKER_STATUS: u8 = 5; +pub const ENUM_MAX_TRACKER_STATUS: u8 = 6; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_TRACKER_STATUS: [TrackerStatus; 6] = [ +pub const ENUM_VALUES_TRACKER_STATUS: [TrackerStatus; 7] = [ TrackerStatus::NONE, TrackerStatus::DISCONNECTED, TrackerStatus::OK, TrackerStatus::BUSY, TrackerStatus::ERROR, TrackerStatus::OCCLUDED, + TrackerStatus::TIMED_OUT, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -35,9 +36,10 @@ impl TrackerStatus { pub const BUSY: Self = Self(3); pub const ERROR: Self = Self(4); pub const OCCLUDED: Self = Self(5); + pub const TIMED_OUT: Self = Self(6); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 5; + pub const ENUM_MAX: u8 = 6; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::DISCONNECTED, @@ -45,6 +47,7 @@ impl TrackerStatus { Self::BUSY, Self::ERROR, Self::OCCLUDED, + Self::TIMED_OUT, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -55,6 +58,7 @@ impl TrackerStatus { Self::BUSY => Some("BUSY"), Self::ERROR => Some("ERROR"), Self::OCCLUDED => Some("OCCLUDED"), + Self::TIMED_OUT => Some("TIMED_OUT"), _ => None, } } diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts index f2731313..a283b659 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts @@ -6,5 +6,6 @@ export enum TrackerStatus { OK = 2, BUSY = 3, ERROR = 4, - OCCLUDED = 5 + OCCLUDED = 5, + TIMED_OUT = 6 } diff --git a/schema/datatypes/datatypes.fbs b/schema/datatypes/datatypes.fbs index 0c50bf4b..189252d9 100644 --- a/schema/datatypes/datatypes.fbs +++ b/schema/datatypes/datatypes.fbs @@ -125,6 +125,7 @@ enum TrackerStatus: uint8 { BUSY = 3, ERROR = 4, OCCLUDED = 5, + TIMED_OUT = 6, } /// Temperature in degrees celsius From 2aa159288c3049ccafeaf779f7d9b53b5a8caed9 Mon Sep 17 00:00:00 2001 From: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Sun, 28 Jan 2024 22:57:15 +0100 Subject: [PATCH 3/6] Update FirmwareConstants (#130) --- .../generated/all_generated.h | 56 ++++++++++++------- .../datatypes/hardware_info/ImuType.java | 3 +- .../datatypes/hardware_info/McuType.java | 10 ++-- .../datatypes/hardware_info/ImuType.kt | 3 +- .../datatypes/hardware_info/McuType.kt | 9 ++- .../hardware_info/imu_type_generated.rs | 10 +++- .../hardware_info/mcu_type_generated.rs | 30 +++++++++- .../datatypes/hardware-info/imu-type.ts | 3 +- .../datatypes/hardware-info/mcu-type.ts | 8 ++- schema/datatypes/hardware_info.fbs | 7 +++ 10 files changed, 101 insertions(+), 38 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 2d477329..1e7e1371 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -684,33 +684,44 @@ enum class McuType : uint16_t { Other = 0, ESP8266 = 1, ESP32 = 2, + OWOTRACK_ANDROID = 3, + WRANGLER = 4, + OWOTRACK_IOS = 5, + ESP32_C3 = 6, + MOCOPI = 7, + DEV_RESERVED = 250, MIN = Other, - MAX = ESP32 + MAX = DEV_RESERVED }; -inline const McuType (&EnumValuesMcuType())[3] { +inline const McuType (&EnumValuesMcuType())[9] { static const McuType values[] = { McuType::Other, McuType::ESP8266, - McuType::ESP32 + McuType::ESP32, + McuType::OWOTRACK_ANDROID, + McuType::WRANGLER, + McuType::OWOTRACK_IOS, + McuType::ESP32_C3, + McuType::MOCOPI, + McuType::DEV_RESERVED }; return values; } -inline const char * const *EnumNamesMcuType() { - static const char * const names[4] = { - "Other", - "ESP8266", - "ESP32", - nullptr - }; - return names; -} - inline const char *EnumNameMcuType(McuType e) { - if (flatbuffers::IsOutRange(e, McuType::Other, McuType::ESP32)) return ""; - const size_t index = static_cast(e); - return EnumNamesMcuType()[index]; + switch (e) { + case McuType::Other: return "Other"; + case McuType::ESP8266: return "ESP8266"; + case McuType::ESP32: return "ESP32"; + case McuType::OWOTRACK_ANDROID: return "OWOTRACK_ANDROID"; + case McuType::WRANGLER: return "WRANGLER"; + case McuType::OWOTRACK_IOS: return "OWOTRACK_IOS"; + case McuType::ESP32_C3: return "ESP32_C3"; + case McuType::MOCOPI: return "MOCOPI"; + case McuType::DEV_RESERVED: return "DEV_RESERVED"; + default: return ""; + } } enum class ImuType : uint16_t { @@ -724,11 +735,12 @@ enum class ImuType : uint16_t { BNO086 = 7, BMI160 = 8, ICM20948 = 9, + ICM42688 = 10, MIN = Other, - MAX = ICM20948 + MAX = ICM42688 }; -inline const ImuType (&EnumValuesImuType())[10] { +inline const ImuType (&EnumValuesImuType())[11] { static const ImuType values[] = { ImuType::Other, ImuType::MPU9250, @@ -739,13 +751,14 @@ inline const ImuType (&EnumValuesImuType())[10] { ImuType::MPU6050, ImuType::BNO086, ImuType::BMI160, - ImuType::ICM20948 + ImuType::ICM20948, + ImuType::ICM42688 }; return values; } inline const char * const *EnumNamesImuType() { - static const char * const names[11] = { + static const char * const names[12] = { "Other", "MPU9250", "MPU6500", @@ -756,13 +769,14 @@ inline const char * const *EnumNamesImuType() { "BNO086", "BMI160", "ICM20948", + "ICM42688", nullptr }; return names; } inline const char *EnumNameImuType(ImuType e) { - if (flatbuffers::IsOutRange(e, ImuType::Other, ImuType::ICM20948)) return ""; + if (flatbuffers::IsOutRange(e, ImuType::Other, ImuType::ICM42688)) return ""; const size_t index = static_cast(e); return EnumNamesImuType()[index]; } diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java index 5f973ab7..1cab55ee 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java @@ -15,8 +15,9 @@ private ImuType() { } public static final int BNO086 = 7; public static final int BMI160 = 8; public static final int ICM20948 = 9; + public static final int ICM42688 = 10; - public static final String[] names = { "Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", }; + public static final String[] names = { "Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java index dd52b8d6..dc81d5ce 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java @@ -8,9 +8,11 @@ private McuType() { } public static final int Other = 0; public static final int ESP8266 = 1; public static final int ESP32 = 2; - - public static final String[] names = { "Other", "ESP8266", "ESP32", }; - - public static String name(int e) { return names[e]; } + public static final int OWOTRACK_ANDROID = 3; + public static final int WRANGLER = 4; + public static final int OWOTRACK_IOS = 5; + public static final int ESP32_C3 = 6; + public static final int MOCOPI = 7; + public static final int DEV_RESERVED = 250; } diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt index b2171f31..e91a2d3b 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/ImuType.kt @@ -15,7 +15,8 @@ class ImuType private constructor() { const val BNO086: UShort = 7u const val BMI160: UShort = 8u const val ICM20948: UShort = 9u - val names : Array = arrayOf("Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948") + const val ICM42688: UShort = 10u + val names : Array = arrayOf("Other", "MPU9250", "MPU6500", "BNO080", "BNO085", "BNO055", "MPU6050", "BNO086", "BMI160", "ICM20948", "ICM42688") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt index bf64aec8..a74adde1 100644 --- a/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt +++ b/protocol/kotlin/src/solarxr_protocol/datatypes/hardware_info/McuType.kt @@ -8,8 +8,11 @@ class McuType private constructor() { const val Other: UShort = 0u const val ESP8266: UShort = 1u const val ESP32: UShort = 2u - val names : Array = arrayOf("Other", "ESP8266", "ESP32") - @JvmStatic - fun name(e: Int) : String = names[e] + const val OWOTRACKANDROID: UShort = 3u + const val WRANGLER: UShort = 4u + const val OWOTRACKIOS: UShort = 5u + const val ESP32C3: UShort = 6u + const val MOCOPI: UShort = 7u + const val DEVRESERVED: UShort = 250u } } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs index a9538df4..2a93f9a7 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs @@ -12,10 +12,10 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_IMU_TYPE: u16 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_IMU_TYPE: u16 = 9; +pub const ENUM_MAX_IMU_TYPE: u16 = 10; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_IMU_TYPE: [ImuType; 10] = [ +pub const ENUM_VALUES_IMU_TYPE: [ImuType; 11] = [ ImuType::Other, ImuType::MPU9250, ImuType::MPU6500, @@ -26,6 +26,7 @@ pub const ENUM_VALUES_IMU_TYPE: [ImuType; 10] = [ ImuType::BNO086, ImuType::BMI160, ImuType::ICM20948, + ImuType::ICM42688, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -43,9 +44,10 @@ impl ImuType { pub const BNO086: Self = Self(7); pub const BMI160: Self = Self(8); pub const ICM20948: Self = Self(9); + pub const ICM42688: Self = Self(10); pub const ENUM_MIN: u16 = 0; - pub const ENUM_MAX: u16 = 9; + pub const ENUM_MAX: u16 = 10; pub const ENUM_VALUES: &'static [Self] = &[ Self::Other, Self::MPU9250, @@ -57,6 +59,7 @@ impl ImuType { Self::BNO086, Self::BMI160, Self::ICM20948, + Self::ICM42688, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -71,6 +74,7 @@ impl ImuType { Self::BNO086 => Some("BNO086"), Self::BMI160 => Some("BMI160"), Self::ICM20948 => Some("ICM20948"), + Self::ICM42688 => Some("ICM42688"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs index 48a73d20..97a66c8d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs @@ -12,13 +12,19 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_MCU_TYPE: u16 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_MCU_TYPE: u16 = 2; +pub const ENUM_MAX_MCU_TYPE: u16 = 250; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_MCU_TYPE: [McuType; 3] = [ +pub const ENUM_VALUES_MCU_TYPE: [McuType; 9] = [ McuType::Other, McuType::ESP8266, McuType::ESP32, + McuType::OWOTRACK_ANDROID, + McuType::WRANGLER, + McuType::OWOTRACK_IOS, + McuType::ESP32_C3, + McuType::MOCOPI, + McuType::DEV_RESERVED, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -29,13 +35,25 @@ impl McuType { pub const Other: Self = Self(0); pub const ESP8266: Self = Self(1); pub const ESP32: Self = Self(2); + pub const OWOTRACK_ANDROID: Self = Self(3); + pub const WRANGLER: Self = Self(4); + pub const OWOTRACK_IOS: Self = Self(5); + pub const ESP32_C3: Self = Self(6); + pub const MOCOPI: Self = Self(7); + pub const DEV_RESERVED: Self = Self(250); pub const ENUM_MIN: u16 = 0; - pub const ENUM_MAX: u16 = 2; + pub const ENUM_MAX: u16 = 250; pub const ENUM_VALUES: &'static [Self] = &[ Self::Other, Self::ESP8266, Self::ESP32, + Self::OWOTRACK_ANDROID, + Self::WRANGLER, + Self::OWOTRACK_IOS, + Self::ESP32_C3, + Self::MOCOPI, + Self::DEV_RESERVED, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -43,6 +61,12 @@ impl McuType { Self::Other => Some("Other"), Self::ESP8266 => Some("ESP8266"), Self::ESP32 => Some("ESP32"), + Self::OWOTRACK_ANDROID => Some("OWOTRACK_ANDROID"), + Self::WRANGLER => Some("WRANGLER"), + Self::OWOTRACK_IOS => Some("OWOTRACK_IOS"), + Self::ESP32_C3 => Some("ESP32_C3"), + Self::MOCOPI => Some("MOCOPI"), + Self::DEV_RESERVED => Some("DEV_RESERVED"), _ => None, } } diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts index 949b6b20..0581c8e2 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts @@ -10,5 +10,6 @@ export enum ImuType { MPU6050 = 6, BNO086 = 7, BMI160 = 8, - ICM20948 = 9 + ICM20948 = 9, + ICM42688 = 10 } diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts index c37da4a4..c2b60003 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts @@ -3,5 +3,11 @@ export enum McuType { Other = 0, ESP8266 = 1, - ESP32 = 2 + ESP32 = 2, + OWOTRACK_ANDROID = 3, + WRANGLER = 4, + OWOTRACK_IOS = 5, + ESP32_C3 = 6, + MOCOPI = 7, + DEV_RESERVED = 250 } diff --git a/schema/datatypes/hardware_info.fbs b/schema/datatypes/hardware_info.fbs index f65cefe4..ee6bb81f 100644 --- a/schema/datatypes/hardware_info.fbs +++ b/schema/datatypes/hardware_info.fbs @@ -9,6 +9,12 @@ enum McuType: uint16 { Other = 0, ESP8266, ESP32, + OWOTRACK_ANDROID, + WRANGLER, + OWOTRACK_IOS, + ESP32_C3, + MOCOPI, + DEV_RESERVED = 250, } enum ImuType: uint16 { @@ -22,6 +28,7 @@ enum ImuType: uint16 { BNO086, BMI160, ICM20948, + ICM42688, } From 42017052a74fe01e52c7f303767ad8a2055d171d Mon Sep 17 00:00:00 2001 From: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Fri, 16 Feb 2024 01:25:18 +0100 Subject: [PATCH 4/6] Add Serial WiFiScan (#131) --- .../generated/all_generated.h | 61 ++++++++++++- .../src/solarxr_protocol/rpc/RpcMessage.java | 3 +- .../rpc/RpcMessageHeader.java | 4 + .../solarxr_protocol/rpc/RpcMessageUnion.java | 2 + .../rpc/SerialTrackerGetWifiScanRequest.java | 47 ++++++++++ .../rpc/SerialTrackerGetWifiScanRequestT.java | 16 ++++ .../src/solarxr_protocol/rpc/RpcMessage.kt | 3 +- .../rpc/SerialTrackerGetWifiScanRequest.kt | 40 ++++++++ protocol/rust/src/generated/mod.rs | 2 + .../rpc/rpc_message_generated.rs | 10 +- .../rpc/rpc_message_header_generated.rs | 23 +++++ ...tracker_get_wifi_scan_request_generated.rs | 91 +++++++++++++++++++ protocol/typescript/src/all_generated.ts | 1 + .../rpc/rpc-message-header.ts | 3 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 14 ++- .../serial-tracker-get-wifi-scan-request.ts | 57 ++++++++++++ schema/rpc.fbs | 4 + 17 files changed, 365 insertions(+), 16 deletions(-) create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 1e7e1371..a46ed688 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -336,6 +336,9 @@ struct TrackingPauseStateRequestBuilder; struct TrackingPauseStateResponse; struct TrackingPauseStateResponseBuilder; +struct SerialTrackerGetWifiScanRequest; +struct SerialTrackerGetWifiScanRequestBuilder; + } // namespace rpc namespace pub_sub { @@ -907,11 +910,12 @@ enum class RpcMessage : uint8_t { SaveFileNotification = 51, TrackingPauseStateRequest = 52, TrackingPauseStateResponse = 53, + SerialTrackerGetWifiScanRequest = 54, MIN = NONE, - MAX = TrackingPauseStateResponse + MAX = SerialTrackerGetWifiScanRequest }; -inline const RpcMessage (&EnumValuesRpcMessage())[54] { +inline const RpcMessage (&EnumValuesRpcMessage())[55] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -966,13 +970,14 @@ inline const RpcMessage (&EnumValuesRpcMessage())[54] { RpcMessage::AutoBoneCancelRecordingRequest, RpcMessage::SaveFileNotification, RpcMessage::TrackingPauseStateRequest, - RpcMessage::TrackingPauseStateResponse + RpcMessage::TrackingPauseStateResponse, + RpcMessage::SerialTrackerGetWifiScanRequest }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[55] = { + static const char * const names[56] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -1027,13 +1032,14 @@ inline const char * const *EnumNamesRpcMessage() { "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", + "SerialTrackerGetWifiScanRequest", nullptr }; return names; } inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::TrackingPauseStateResponse)) return ""; + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::SerialTrackerGetWifiScanRequest)) return ""; const size_t index = static_cast(e); return EnumNamesRpcMessage()[index]; } @@ -1254,6 +1260,10 @@ template<> struct RpcMessageTraits struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerGetWifiScanRequest; +}; + bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); @@ -4239,6 +4249,9 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::TrackingPauseStateResponse *message_as_TrackingPauseStateResponse() const { return message_type() == solarxr_protocol::rpc::RpcMessage::TrackingPauseStateResponse ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *message_as_SerialTrackerGetWifiScanRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetWifiScanRequest ? static_cast(message()) : nullptr; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TX_ID, 4) && @@ -4461,6 +4474,10 @@ template<> inline const solarxr_protocol::rpc::TrackingPauseStateResponse *RpcMe return message_as_TrackingPauseStateResponse(); } +template<> inline const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerGetWifiScanRequest(); +} + struct RpcMessageHeaderBuilder { typedef RpcMessageHeader Table; flatbuffers::FlatBufferBuilder &fbb_; @@ -8534,6 +8551,36 @@ inline flatbuffers::Offset CreateTrackingPauseStateR return builder_.Finish(); } +/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor +struct SerialTrackerGetWifiScanRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerGetWifiScanRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerGetWifiScanRequestBuilder { + typedef SerialTrackerGetWifiScanRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerGetWifiScanRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateSerialTrackerGetWifiScanRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerGetWifiScanRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + } // namespace rpc namespace pub_sub { @@ -9471,6 +9518,10 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::SerialTrackerGetWifiScanRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } default: return true; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index adabb0ed..fe9f2ba1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -59,8 +59,9 @@ private RpcMessage() { } public static final byte SaveFileNotification = 51; public static final byte TrackingPauseStateRequest = 52; public static final byte TrackingPauseStateResponse = 53; + public static final byte SerialTrackerGetWifiScanRequest = 54; - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", }; + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java index df0b46a6..99f7e1d0 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -264,6 +264,10 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.TrackingPauseStateResponse()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.TrackingPauseStateResponse) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetWifiScanRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest) _oMessageValue).unpack() : null); + break; default: break; } _o.setMessage(_oMessage); diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java index 611330b5..22e7346c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -74,6 +74,7 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.SaveFileNotificationT asSaveFileNotification() { return (solarxr_protocol.rpc.SaveFileNotificationT) value; } public solarxr_protocol.rpc.TrackingPauseStateRequestT asTrackingPauseStateRequest() { return (solarxr_protocol.rpc.TrackingPauseStateRequestT) value; } public solarxr_protocol.rpc.TrackingPauseStateResponseT asTrackingPauseStateResponse() { return (solarxr_protocol.rpc.TrackingPauseStateResponseT) value; } + public solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT asSerialTrackerGetWifiScanRequest() { return (solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { switch (_o.type) { @@ -130,6 +131,7 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.SaveFileNotification: return solarxr_protocol.rpc.SaveFileNotification.pack(builder, _o.asSaveFileNotification()); case RpcMessage.TrackingPauseStateRequest: return solarxr_protocol.rpc.TrackingPauseStateRequest.pack(builder, _o.asTrackingPauseStateRequest()); case RpcMessage.TrackingPauseStateResponse: return solarxr_protocol.rpc.TrackingPauseStateResponse.pack(builder, _o.asTrackingPauseStateResponse()); + case RpcMessage.SerialTrackerGetWifiScanRequest: return solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest.pack(builder, _o.asSerialTrackerGetWifiScanRequest()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.java new file mode 100644 index 00000000..40c5341e --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.java @@ -0,0 +1,47 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor + */ +@SuppressWarnings("unused") +public final class SerialTrackerGetWifiScanRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static SerialTrackerGetWifiScanRequest getRootAsSerialTrackerGetWifiScanRequest(ByteBuffer _bb) { return getRootAsSerialTrackerGetWifiScanRequest(_bb, new SerialTrackerGetWifiScanRequest()); } + public static SerialTrackerGetWifiScanRequest getRootAsSerialTrackerGetWifiScanRequest(ByteBuffer _bb, SerialTrackerGetWifiScanRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public SerialTrackerGetWifiScanRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSerialTrackerGetWifiScanRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSerialTrackerGetWifiScanRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public SerialTrackerGetWifiScanRequest get(int j) { return get(new SerialTrackerGetWifiScanRequest(), j); } + public SerialTrackerGetWifiScanRequest get(SerialTrackerGetWifiScanRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialTrackerGetWifiScanRequestT unpack() { + SerialTrackerGetWifiScanRequestT _o = new SerialTrackerGetWifiScanRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialTrackerGetWifiScanRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SerialTrackerGetWifiScanRequestT _o) { + if (_o == null) return 0; + startSerialTrackerGetWifiScanRequest(builder); + return endSerialTrackerGetWifiScanRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java new file mode 100644 index 00000000..e4202f0c --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequestT.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class SerialTrackerGetWifiScanRequestT { + + + public SerialTrackerGetWifiScanRequestT() { + } +} + diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt index 3bb4af05..aae3c8a8 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -59,7 +59,8 @@ class RpcMessage private constructor() { const val SaveFileNotification: UByte = 51u const val TrackingPauseStateRequest: UByte = 52u const val TrackingPauseStateResponse: UByte = 53u - val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse") + const val SerialTrackerGetWifiScanRequest: UByte = 54u + val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt new file mode 100644 index 00000000..b776857c --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SerialTrackerGetWifiScanRequest.kt @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor + */ +@Suppress("unused") +class SerialTrackerGetWifiScanRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : SerialTrackerGetWifiScanRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsSerialTrackerGetWifiScanRequest(_bb: ByteBuffer): SerialTrackerGetWifiScanRequest = getRootAsSerialTrackerGetWifiScanRequest(_bb, SerialTrackerGetWifiScanRequest()) + @JvmStatic + fun getRootAsSerialTrackerGetWifiScanRequest(_bb: ByteBuffer, obj: SerialTrackerGetWifiScanRequest): SerialTrackerGetWifiScanRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startSerialTrackerGetWifiScanRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endSerialTrackerGetWifiScanRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 88c2392e..da0647f0 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -286,6 +286,8 @@ pub mod solarxr_protocol { pub use self::tracking_pause_state_request_generated::*; mod tracking_pause_state_response_generated; pub use self::tracking_pause_state_response_generated::*; + mod serial_tracker_get_wifi_scan_request_generated; + pub use self::serial_tracker_get_wifi_scan_request_generated::*; } // rpc mod message_bundle_generated; pub use self::message_bundle_generated::*; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs index 124e4569..5be87077 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs @@ -12,10 +12,10 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_RPC_MESSAGE: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_RPC_MESSAGE: u8 = 53; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 54; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 54] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 55] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -70,6 +70,7 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 54] = [ RpcMessage::SaveFileNotification, RpcMessage::TrackingPauseStateRequest, RpcMessage::TrackingPauseStateResponse, + RpcMessage::SerialTrackerGetWifiScanRequest, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -131,9 +132,10 @@ impl RpcMessage { pub const SaveFileNotification: Self = Self(51); pub const TrackingPauseStateRequest: Self = Self(52); pub const TrackingPauseStateResponse: Self = Self(53); + pub const SerialTrackerGetWifiScanRequest: Self = Self(54); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 53; + pub const ENUM_MAX: u8 = 54; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -189,6 +191,7 @@ impl RpcMessage { Self::SaveFileNotification, Self::TrackingPauseStateRequest, Self::TrackingPauseStateResponse, + Self::SerialTrackerGetWifiScanRequest, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -247,6 +250,7 @@ impl RpcMessage { Self::SaveFileNotification => Some("SaveFileNotification"), Self::TrackingPauseStateRequest => Some("TrackingPauseStateRequest"), Self::TrackingPauseStateResponse => Some("TrackingPauseStateResponse"), + Self::SerialTrackerGetWifiScanRequest => Some("SerialTrackerGetWifiScanRequest"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs index e42236d1..0ccd228d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs @@ -864,6 +864,21 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_get_wifi_scan_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerGetWifiScanRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { SerialTrackerGetWifiScanRequest::init_from_table(t) } + }) + } else { + None + } + } + } impl flatbuffers::Verifiable for RpcMessageHeader<'_> { @@ -929,6 +944,7 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::SaveFileNotification => v.verify_union_variant::>("RpcMessage::SaveFileNotification", pos), RpcMessage::TrackingPauseStateRequest => v.verify_union_variant::>("RpcMessage::TrackingPauseStateRequest", pos), RpcMessage::TrackingPauseStateResponse => v.verify_union_variant::>("RpcMessage::TrackingPauseStateResponse", pos), + RpcMessage::SerialTrackerGetWifiScanRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetWifiScanRequest", pos), _ => Ok(()), } })? @@ -1361,6 +1377,13 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::SerialTrackerGetWifiScanRequest => { + if let Some(x) = self.message_as_serial_tracker_get_wifi_scan_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, _ => { let x: Option<()> = None; ds.field("message", &x) diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs new file mode 100644 index 00000000..044b54d2 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_wifi_scan_request_generated.rs @@ -0,0 +1,91 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialTrackerGetWifiScanRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor +pub struct SerialTrackerGetWifiScanRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialTrackerGetWifiScanRequest<'a> { + type Inner = SerialTrackerGetWifiScanRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> SerialTrackerGetWifiScanRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialTrackerGetWifiScanRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SerialTrackerGetWifiScanRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialTrackerGetWifiScanRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SerialTrackerGetWifiScanRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .finish(); + Ok(()) + } +} +pub struct SerialTrackerGetWifiScanRequestArgs { +} +impl<'a> Default for SerialTrackerGetWifiScanRequestArgs { + #[inline] + fn default() -> Self { + SerialTrackerGetWifiScanRequestArgs { + } + } +} + +pub struct SerialTrackerGetWifiScanRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialTrackerGetWifiScanRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialTrackerGetWifiScanRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialTrackerGetWifiScanRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for SerialTrackerGetWifiScanRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialTrackerGetWifiScanRequest"); + ds.finish() + } +} diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index 56b47a31..f2ddb4cf 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -92,6 +92,7 @@ export { SerialDevicesRequest, SerialDevicesRequestT } from './solarxr-protocol/ export { SerialDevicesResponse, SerialDevicesResponseT } from './solarxr-protocol/rpc/serial-devices-response.js'; export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr-protocol/rpc/serial-tracker-get-info-request.js'; +export { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from './solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr-protocol/rpc/serial-tracker-reboot-request.js'; export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr-protocol/rpc/serial-update-response.js'; export { ServerInfosRequest, ServerInfosRequestT } from './solarxr-protocol/rpc/server-infos-request.js'; diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts index cb6e3253..22db8f34 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -36,6 +36,7 @@ import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-proto import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request.js'; +import { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request.js'; import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response.js'; import { ServerInfosRequest, ServerInfosRequestT } from '../../solarxr-protocol/rpc/server-infos-request.js'; @@ -153,7 +154,7 @@ export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|WifiProvisioningStatusResponseT|null = null + public message: AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|WifiProvisioningStatusResponseT|null = null ){} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts index 4384683f..a661b2f8 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -32,6 +32,7 @@ import { SerialDevicesRequest, SerialDevicesRequestT } from '../../solarxr-proto import { SerialDevicesResponse, SerialDevicesResponseT } from '../../solarxr-protocol/rpc/serial-devices-response.js'; import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request.js'; import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request.js'; +import { SerialTrackerGetWifiScanRequest, SerialTrackerGetWifiScanRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.js'; import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request.js'; import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response.js'; import { ServerInfosRequest, ServerInfosRequestT } from '../../solarxr-protocol/rpc/server-infos-request.js'; @@ -109,13 +110,14 @@ export enum RpcMessage { AutoBoneCancelRecordingRequest = 50, SaveFileNotification = 51, TrackingPauseStateRequest = 52, - TrackingPauseStateResponse = 53 + TrackingPauseStateResponse = 53, + SerialTrackerGetWifiScanRequest = 54 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null -): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { + accessor: (obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null +): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -171,15 +173,16 @@ export function unionToRpcMessage( case 'SaveFileNotification': return accessor(new SaveFileNotification())! as SaveFileNotification; case 'TrackingPauseStateRequest': return accessor(new TrackingPauseStateRequest())! as TrackingPauseStateRequest; case 'TrackingPauseStateResponse': return accessor(new TrackingPauseStateResponse())! as TrackingPauseStateResponse; + case 'SerialTrackerGetWifiScanRequest': return accessor(new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; default: return null; } } export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null, + accessor: (index: number, obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null, index: number -): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { +): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -235,6 +238,7 @@ export function unionListToRpcMessage( case 'SaveFileNotification': return accessor(index, new SaveFileNotification())! as SaveFileNotification; case 'TrackingPauseStateRequest': return accessor(index, new TrackingPauseStateRequest())! as TrackingPauseStateRequest; case 'TrackingPauseStateResponse': return accessor(index, new TrackingPauseStateResponse())! as TrackingPauseStateResponse; + case 'SerialTrackerGetWifiScanRequest': return accessor(index, new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts new file mode 100644 index 00000000..f9e1775d --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-wifi-scan-request.ts @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Sends the GET WIFISCAN cmd to the current tracker on the serial monitor + */ +export class SerialTrackerGetWifiScanRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):SerialTrackerGetWifiScanRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialTrackerGetWifiScanRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetWifiScanRequest):SerialTrackerGetWifiScanRequest { + return (obj || new SerialTrackerGetWifiScanRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialTrackerGetWifiScanRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetWifiScanRequest):SerialTrackerGetWifiScanRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialTrackerGetWifiScanRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialTrackerGetWifiScanRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SerialTrackerGetWifiScanRequest.startSerialTrackerGetWifiScanRequest(builder); + return SerialTrackerGetWifiScanRequest.endSerialTrackerGetWifiScanRequest(builder); +} + +unpack(): SerialTrackerGetWifiScanRequestT { + return new SerialTrackerGetWifiScanRequestT(); +} + + +unpackTo(_o: SerialTrackerGetWifiScanRequestT): void {} +} + +export class SerialTrackerGetWifiScanRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerGetWifiScanRequest.createSerialTrackerGetWifiScanRequest(builder); +} +} diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 41135e5e..61d8a72d 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -65,6 +65,7 @@ union RpcMessage { SaveFileNotification, TrackingPauseStateRequest, TrackingPauseStateResponse, + SerialTrackerGetWifiScanRequest, } table RpcMessageHeader { @@ -570,3 +571,6 @@ table TrackingPauseStateResponse { /// Skeleton tracking is paused if true, skeleton tracking is unpaused if false. trackingPaused: bool; } + +/// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor +table SerialTrackerGetWifiScanRequest {} From 0bcd19c0b32c4249f082cb610a4141142c493133 Mon Sep 17 00:00:00 2001 From: Uriel Date: Tue, 5 Mar 2024 18:04:22 -0300 Subject: [PATCH 5/6] Add known devices support (#127) * add unknown devices for multiserver * generate flatbuffer * add to enum * add a way to forget devices * add to enum rpc --- .../generated/all_generated.h | 229 +++++++++++++++++- .../rpc/AddUnknownDeviceRequest.java | 59 +++++ .../rpc/AddUnknownDeviceRequestT.java | 22 ++ .../rpc/ForgetDeviceRequest.java | 59 +++++ .../rpc/ForgetDeviceRequestT.java | 22 ++ .../src/solarxr_protocol/rpc/RpcMessage.java | 5 +- .../rpc/RpcMessageHeader.java | 12 + .../solarxr_protocol/rpc/RpcMessageUnion.java | 6 + .../UnknownDeviceHandshakeNotification.java | 64 +++++ .../UnknownDeviceHandshakeNotificationT.java | 22 ++ .../rpc/AddUnknownDeviceRequest.kt | 52 ++++ .../rpc/ForgetDeviceRequest.kt | 52 ++++ .../src/solarxr_protocol/rpc/RpcMessage.kt | 5 +- .../rpc/UnknownDeviceHandshakeNotification.kt | 57 +++++ protocol/rust/src/generated/mod.rs | 6 + .../add_unknown_device_request_generated.rs | 108 +++++++++ .../rpc/forget_device_request_generated.rs | 108 +++++++++ .../rpc/rpc_message_generated.rs | 18 +- .../rpc/rpc_message_header_generated.rs | 69 ++++++ ...device_handshake_notification_generated.rs | 111 +++++++++ protocol/typescript/src/all_generated.ts | 3 + .../rpc/add-unknown-device-request.ts | 76 ++++++ .../rpc/forget-device-request.ts | 76 ++++++ .../rpc/rpc-message-header.ts | 5 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 22 +- .../unknown-device-handshake-notification.ts | 81 +++++++ schema/rpc.fbs | 18 ++ 27 files changed, 1351 insertions(+), 16 deletions(-) create mode 100644 protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index a46ed688..868a4bbb 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -339,6 +339,15 @@ struct TrackingPauseStateResponseBuilder; struct SerialTrackerGetWifiScanRequest; struct SerialTrackerGetWifiScanRequestBuilder; +struct UnknownDeviceHandshakeNotification; +struct UnknownDeviceHandshakeNotificationBuilder; + +struct AddUnknownDeviceRequest; +struct AddUnknownDeviceRequestBuilder; + +struct ForgetDeviceRequest; +struct ForgetDeviceRequestBuilder; + } // namespace rpc namespace pub_sub { @@ -911,11 +920,14 @@ enum class RpcMessage : uint8_t { TrackingPauseStateRequest = 52, TrackingPauseStateResponse = 53, SerialTrackerGetWifiScanRequest = 54, + UnknownDeviceHandshakeNotification = 55, + AddUnknownDeviceRequest = 56, + ForgetDeviceRequest = 57, MIN = NONE, - MAX = SerialTrackerGetWifiScanRequest + MAX = ForgetDeviceRequest }; -inline const RpcMessage (&EnumValuesRpcMessage())[55] { +inline const RpcMessage (&EnumValuesRpcMessage())[58] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -971,13 +983,16 @@ inline const RpcMessage (&EnumValuesRpcMessage())[55] { RpcMessage::SaveFileNotification, RpcMessage::TrackingPauseStateRequest, RpcMessage::TrackingPauseStateResponse, - RpcMessage::SerialTrackerGetWifiScanRequest + RpcMessage::SerialTrackerGetWifiScanRequest, + RpcMessage::UnknownDeviceHandshakeNotification, + RpcMessage::AddUnknownDeviceRequest, + RpcMessage::ForgetDeviceRequest }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[56] = { + static const char * const names[59] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -1033,13 +1048,16 @@ inline const char * const *EnumNamesRpcMessage() { "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", + "UnknownDeviceHandshakeNotification", + "AddUnknownDeviceRequest", + "ForgetDeviceRequest", nullptr }; return names; } inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::SerialTrackerGetWifiScanRequest)) return ""; + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::ForgetDeviceRequest)) return ""; const size_t index = static_cast(e); return EnumNamesRpcMessage()[index]; } @@ -1264,6 +1282,18 @@ template<> struct RpcMessageTraits struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::UnknownDeviceHandshakeNotification; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AddUnknownDeviceRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ForgetDeviceRequest; +}; + bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); @@ -4252,6 +4282,15 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest *message_as_SerialTrackerGetWifiScanRequest() const { return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetWifiScanRequest ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::UnknownDeviceHandshakeNotification *message_as_UnknownDeviceHandshakeNotification() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::UnknownDeviceHandshakeNotification ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AddUnknownDeviceRequest *message_as_AddUnknownDeviceRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AddUnknownDeviceRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ForgetDeviceRequest *message_as_ForgetDeviceRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ForgetDeviceRequest ? static_cast(message()) : nullptr; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TX_ID, 4) && @@ -4478,6 +4517,18 @@ template<> inline const solarxr_protocol::rpc::SerialTrackerGetWifiScanRequest * return message_as_SerialTrackerGetWifiScanRequest(); } +template<> inline const solarxr_protocol::rpc::UnknownDeviceHandshakeNotification *RpcMessageHeader::message_as() const { + return message_as_UnknownDeviceHandshakeNotification(); +} + +template<> inline const solarxr_protocol::rpc::AddUnknownDeviceRequest *RpcMessageHeader::message_as() const { + return message_as_AddUnknownDeviceRequest(); +} + +template<> inline const solarxr_protocol::rpc::ForgetDeviceRequest *RpcMessageHeader::message_as() const { + return message_as_ForgetDeviceRequest(); +} + struct RpcMessageHeaderBuilder { typedef RpcMessageHeader Table; flatbuffers::FlatBufferBuilder &fbb_; @@ -8581,6 +8632,162 @@ inline flatbuffers::Offset CreateSerialTrackerG return builder_.Finish(); } +/// Server notifies connection of an unknown device. +/// If the notification is no longer sent, it means the device connected to another +/// server, got connected to this server or it was turned off. +struct UnknownDeviceHandshakeNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnknownDeviceHandshakeNotificationBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MAC_ADDRESS = 4 + }; + const flatbuffers::String *mac_address() const { + return GetPointer(VT_MAC_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MAC_ADDRESS) && + verifier.VerifyString(mac_address()) && + verifier.EndTable(); + } +}; + +struct UnknownDeviceHandshakeNotificationBuilder { + typedef UnknownDeviceHandshakeNotification Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mac_address(flatbuffers::Offset mac_address) { + fbb_.AddOffset(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, mac_address); + } + explicit UnknownDeviceHandshakeNotificationBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateUnknownDeviceHandshakeNotification( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset mac_address = 0) { + UnknownDeviceHandshakeNotificationBuilder builder_(_fbb); + builder_.add_mac_address(mac_address); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateUnknownDeviceHandshakeNotificationDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *mac_address = nullptr) { + auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; + return solarxr_protocol::rpc::CreateUnknownDeviceHandshakeNotification( + _fbb, + mac_address__); +} + +struct AddUnknownDeviceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AddUnknownDeviceRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MAC_ADDRESS = 4 + }; + const flatbuffers::String *mac_address() const { + return GetPointer(VT_MAC_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MAC_ADDRESS) && + verifier.VerifyString(mac_address()) && + verifier.EndTable(); + } +}; + +struct AddUnknownDeviceRequestBuilder { + typedef AddUnknownDeviceRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mac_address(flatbuffers::Offset mac_address) { + fbb_.AddOffset(AddUnknownDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + explicit AddUnknownDeviceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateAddUnknownDeviceRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset mac_address = 0) { + AddUnknownDeviceRequestBuilder builder_(_fbb); + builder_.add_mac_address(mac_address); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateAddUnknownDeviceRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *mac_address = nullptr) { + auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; + return solarxr_protocol::rpc::CreateAddUnknownDeviceRequest( + _fbb, + mac_address__); +} + +struct ForgetDeviceRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ForgetDeviceRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MAC_ADDRESS = 4 + }; + const flatbuffers::String *mac_address() const { + return GetPointer(VT_MAC_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MAC_ADDRESS) && + verifier.VerifyString(mac_address()) && + verifier.EndTable(); + } +}; + +struct ForgetDeviceRequestBuilder { + typedef ForgetDeviceRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mac_address(flatbuffers::Offset mac_address) { + fbb_.AddOffset(ForgetDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + explicit ForgetDeviceRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); + return o; + } +}; + +inline flatbuffers::Offset CreateForgetDeviceRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset mac_address = 0) { + ForgetDeviceRequestBuilder builder_(_fbb); + builder_.add_mac_address(mac_address); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateForgetDeviceRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *mac_address = nullptr) { + auto mac_address__ = mac_address ? _fbb.CreateString(mac_address) : 0; + return solarxr_protocol::rpc::CreateForgetDeviceRequest( + _fbb, + mac_address__); +} + } // namespace rpc namespace pub_sub { @@ -9522,6 +9729,18 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::UnknownDeviceHandshakeNotification: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AddUnknownDeviceRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ForgetDeviceRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } default: return true; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java new file mode 100644 index 00000000..cd34f224 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class AddUnknownDeviceRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb) { return getRootAsAddUnknownDeviceRequest(_bb, new AddUnknownDeviceRequest()); } + public static AddUnknownDeviceRequest getRootAsAddUnknownDeviceRequest(ByteBuffer _bb, AddUnknownDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public AddUnknownDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createAddUnknownDeviceRequest(FlatBufferBuilder builder, + int macAddressOffset) { + builder.startTable(1); + AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset); + return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder); + } + + public static void startAddUnknownDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } + public static int endAddUnknownDeviceRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public AddUnknownDeviceRequest get(int j) { return get(new AddUnknownDeviceRequest(), j); } + public AddUnknownDeviceRequest get(AddUnknownDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AddUnknownDeviceRequestT unpack() { + AddUnknownDeviceRequestT _o = new AddUnknownDeviceRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AddUnknownDeviceRequestT _o) { + String _oMacAddress = macAddress(); + _o.setMacAddress(_oMacAddress); + } + public static int pack(FlatBufferBuilder builder, AddUnknownDeviceRequestT _o) { + if (_o == null) return 0; + int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); + return createAddUnknownDeviceRequest( + builder, + _macAddress); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java new file mode 100644 index 00000000..d3e8af2d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/AddUnknownDeviceRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class AddUnknownDeviceRequestT { + private String macAddress; + + public String getMacAddress() { return macAddress; } + + public void setMacAddress(String macAddress) { this.macAddress = macAddress; } + + + public AddUnknownDeviceRequestT() { + this.macAddress = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java new file mode 100644 index 00000000..182a0405 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequest.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class ForgetDeviceRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb) { return getRootAsForgetDeviceRequest(_bb, new ForgetDeviceRequest()); } + public static ForgetDeviceRequest getRootAsForgetDeviceRequest(ByteBuffer _bb, ForgetDeviceRequest obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public ForgetDeviceRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createForgetDeviceRequest(FlatBufferBuilder builder, + int macAddressOffset) { + builder.startTable(1); + ForgetDeviceRequest.addMacAddress(builder, macAddressOffset); + return ForgetDeviceRequest.endForgetDeviceRequest(builder); + } + + public static void startForgetDeviceRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } + public static int endForgetDeviceRequest(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public ForgetDeviceRequest get(int j) { return get(new ForgetDeviceRequest(), j); } + public ForgetDeviceRequest get(ForgetDeviceRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ForgetDeviceRequestT unpack() { + ForgetDeviceRequestT _o = new ForgetDeviceRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ForgetDeviceRequestT _o) { + String _oMacAddress = macAddress(); + _o.setMacAddress(_oMacAddress); + } + public static int pack(FlatBufferBuilder builder, ForgetDeviceRequestT _o) { + if (_o == null) return 0; + int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); + return createForgetDeviceRequest( + builder, + _macAddress); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java new file mode 100644 index 00000000..026164f1 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/ForgetDeviceRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class ForgetDeviceRequestT { + private String macAddress; + + public String getMacAddress() { return macAddress; } + + public void setMacAddress(String macAddress) { this.macAddress = macAddress; } + + + public ForgetDeviceRequestT() { + this.macAddress = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index fe9f2ba1..cc1a5a50 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -60,8 +60,11 @@ private RpcMessage() { } public static final byte TrackingPauseStateRequest = 52; public static final byte TrackingPauseStateResponse = 53; public static final byte SerialTrackerGetWifiScanRequest = 54; + public static final byte UnknownDeviceHandshakeNotification = 55; + public static final byte AddUnknownDeviceRequest = 56; + public static final byte ForgetDeviceRequest = 57; - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", }; + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java index 99f7e1d0..1ed2d5a1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -268,6 +268,18 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.UnknownDeviceHandshakeNotification: + _oMessageValue = message(new solarxr_protocol.rpc.UnknownDeviceHandshakeNotification()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.UnknownDeviceHandshakeNotification) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AddUnknownDeviceRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AddUnknownDeviceRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AddUnknownDeviceRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ForgetDeviceRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ForgetDeviceRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ForgetDeviceRequest) _oMessageValue).unpack() : null); + break; default: break; } _o.setMessage(_oMessage); diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java index 22e7346c..ed8d587c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -75,6 +75,9 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.TrackingPauseStateRequestT asTrackingPauseStateRequest() { return (solarxr_protocol.rpc.TrackingPauseStateRequestT) value; } public solarxr_protocol.rpc.TrackingPauseStateResponseT asTrackingPauseStateResponse() { return (solarxr_protocol.rpc.TrackingPauseStateResponseT) value; } public solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT asSerialTrackerGetWifiScanRequest() { return (solarxr_protocol.rpc.SerialTrackerGetWifiScanRequestT) value; } + public solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT asUnknownDeviceHandshakeNotification() { return (solarxr_protocol.rpc.UnknownDeviceHandshakeNotificationT) value; } + public solarxr_protocol.rpc.AddUnknownDeviceRequestT asAddUnknownDeviceRequest() { return (solarxr_protocol.rpc.AddUnknownDeviceRequestT) value; } + public solarxr_protocol.rpc.ForgetDeviceRequestT asForgetDeviceRequest() { return (solarxr_protocol.rpc.ForgetDeviceRequestT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { switch (_o.type) { @@ -132,6 +135,9 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.TrackingPauseStateRequest: return solarxr_protocol.rpc.TrackingPauseStateRequest.pack(builder, _o.asTrackingPauseStateRequest()); case RpcMessage.TrackingPauseStateResponse: return solarxr_protocol.rpc.TrackingPauseStateResponse.pack(builder, _o.asTrackingPauseStateResponse()); case RpcMessage.SerialTrackerGetWifiScanRequest: return solarxr_protocol.rpc.SerialTrackerGetWifiScanRequest.pack(builder, _o.asSerialTrackerGetWifiScanRequest()); + case RpcMessage.UnknownDeviceHandshakeNotification: return solarxr_protocol.rpc.UnknownDeviceHandshakeNotification.pack(builder, _o.asUnknownDeviceHandshakeNotification()); + case RpcMessage.AddUnknownDeviceRequest: return solarxr_protocol.rpc.AddUnknownDeviceRequest.pack(builder, _o.asAddUnknownDeviceRequest()); + case RpcMessage.ForgetDeviceRequest: return solarxr_protocol.rpc.ForgetDeviceRequest.pack(builder, _o.asForgetDeviceRequest()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java new file mode 100644 index 00000000..e0dab501 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.java @@ -0,0 +1,64 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Server notifies connection of an unknown device. + * If the notification is no longer sent, it means the device connected to another + * server, got connected to this server or it was turned off. + */ +@SuppressWarnings("unused") +public final class UnknownDeviceHandshakeNotification extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static UnknownDeviceHandshakeNotification getRootAsUnknownDeviceHandshakeNotification(ByteBuffer _bb) { return getRootAsUnknownDeviceHandshakeNotification(_bb, new UnknownDeviceHandshakeNotification()); } + public static UnknownDeviceHandshakeNotification getRootAsUnknownDeviceHandshakeNotification(ByteBuffer _bb, UnknownDeviceHandshakeNotification obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public UnknownDeviceHandshakeNotification __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String macAddress() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer macAddressAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer macAddressInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createUnknownDeviceHandshakeNotification(FlatBufferBuilder builder, + int macAddressOffset) { + builder.startTable(1); + UnknownDeviceHandshakeNotification.addMacAddress(builder, macAddressOffset); + return UnknownDeviceHandshakeNotification.endUnknownDeviceHandshakeNotification(builder); + } + + public static void startUnknownDeviceHandshakeNotification(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addMacAddress(FlatBufferBuilder builder, int macAddressOffset) { builder.addOffset(0, macAddressOffset, 0); } + public static int endUnknownDeviceHandshakeNotification(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public UnknownDeviceHandshakeNotification get(int j) { return get(new UnknownDeviceHandshakeNotification(), j); } + public UnknownDeviceHandshakeNotification get(UnknownDeviceHandshakeNotification obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public UnknownDeviceHandshakeNotificationT unpack() { + UnknownDeviceHandshakeNotificationT _o = new UnknownDeviceHandshakeNotificationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(UnknownDeviceHandshakeNotificationT _o) { + String _oMacAddress = macAddress(); + _o.setMacAddress(_oMacAddress); + } + public static int pack(FlatBufferBuilder builder, UnknownDeviceHandshakeNotificationT _o) { + if (_o == null) return 0; + int _macAddress = _o.getMacAddress() == null ? 0 : builder.createString(_o.getMacAddress()); + return createUnknownDeviceHandshakeNotification( + builder, + _macAddress); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java new file mode 100644 index 00000000..9d6ae747 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotificationT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class UnknownDeviceHandshakeNotificationT { + private String macAddress; + + public String getMacAddress() { return macAddress; } + + public void setMacAddress(String macAddress) { this.macAddress = macAddress; } + + + public UnknownDeviceHandshakeNotificationT() { + this.macAddress = null; + } +} + diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt new file mode 100644 index 00000000..7445f69a --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/AddUnknownDeviceRequest.kt @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class AddUnknownDeviceRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : AddUnknownDeviceRequest { + __init(_i, _bb) + return this + } + val macAddress : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsAddUnknownDeviceRequest(_bb: ByteBuffer): AddUnknownDeviceRequest = getRootAsAddUnknownDeviceRequest(_bb, AddUnknownDeviceRequest()) + @JvmStatic + fun getRootAsAddUnknownDeviceRequest(_bb: ByteBuffer, obj: AddUnknownDeviceRequest): AddUnknownDeviceRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createAddUnknownDeviceRequest(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { + builder.startTable(1) + addMacAddress(builder, macAddressOffset) + return endAddUnknownDeviceRequest(builder) + } + @JvmStatic + fun startAddUnknownDeviceRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) + @JvmStatic + fun endAddUnknownDeviceRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt new file mode 100644 index 00000000..5060d710 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ForgetDeviceRequest.kt @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +@Suppress("unused") +class ForgetDeviceRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ForgetDeviceRequest { + __init(_i, _bb) + return this + } + val macAddress : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsForgetDeviceRequest(_bb: ByteBuffer): ForgetDeviceRequest = getRootAsForgetDeviceRequest(_bb, ForgetDeviceRequest()) + @JvmStatic + fun getRootAsForgetDeviceRequest(_bb: ByteBuffer, obj: ForgetDeviceRequest): ForgetDeviceRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createForgetDeviceRequest(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { + builder.startTable(1) + addMacAddress(builder, macAddressOffset) + return endForgetDeviceRequest(builder) + } + @JvmStatic + fun startForgetDeviceRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) + @JvmStatic + fun endForgetDeviceRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt index aae3c8a8..b3c846a5 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -60,7 +60,10 @@ class RpcMessage private constructor() { const val TrackingPauseStateRequest: UByte = 52u const val TrackingPauseStateResponse: UByte = 53u const val SerialTrackerGetWifiScanRequest: UByte = 54u - val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest") + const val UnknownDeviceHandshakeNotification: UByte = 55u + const val AddUnknownDeviceRequest: UByte = 56u + const val ForgetDeviceRequest: UByte = 57u + val names : Array = arrayOf("NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "ResetResponse", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "ClearDriftCompensationRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", "SerialDevicesRequest", "SerialDevicesResponse", "NewSerialDeviceResponse", "StartWifiProvisioningRequest", "StopWifiProvisioningRequest", "WifiProvisioningStatusResponse", "ServerInfosRequest", "ServerInfosResponse", "LegTweaksTmpChange", "LegTweaksTmpClear", "TapDetectionSetupNotification", "SetPauseTrackingRequest", "StatusSystemRequest", "StatusSystemResponse", "StatusSystemUpdate", "StatusSystemFixed", "ClearMountingResetRequest", "HeightRequest", "HeightResponse", "AutoBoneApplyRequest", "AutoBoneStopRecordingRequest", "AutoBoneCancelRecordingRequest", "SaveFileNotification", "TrackingPauseStateRequest", "TrackingPauseStateResponse", "SerialTrackerGetWifiScanRequest", "UnknownDeviceHandshakeNotification", "AddUnknownDeviceRequest", "ForgetDeviceRequest") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt b/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt new file mode 100644 index 00000000..d4fae87f --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/UnknownDeviceHandshakeNotification.kt @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +import java.nio.* +import kotlin.math.sign +import com.google.flatbuffers.* + +/** + * Server notifies connection of an unknown device. + * If the notification is no longer sent, it means the device connected to another + * server, got connected to this server or it was turned off. + */ +@Suppress("unused") +class UnknownDeviceHandshakeNotification : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : UnknownDeviceHandshakeNotification { + __init(_i, _bb) + return this + } + val macAddress : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val macAddressAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun macAddressInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsUnknownDeviceHandshakeNotification(_bb: ByteBuffer): UnknownDeviceHandshakeNotification = getRootAsUnknownDeviceHandshakeNotification(_bb, UnknownDeviceHandshakeNotification()) + @JvmStatic + fun getRootAsUnknownDeviceHandshakeNotification(_bb: ByteBuffer, obj: UnknownDeviceHandshakeNotification): UnknownDeviceHandshakeNotification { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder, macAddressOffset: Int) : Int { + builder.startTable(1) + addMacAddress(builder, macAddressOffset) + return endUnknownDeviceHandshakeNotification(builder) + } + @JvmStatic + fun startUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addMacAddress(builder: FlatBufferBuilder, macAddress: Int) = builder.addOffset(0, macAddress, 0) + @JvmStatic + fun endUnknownDeviceHandshakeNotification(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index da0647f0..42a6e824 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -288,6 +288,12 @@ pub mod solarxr_protocol { pub use self::tracking_pause_state_response_generated::*; mod serial_tracker_get_wifi_scan_request_generated; pub use self::serial_tracker_get_wifi_scan_request_generated::*; + mod unknown_device_handshake_notification_generated; + pub use self::unknown_device_handshake_notification_generated::*; + mod add_unknown_device_request_generated; + pub use self::add_unknown_device_request_generated::*; + mod forget_device_request_generated; + pub use self::forget_device_request_generated::*; } // rpc mod message_bundle_generated; pub use self::message_bundle_generated::*; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs new file mode 100644 index 00000000..22d6fb7f --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/add_unknown_device_request_generated.rs @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AddUnknownDeviceRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AddUnknownDeviceRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AddUnknownDeviceRequest<'a> { + type Inner = AddUnknownDeviceRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> AddUnknownDeviceRequest<'a> { + pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AddUnknownDeviceRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AddUnknownDeviceRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = AddUnknownDeviceRequestBuilder::new(_fbb); + if let Some(x) = args.mac_address { builder.add_mac_address(x); } + builder.finish() + } + + + #[inline] + pub fn mac_address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(AddUnknownDeviceRequest::VT_MAC_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for AddUnknownDeviceRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct AddUnknownDeviceRequestArgs<'a> { + pub mac_address: Option>, +} +impl<'a> Default for AddUnknownDeviceRequestArgs<'a> { + #[inline] + fn default() -> Self { + AddUnknownDeviceRequestArgs { + mac_address: None, + } + } +} + +pub struct AddUnknownDeviceRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AddUnknownDeviceRequestBuilder<'a, 'b> { + #[inline] + pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(AddUnknownDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AddUnknownDeviceRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AddUnknownDeviceRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for AddUnknownDeviceRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("AddUnknownDeviceRequest"); + ds.field("mac_address", &self.mac_address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs new file mode 100644 index 00000000..ef85aafb --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/forget_device_request_generated.rs @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ForgetDeviceRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ForgetDeviceRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ForgetDeviceRequest<'a> { + type Inner = ForgetDeviceRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ForgetDeviceRequest<'a> { + pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ForgetDeviceRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ForgetDeviceRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = ForgetDeviceRequestBuilder::new(_fbb); + if let Some(x) = args.mac_address { builder.add_mac_address(x); } + builder.finish() + } + + + #[inline] + pub fn mac_address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ForgetDeviceRequest::VT_MAC_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for ForgetDeviceRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct ForgetDeviceRequestArgs<'a> { + pub mac_address: Option>, +} +impl<'a> Default for ForgetDeviceRequestArgs<'a> { + #[inline] + fn default() -> Self { + ForgetDeviceRequestArgs { + mac_address: None, + } + } +} + +pub struct ForgetDeviceRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ForgetDeviceRequestBuilder<'a, 'b> { + #[inline] + pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(ForgetDeviceRequest::VT_MAC_ADDRESS, mac_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ForgetDeviceRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ForgetDeviceRequestBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for ForgetDeviceRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ForgetDeviceRequest"); + ds.field("mac_address", &self.mac_address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs index 5be87077..639f6f7c 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs @@ -12,10 +12,10 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_RPC_MESSAGE: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_RPC_MESSAGE: u8 = 54; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 57; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] #[allow(non_camel_case_types)] -pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 55] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 58] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -71,6 +71,9 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 55] = [ RpcMessage::TrackingPauseStateRequest, RpcMessage::TrackingPauseStateResponse, RpcMessage::SerialTrackerGetWifiScanRequest, + RpcMessage::UnknownDeviceHandshakeNotification, + RpcMessage::AddUnknownDeviceRequest, + RpcMessage::ForgetDeviceRequest, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -133,9 +136,12 @@ impl RpcMessage { pub const TrackingPauseStateRequest: Self = Self(52); pub const TrackingPauseStateResponse: Self = Self(53); pub const SerialTrackerGetWifiScanRequest: Self = Self(54); + pub const UnknownDeviceHandshakeNotification: Self = Self(55); + pub const AddUnknownDeviceRequest: Self = Self(56); + pub const ForgetDeviceRequest: Self = Self(57); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 54; + pub const ENUM_MAX: u8 = 57; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -192,6 +198,9 @@ impl RpcMessage { Self::TrackingPauseStateRequest, Self::TrackingPauseStateResponse, Self::SerialTrackerGetWifiScanRequest, + Self::UnknownDeviceHandshakeNotification, + Self::AddUnknownDeviceRequest, + Self::ForgetDeviceRequest, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -251,6 +260,9 @@ impl RpcMessage { Self::TrackingPauseStateRequest => Some("TrackingPauseStateRequest"), Self::TrackingPauseStateResponse => Some("TrackingPauseStateResponse"), Self::SerialTrackerGetWifiScanRequest => Some("SerialTrackerGetWifiScanRequest"), + Self::UnknownDeviceHandshakeNotification => Some("UnknownDeviceHandshakeNotification"), + Self::AddUnknownDeviceRequest => Some("AddUnknownDeviceRequest"), + Self::ForgetDeviceRequest => Some("ForgetDeviceRequest"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs index 0ccd228d..644facff 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_header_generated.rs @@ -879,6 +879,51 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_unknown_device_handshake_notification(&self) -> Option> { + if self.message_type() == RpcMessage::UnknownDeviceHandshakeNotification { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { UnknownDeviceHandshakeNotification::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_add_unknown_device_request(&self) -> Option> { + if self.message_type() == RpcMessage::AddUnknownDeviceRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { AddUnknownDeviceRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_forget_device_request(&self) -> Option> { + if self.message_type() == RpcMessage::ForgetDeviceRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ForgetDeviceRequest::init_from_table(t) } + }) + } else { + None + } + } + } impl flatbuffers::Verifiable for RpcMessageHeader<'_> { @@ -945,6 +990,9 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::TrackingPauseStateRequest => v.verify_union_variant::>("RpcMessage::TrackingPauseStateRequest", pos), RpcMessage::TrackingPauseStateResponse => v.verify_union_variant::>("RpcMessage::TrackingPauseStateResponse", pos), RpcMessage::SerialTrackerGetWifiScanRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetWifiScanRequest", pos), + RpcMessage::UnknownDeviceHandshakeNotification => v.verify_union_variant::>("RpcMessage::UnknownDeviceHandshakeNotification", pos), + RpcMessage::AddUnknownDeviceRequest => v.verify_union_variant::>("RpcMessage::AddUnknownDeviceRequest", pos), + RpcMessage::ForgetDeviceRequest => v.verify_union_variant::>("RpcMessage::ForgetDeviceRequest", pos), _ => Ok(()), } })? @@ -1384,6 +1432,27 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::UnknownDeviceHandshakeNotification => { + if let Some(x) = self.message_as_unknown_device_handshake_notification() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AddUnknownDeviceRequest => { + if let Some(x) = self.message_as_add_unknown_device_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ForgetDeviceRequest => { + if let Some(x) = self.message_as_forget_device_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, _ => { let x: Option<()> = None; ds.field("message", &x) diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs new file mode 100644 index 00000000..99ba50df --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/unknown_device_handshake_notification_generated.rs @@ -0,0 +1,111 @@ +// automatically generated by the FlatBuffers compiler, do not modify +// @generated +extern crate alloc; +extern crate flatbuffers; +use alloc::boxed::Box; +use alloc::string::{String, ToString}; +use alloc::vec::Vec; +use core::mem; +use core::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum UnknownDeviceHandshakeNotificationOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Server notifies connection of an unknown device. +/// If the notification is no longer sent, it means the device connected to another +/// server, got connected to this server or it was turned off. +pub struct UnknownDeviceHandshakeNotification<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for UnknownDeviceHandshakeNotification<'a> { + type Inner = UnknownDeviceHandshakeNotification<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> UnknownDeviceHandshakeNotification<'a> { + pub const VT_MAC_ADDRESS: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + UnknownDeviceHandshakeNotification { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args UnknownDeviceHandshakeNotificationArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = UnknownDeviceHandshakeNotificationBuilder::new(_fbb); + if let Some(x) = args.mac_address { builder.add_mac_address(x); } + builder.finish() + } + + + #[inline] + pub fn mac_address(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, None)} + } +} + +impl flatbuffers::Verifiable for UnknownDeviceHandshakeNotification<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("mac_address", Self::VT_MAC_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct UnknownDeviceHandshakeNotificationArgs<'a> { + pub mac_address: Option>, +} +impl<'a> Default for UnknownDeviceHandshakeNotificationArgs<'a> { + #[inline] + fn default() -> Self { + UnknownDeviceHandshakeNotificationArgs { + mac_address: None, + } + } +} + +pub struct UnknownDeviceHandshakeNotificationBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> UnknownDeviceHandshakeNotificationBuilder<'a, 'b> { + #[inline] + pub fn add_mac_address(&mut self, mac_address: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(UnknownDeviceHandshakeNotification::VT_MAC_ADDRESS, mac_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> UnknownDeviceHandshakeNotificationBuilder<'a, 'b> { + let start = _fbb.start_table(); + UnknownDeviceHandshakeNotificationBuilder { + fbb_: _fbb, + start_: start, + } + } + #[inline] + pub fn finish(self) -> flatbuffers::WIPOffset> { + let o = self.fbb_.end_table(self.start_); + flatbuffers::WIPOffset::new(o.value()) + } +} + +impl core::fmt::Debug for UnknownDeviceHandshakeNotification<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("UnknownDeviceHandshakeNotification"); + ds.field("mac_address", &self.mac_address()); + ds.finish() + } +} diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index f2ddb4cf..ffc5c9b9 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -45,6 +45,7 @@ export { TopicHandle, TopicHandleT } from './solarxr-protocol/pub-sub/topic-hand export { TopicHandleRequest, TopicHandleRequestT } from './solarxr-protocol/pub-sub/topic-handle-request.js'; export { TopicId, TopicIdT } from './solarxr-protocol/pub-sub/topic-id.js'; export { TopicMapping, TopicMappingT } from './solarxr-protocol/pub-sub/topic-mapping.js'; +export { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from './solarxr-protocol/rpc/add-unknown-device-request.js'; export { ArmsMountingResetMode } from './solarxr-protocol/rpc/arms-mounting-reset-mode.js'; export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr-protocol/rpc/assign-tracker-request.js'; export { AutoBoneApplyRequest, AutoBoneApplyRequestT } from './solarxr-protocol/rpc/auto-bone-apply-request.js'; @@ -63,6 +64,7 @@ export { CloseSerialRequest, CloseSerialRequestT } from './solarxr-protocol/rpc/ export { ComputerDirectory } from './solarxr-protocol/rpc/computer-directory.js'; export { DriftCompensationSettings, DriftCompensationSettingsT } from './solarxr-protocol/rpc/drift-compensation-settings.js'; export { FilteringSettings, FilteringSettingsT } from './solarxr-protocol/rpc/filtering-settings.js'; +export { ForgetDeviceRequest, ForgetDeviceRequestT } from './solarxr-protocol/rpc/forget-device-request.js'; export { HeartbeatRequest, HeartbeatRequestT } from './solarxr-protocol/rpc/heartbeat-request.js'; export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/heartbeat-response.js'; export { HeightRequest, HeightRequestT } from './solarxr-protocol/rpc/height-request.js'; @@ -122,6 +124,7 @@ export { TapDetectionSettings, TapDetectionSettingsT } from './solarxr-protocol/ export { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from './solarxr-protocol/rpc/tap-detection-setup-notification.js'; export { TrackingPauseStateRequest, TrackingPauseStateRequestT } from './solarxr-protocol/rpc/tracking-pause-state-request.js'; export { TrackingPauseStateResponse, TrackingPauseStateResponseT } from './solarxr-protocol/rpc/tracking-pause-state-response.js'; +export { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from './solarxr-protocol/rpc/unknown-device-handshake-notification.js'; export { VMCOSCSettings, VMCOSCSettingsT } from './solarxr-protocol/rpc/vmcoscsettings.js'; export { VRCOSCSettings, VRCOSCSettingsT } from './solarxr-protocol/rpc/vrcoscsettings.js'; export { WifiProvisioningStatus } from './solarxr-protocol/rpc/wifi-provisioning-status.js'; diff --git a/protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts new file mode 100644 index 00000000..a8b69dbb --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/add-unknown-device-request.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class AddUnknownDeviceRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):AddUnknownDeviceRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAddUnknownDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:AddUnknownDeviceRequest):AddUnknownDeviceRequest { + return (obj || new AddUnknownDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAddUnknownDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:AddUnknownDeviceRequest):AddUnknownDeviceRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AddUnknownDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +macAddress():string|null +macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +macAddress(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startAddUnknownDeviceRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, macAddressOffset, 0); +} + +static endAddUnknownDeviceRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAddUnknownDeviceRequest(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { + AddUnknownDeviceRequest.startAddUnknownDeviceRequest(builder); + AddUnknownDeviceRequest.addMacAddress(builder, macAddressOffset); + return AddUnknownDeviceRequest.endAddUnknownDeviceRequest(builder); +} + +unpack(): AddUnknownDeviceRequestT { + return new AddUnknownDeviceRequestT( + this.macAddress() + ); +} + + +unpackTo(_o: AddUnknownDeviceRequestT): void { + _o.macAddress = this.macAddress(); +} +} + +export class AddUnknownDeviceRequestT implements flatbuffers.IGeneratedObject { +constructor( + public macAddress: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); + + return AddUnknownDeviceRequest.createAddUnknownDeviceRequest(builder, + macAddress + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts new file mode 100644 index 00000000..ff33163a --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/forget-device-request.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class ForgetDeviceRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ForgetDeviceRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsForgetDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:ForgetDeviceRequest):ForgetDeviceRequest { + return (obj || new ForgetDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsForgetDeviceRequest(bb:flatbuffers.ByteBuffer, obj?:ForgetDeviceRequest):ForgetDeviceRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ForgetDeviceRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +macAddress():string|null +macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +macAddress(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startForgetDeviceRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, macAddressOffset, 0); +} + +static endForgetDeviceRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createForgetDeviceRequest(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { + ForgetDeviceRequest.startForgetDeviceRequest(builder); + ForgetDeviceRequest.addMacAddress(builder, macAddressOffset); + return ForgetDeviceRequest.endForgetDeviceRequest(builder); +} + +unpack(): ForgetDeviceRequestT { + return new ForgetDeviceRequestT( + this.macAddress() + ); +} + + +unpackTo(_o: ForgetDeviceRequestT): void { + _o.macAddress = this.macAddress(); +} +} + +export class ForgetDeviceRequestT implements flatbuffers.IGeneratedObject { +constructor( + public macAddress: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); + + return ForgetDeviceRequest.createForgetDeviceRequest(builder, + macAddress + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts index 22db8f34..3aa47e06 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -3,6 +3,7 @@ import * as flatbuffers from 'flatbuffers'; import { TransactionId, TransactionIdT } from '../../solarxr-protocol/datatypes/transaction-id.js'; +import { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from '../../solarxr-protocol/rpc/add-unknown-device-request.js'; import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request.js'; import { AutoBoneApplyRequest, AutoBoneApplyRequestT } from '../../solarxr-protocol/rpc/auto-bone-apply-request.js'; import { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; @@ -15,6 +16,7 @@ import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../.. import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; +import { ForgetDeviceRequest, ForgetDeviceRequestT } from '../../solarxr-protocol/rpc/forget-device-request.js'; import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request.js'; import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response.js'; import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; @@ -57,6 +59,7 @@ import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../.. import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; +import { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from '../../solarxr-protocol/rpc/unknown-device-handshake-notification.js'; import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; @@ -154,7 +157,7 @@ export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|WifiProvisioningStatusResponseT|null = null + public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|WifiProvisioningStatusResponseT|null = null ){} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts index a661b2f8..4916458a 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -1,5 +1,6 @@ // automatically generated by the FlatBuffers compiler, do not modify +import { AddUnknownDeviceRequest, AddUnknownDeviceRequestT } from '../../solarxr-protocol/rpc/add-unknown-device-request.js'; import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request.js'; import { AutoBoneApplyRequest, AutoBoneApplyRequestT } from '../../solarxr-protocol/rpc/auto-bone-apply-request.js'; import { AutoBoneCancelRecordingRequest, AutoBoneCancelRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-cancel-recording-request.js'; @@ -12,6 +13,7 @@ import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../.. import { ClearDriftCompensationRequest, ClearDriftCompensationRequestT } from '../../solarxr-protocol/rpc/clear-drift-compensation-request.js'; import { ClearMountingResetRequest, ClearMountingResetRequestT } from '../../solarxr-protocol/rpc/clear-mounting-reset-request.js'; import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request.js'; +import { ForgetDeviceRequest, ForgetDeviceRequestT } from '../../solarxr-protocol/rpc/forget-device-request.js'; import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request.js'; import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response.js'; import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; @@ -53,6 +55,7 @@ import { StopWifiProvisioningRequest, StopWifiProvisioningRequestT } from '../.. import { TapDetectionSetupNotification, TapDetectionSetupNotificationT } from '../../solarxr-protocol/rpc/tap-detection-setup-notification.js'; import { TrackingPauseStateRequest, TrackingPauseStateRequestT } from '../../solarxr-protocol/rpc/tracking-pause-state-request.js'; import { TrackingPauseStateResponse, TrackingPauseStateResponseT } from '../../solarxr-protocol/rpc/tracking-pause-state-response.js'; +import { UnknownDeviceHandshakeNotification, UnknownDeviceHandshakeNotificationT } from '../../solarxr-protocol/rpc/unknown-device-handshake-notification.js'; import { WifiProvisioningStatusResponse, WifiProvisioningStatusResponseT } from '../../solarxr-protocol/rpc/wifi-provisioning-status-response.js'; @@ -111,13 +114,16 @@ export enum RpcMessage { SaveFileNotification = 51, TrackingPauseStateRequest = 52, TrackingPauseStateResponse = 53, - SerialTrackerGetWifiScanRequest = 54 + SerialTrackerGetWifiScanRequest = 54, + UnknownDeviceHandshakeNotification = 55, + AddUnknownDeviceRequest = 56, + ForgetDeviceRequest = 57 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null -): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { + accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -174,15 +180,18 @@ export function unionToRpcMessage( case 'TrackingPauseStateRequest': return accessor(new TrackingPauseStateRequest())! as TrackingPauseStateRequest; case 'TrackingPauseStateResponse': return accessor(new TrackingPauseStateResponse())! as TrackingPauseStateResponse; case 'SerialTrackerGetWifiScanRequest': return accessor(new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; + case 'UnknownDeviceHandshakeNotification': return accessor(new UnknownDeviceHandshakeNotification())! as UnknownDeviceHandshakeNotification; + case 'AddUnknownDeviceRequest': return accessor(new AddUnknownDeviceRequest())! as AddUnknownDeviceRequest; + case 'ForgetDeviceRequest': return accessor(new ForgetDeviceRequest())! as ForgetDeviceRequest; default: return null; } } export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse) => AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null, + accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null, index: number -): AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|WifiProvisioningStatusResponse|null { +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|LegTweaksTmpChange|LegTweaksTmpClear|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|ResetResponse|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -239,6 +248,9 @@ export function unionListToRpcMessage( case 'TrackingPauseStateRequest': return accessor(index, new TrackingPauseStateRequest())! as TrackingPauseStateRequest; case 'TrackingPauseStateResponse': return accessor(index, new TrackingPauseStateResponse())! as TrackingPauseStateResponse; case 'SerialTrackerGetWifiScanRequest': return accessor(index, new SerialTrackerGetWifiScanRequest())! as SerialTrackerGetWifiScanRequest; + case 'UnknownDeviceHandshakeNotification': return accessor(index, new UnknownDeviceHandshakeNotification())! as UnknownDeviceHandshakeNotification; + case 'AddUnknownDeviceRequest': return accessor(index, new AddUnknownDeviceRequest())! as AddUnknownDeviceRequest; + case 'ForgetDeviceRequest': return accessor(index, new ForgetDeviceRequest())! as ForgetDeviceRequest; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts b/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts new file mode 100644 index 00000000..23f9dbbd --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/unknown-device-handshake-notification.ts @@ -0,0 +1,81 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Server notifies connection of an unknown device. + * If the notification is no longer sent, it means the device connected to another + * server, got connected to this server or it was turned off. + */ +export class UnknownDeviceHandshakeNotification implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):UnknownDeviceHandshakeNotification { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsUnknownDeviceHandshakeNotification(bb:flatbuffers.ByteBuffer, obj?:UnknownDeviceHandshakeNotification):UnknownDeviceHandshakeNotification { + return (obj || new UnknownDeviceHandshakeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsUnknownDeviceHandshakeNotification(bb:flatbuffers.ByteBuffer, obj?:UnknownDeviceHandshakeNotification):UnknownDeviceHandshakeNotification { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new UnknownDeviceHandshakeNotification()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +macAddress():string|null +macAddress(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +macAddress(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addMacAddress(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, macAddressOffset, 0); +} + +static endUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createUnknownDeviceHandshakeNotification(builder:flatbuffers.Builder, macAddressOffset:flatbuffers.Offset):flatbuffers.Offset { + UnknownDeviceHandshakeNotification.startUnknownDeviceHandshakeNotification(builder); + UnknownDeviceHandshakeNotification.addMacAddress(builder, macAddressOffset); + return UnknownDeviceHandshakeNotification.endUnknownDeviceHandshakeNotification(builder); +} + +unpack(): UnknownDeviceHandshakeNotificationT { + return new UnknownDeviceHandshakeNotificationT( + this.macAddress() + ); +} + + +unpackTo(_o: UnknownDeviceHandshakeNotificationT): void { + _o.macAddress = this.macAddress(); +} +} + +export class UnknownDeviceHandshakeNotificationT implements flatbuffers.IGeneratedObject { +constructor( + public macAddress: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const macAddress = (this.macAddress !== null ? builder.createString(this.macAddress!) : 0); + + return UnknownDeviceHandshakeNotification.createUnknownDeviceHandshakeNotification(builder, + macAddress + ); +} +} diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 61d8a72d..a40425dd 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -66,6 +66,9 @@ union RpcMessage { TrackingPauseStateRequest, TrackingPauseStateResponse, SerialTrackerGetWifiScanRequest, + UnknownDeviceHandshakeNotification, + AddUnknownDeviceRequest, + ForgetDeviceRequest, } table RpcMessageHeader { @@ -574,3 +577,18 @@ table TrackingPauseStateResponse { /// Sends the GET WIFISCAN cmd to the current tracker on the serial monitor table SerialTrackerGetWifiScanRequest {} + +/// Server notifies connection of an unknown device. +/// If the notification is no longer sent, it means the device connected to another +/// server, got connected to this server or it was turned off. +table UnknownDeviceHandshakeNotification { + mac_address: string; +} + +table AddUnknownDeviceRequest { + mac_address: string; +} + +table ForgetDeviceRequest { + mac_address: string; +} From a5fd6aed43707e226df47df85ebc5d53ad68a35b Mon Sep 17 00:00:00 2001 From: Uriel Date: Thu, 7 Mar 2024 21:55:02 -0300 Subject: [PATCH 6/6] add automatic tracker toggle for SteamVR (#132) --- .../generated/all_generated.h | 14 +++++++++-- .../rpc/SteamVRTrackersSetting.java | 15 ++++++++---- .../rpc/SteamVRTrackersSettingT.java | 6 +++++ .../rpc/SteamVRTrackersSetting.kt | 14 ++++++++--- .../rpc/steam_vrtrackers_setting_generated.rs | 17 +++++++++++++ .../rpc/steam-vrtrackers-setting.ts | 24 +++++++++++++++---- schema/rpc.fbs | 1 + 7 files changed, 77 insertions(+), 14 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 868a4bbb..4b15130c 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -5163,7 +5163,8 @@ struct SteamVRTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab VT_FEET = 8, VT_KNEES = 10, VT_ELBOWS = 12, - VT_HANDS = 14 + VT_HANDS = 14, + VT_AUTOMATICTRACKERTOGGLE = 16 }; bool waist() const { return GetField(VT_WAIST, 0) != 0; @@ -5183,6 +5184,9 @@ struct SteamVRTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab bool hands() const { return GetField(VT_HANDS, 0) != 0; } + bool automaticTrackerToggle() const { + return GetField(VT_AUTOMATICTRACKERTOGGLE, 0) != 0; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_WAIST, 1) && @@ -5191,6 +5195,7 @@ struct SteamVRTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab VerifyField(verifier, VT_KNEES, 1) && VerifyField(verifier, VT_ELBOWS, 1) && VerifyField(verifier, VT_HANDS, 1) && + VerifyField(verifier, VT_AUTOMATICTRACKERTOGGLE, 1) && verifier.EndTable(); } }; @@ -5217,6 +5222,9 @@ struct SteamVRTrackersSettingBuilder { void add_hands(bool hands) { fbb_.AddElement(SteamVRTrackersSetting::VT_HANDS, static_cast(hands), 0); } + void add_automaticTrackerToggle(bool automaticTrackerToggle) { + fbb_.AddElement(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, static_cast(automaticTrackerToggle), 0); + } explicit SteamVRTrackersSettingBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -5235,8 +5243,10 @@ inline flatbuffers::Offset CreateSteamVRTrackersSetting( bool feet = false, bool knees = false, bool elbows = false, - bool hands = false) { + bool hands = false, + bool automaticTrackerToggle = false) { SteamVRTrackersSettingBuilder builder_(_fbb); + builder_.add_automaticTrackerToggle(automaticTrackerToggle); builder_.add_hands(hands); builder_.add_elbows(elbows); builder_.add_knees(knees); diff --git a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java index 8b04ae80..ac459fbd 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java +++ b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java @@ -21,6 +21,7 @@ public final class SteamVRTrackersSetting extends Table { public boolean knees() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public boolean elbows() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public boolean hands() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean automaticTrackerToggle() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, boolean waist, @@ -28,8 +29,10 @@ public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, boolean feet, boolean knees, boolean elbows, - boolean hands) { - builder.startTable(6); + boolean hands, + boolean automaticTrackerToggle) { + builder.startTable(7); + SteamVRTrackersSetting.addAutomaticTrackerToggle(builder, automaticTrackerToggle); SteamVRTrackersSetting.addHands(builder, hands); SteamVRTrackersSetting.addElbows(builder, elbows); SteamVRTrackersSetting.addKnees(builder, knees); @@ -39,13 +42,14 @@ public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); } - public static void startSteamVRTrackersSetting(FlatBufferBuilder builder) { builder.startTable(6); } + public static void startSteamVRTrackersSetting(FlatBufferBuilder builder) { builder.startTable(7); } public static void addWaist(FlatBufferBuilder builder, boolean waist) { builder.addBoolean(0, waist, false); } public static void addChest(FlatBufferBuilder builder, boolean chest) { builder.addBoolean(1, chest, false); } public static void addFeet(FlatBufferBuilder builder, boolean feet) { builder.addBoolean(2, feet, false); } public static void addKnees(FlatBufferBuilder builder, boolean knees) { builder.addBoolean(3, knees, false); } public static void addElbows(FlatBufferBuilder builder, boolean elbows) { builder.addBoolean(4, elbows, false); } public static void addHands(FlatBufferBuilder builder, boolean hands) { builder.addBoolean(5, hands, false); } + public static void addAutomaticTrackerToggle(FlatBufferBuilder builder, boolean automaticTrackerToggle) { builder.addBoolean(6, automaticTrackerToggle, false); } public static int endSteamVRTrackersSetting(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -75,6 +79,8 @@ public void unpackTo(SteamVRTrackersSettingT _o) { _o.setElbows(_oElbows); boolean _oHands = hands(); _o.setHands(_oHands); + boolean _oAutomaticTrackerToggle = automaticTrackerToggle(); + _o.setAutomaticTrackerToggle(_oAutomaticTrackerToggle); } public static int pack(FlatBufferBuilder builder, SteamVRTrackersSettingT _o) { if (_o == null) return 0; @@ -85,7 +91,8 @@ public static int pack(FlatBufferBuilder builder, SteamVRTrackersSettingT _o) { _o.getFeet(), _o.getKnees(), _o.getElbows(), - _o.getHands()); + _o.getHands(), + _o.getAutomaticTrackerToggle()); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java index b3964b78..1db6b232 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java @@ -14,6 +14,7 @@ public class SteamVRTrackersSettingT { private boolean knees; private boolean elbows; private boolean hands; + private boolean automaticTrackerToggle; public boolean getWaist() { return waist; } @@ -39,6 +40,10 @@ public class SteamVRTrackersSettingT { public void setHands(boolean hands) { this.hands = hands; } + public boolean getAutomaticTrackerToggle() { return automaticTrackerToggle; } + + public void setAutomaticTrackerToggle(boolean automaticTrackerToggle) { this.automaticTrackerToggle = automaticTrackerToggle; } + public SteamVRTrackersSettingT() { this.waist = false; @@ -47,6 +52,7 @@ public SteamVRTrackersSettingT() { this.knees = false; this.elbows = false; this.hands = false; + this.automaticTrackerToggle = false; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt index e124ffd2..71bbefaa 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SteamVRTrackersSetting.kt @@ -46,6 +46,11 @@ class SteamVRTrackersSetting : Table() { val o = __offset(14) return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false } + val automaticTrackerToggle : Boolean + get() { + val o = __offset(16) + return if(o != 0) 0.toByte() != bb.get(o + bb_pos) else false + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -57,8 +62,9 @@ class SteamVRTrackersSetting : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createSteamVRTrackersSetting(builder: FlatBufferBuilder, waist: Boolean, chest: Boolean, feet: Boolean, knees: Boolean, elbows: Boolean, hands: Boolean) : Int { - builder.startTable(6) + fun createSteamVRTrackersSetting(builder: FlatBufferBuilder, waist: Boolean, chest: Boolean, feet: Boolean, knees: Boolean, elbows: Boolean, hands: Boolean, automaticTrackerToggle: Boolean) : Int { + builder.startTable(7) + addAutomaticTrackerToggle(builder, automaticTrackerToggle) addHands(builder, hands) addElbows(builder, elbows) addKnees(builder, knees) @@ -68,7 +74,7 @@ class SteamVRTrackersSetting : Table() { return endSteamVRTrackersSetting(builder) } @JvmStatic - fun startSteamVRTrackersSetting(builder: FlatBufferBuilder) = builder.startTable(6) + fun startSteamVRTrackersSetting(builder: FlatBufferBuilder) = builder.startTable(7) @JvmStatic fun addWaist(builder: FlatBufferBuilder, waist: Boolean) = builder.addBoolean(0, waist, false) @JvmStatic @@ -82,6 +88,8 @@ class SteamVRTrackersSetting : Table() { @JvmStatic fun addHands(builder: FlatBufferBuilder, hands: Boolean) = builder.addBoolean(5, hands, false) @JvmStatic + fun addAutomaticTrackerToggle(builder: FlatBufferBuilder, automaticTrackerToggle: Boolean) = builder.addBoolean(6, automaticTrackerToggle, false) + @JvmStatic fun endSteamVRTrackersSetting(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs index 64228682..614989eb 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs @@ -31,6 +31,7 @@ impl<'a> SteamVRTrackersSetting<'a> { pub const VT_KNEES: flatbuffers::VOffsetT = 10; pub const VT_ELBOWS: flatbuffers::VOffsetT = 12; pub const VT_HANDS: flatbuffers::VOffsetT = 14; + pub const VT_AUTOMATICTRACKERTOGGLE: flatbuffers::VOffsetT = 16; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -42,6 +43,7 @@ impl<'a> SteamVRTrackersSetting<'a> { args: &'args SteamVRTrackersSettingArgs ) -> flatbuffers::WIPOffset> { let mut builder = SteamVRTrackersSettingBuilder::new(_fbb); + builder.add_automaticTrackerToggle(args.automaticTrackerToggle); builder.add_hands(args.hands); builder.add_elbows(args.elbows); builder.add_knees(args.knees); @@ -94,6 +96,13 @@ impl<'a> SteamVRTrackersSetting<'a> { // which contains a valid value in this slot unsafe { self._tab.get::(SteamVRTrackersSetting::VT_HANDS, Some(false)).unwrap()} } + #[inline] + pub fn automaticTrackerToggle(&self) -> bool { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, Some(false)).unwrap()} + } } impl flatbuffers::Verifiable for SteamVRTrackersSetting<'_> { @@ -109,6 +118,7 @@ impl flatbuffers::Verifiable for SteamVRTrackersSetting<'_> { .visit_field::("knees", Self::VT_KNEES, false)? .visit_field::("elbows", Self::VT_ELBOWS, false)? .visit_field::("hands", Self::VT_HANDS, false)? + .visit_field::("automaticTrackerToggle", Self::VT_AUTOMATICTRACKERTOGGLE, false)? .finish(); Ok(()) } @@ -120,6 +130,7 @@ pub struct SteamVRTrackersSettingArgs { pub knees: bool, pub elbows: bool, pub hands: bool, + pub automaticTrackerToggle: bool, } impl<'a> Default for SteamVRTrackersSettingArgs { #[inline] @@ -131,6 +142,7 @@ impl<'a> Default for SteamVRTrackersSettingArgs { knees: false, elbows: false, hands: false, + automaticTrackerToggle: false, } } } @@ -165,6 +177,10 @@ impl<'a: 'b, 'b> SteamVRTrackersSettingBuilder<'a, 'b> { self.fbb_.push_slot::(SteamVRTrackersSetting::VT_HANDS, hands, false); } #[inline] + pub fn add_automaticTrackerToggle(&mut self, automaticTrackerToggle: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_AUTOMATICTRACKERTOGGLE, automaticTrackerToggle, false); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SteamVRTrackersSettingBuilder<'a, 'b> { let start = _fbb.start_table(); SteamVRTrackersSettingBuilder { @@ -188,6 +204,7 @@ impl core::fmt::Debug for SteamVRTrackersSetting<'_> { ds.field("knees", &self.knees()); ds.field("elbows", &self.elbows()); ds.field("hands", &self.hands()); + ds.field("automaticTrackerToggle", &self.automaticTrackerToggle()); ds.finish() } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts b/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts index 915cef23..a9290123 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts @@ -52,8 +52,13 @@ hands():boolean { return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; } +automaticTrackerToggle():boolean { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + static startSteamVRTrackersSetting(builder:flatbuffers.Builder) { - builder.startObject(6); + builder.startObject(7); } static addWaist(builder:flatbuffers.Builder, waist:boolean) { @@ -80,12 +85,16 @@ static addHands(builder:flatbuffers.Builder, hands:boolean) { builder.addFieldInt8(5, +hands, +false); } +static addAutomaticTrackerToggle(builder:flatbuffers.Builder, automaticTrackerToggle:boolean) { + builder.addFieldInt8(6, +automaticTrackerToggle, +false); +} + static endSteamVRTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } -static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, chest:boolean, feet:boolean, knees:boolean, elbows:boolean, hands:boolean):flatbuffers.Offset { +static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, chest:boolean, feet:boolean, knees:boolean, elbows:boolean, hands:boolean, automaticTrackerToggle:boolean):flatbuffers.Offset { SteamVRTrackersSetting.startSteamVRTrackersSetting(builder); SteamVRTrackersSetting.addWaist(builder, waist); SteamVRTrackersSetting.addChest(builder, chest); @@ -93,6 +102,7 @@ static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, SteamVRTrackersSetting.addKnees(builder, knees); SteamVRTrackersSetting.addElbows(builder, elbows); SteamVRTrackersSetting.addHands(builder, hands); + SteamVRTrackersSetting.addAutomaticTrackerToggle(builder, automaticTrackerToggle); return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); } @@ -103,7 +113,8 @@ unpack(): SteamVRTrackersSettingT { this.feet(), this.knees(), this.elbows(), - this.hands() + this.hands(), + this.automaticTrackerToggle() ); } @@ -115,6 +126,7 @@ unpackTo(_o: SteamVRTrackersSettingT): void { _o.knees = this.knees(); _o.elbows = this.elbows(); _o.hands = this.hands(); + _o.automaticTrackerToggle = this.automaticTrackerToggle(); } } @@ -125,7 +137,8 @@ constructor( public feet: boolean = false, public knees: boolean = false, public elbows: boolean = false, - public hands: boolean = false + public hands: boolean = false, + public automaticTrackerToggle: boolean = false ){} @@ -136,7 +149,8 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { this.feet, this.knees, this.elbows, - this.hands + this.hands, + this.automaticTrackerToggle ); } } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index a40425dd..5295677e 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -154,6 +154,7 @@ table SteamVRTrackersSetting { knees: bool; elbows: bool; hands: bool; + automaticTrackerToggle: bool; } table FilteringSettings {