From d2fe9f068c7c9a25c59bfe4b82617c992715f85b Mon Sep 17 00:00:00 2001 From: Hannah Lynn Lindrob Date: Thu, 15 Jan 2026 11:52:11 +0100 Subject: [PATCH 1/8] Working on rpc packet for keybind settings --- .../generated/all_generated.h | 206 +++++++++++++++++- .../rpc/ChangeSettingsRequest.java | 17 +- .../rpc/ChangeSettingsRequestT.java | 6 + .../rpc/SettingsResponse.java | 17 +- .../rpc/SettingsResponseT.java | 6 + .../rpc/ChangeSettingsRequest.kt | 18 +- .../solarxr_protocol/rpc/SettingsResponse.kt | 18 +- protocol/rust/src/generated/mod.rs | 6 + .../rpc/change_settings_request_generated.rs | 17 ++ .../rpc/settings_response_generated.rs | 17 ++ protocol/typescript/src/all_generated.ts | 3 + .../rpc/change-settings-request.ts | 21 +- .../solarxr-protocol/rpc/settings-response.ts | 21 +- schema/rpc.fbs | 25 +++ 14 files changed, 374 insertions(+), 24 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 2635217b..d88b9369 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -212,6 +212,15 @@ struct StayAlignedSettingsBuilder; struct HIDSettings; struct HIDSettingsBuilder; +struct Key; +struct KeyBuilder; + +struct Keybind; +struct KeybindBuilder; + +struct KeybindSettings; +struct KeybindSettingsBuilder; + struct TapDetectionSetupNotification; struct TapDetectionSetupNotificationBuilder; @@ -6818,7 +6827,8 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_AUTO_BONE_SETTINGS = 20, VT_RESETS_SETTINGS = 22, VT_STAY_ALIGNED = 24, - VT_HID_SETTINGS = 26 + VT_HID_SETTINGS = 26, + VT_KEYBIND_SETTINGS = 28 }; const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { return GetPointer(VT_STEAM_VR_TRACKERS); @@ -6856,6 +6866,9 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::HIDSettings *hid_settings() const { return GetPointer(VT_HID_SETTINGS); } + const solarxr_protocol::rpc::KeybindSettings *keybind_settings() const { + return GetPointer(VT_KEYBIND_SETTINGS); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && @@ -6882,6 +6895,8 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { verifier.VerifyTable(stay_aligned()) && VerifyOffset(verifier, VT_HID_SETTINGS) && verifier.VerifyTable(hid_settings()) && + VerifyOffset(verifier, VT_KEYBIND_SETTINGS) && + verifier.VerifyTable(keybind_settings()) && verifier.EndTable(); } }; @@ -6926,6 +6941,9 @@ struct SettingsResponseBuilder { void add_hid_settings(flatbuffers::Offset hid_settings) { fbb_.AddOffset(SettingsResponse::VT_HID_SETTINGS, hid_settings); } + void add_keybind_settings(flatbuffers::Offset keybind_settings) { + fbb_.AddOffset(SettingsResponse::VT_KEYBIND_SETTINGS, keybind_settings); + } explicit SettingsResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -6950,8 +6968,10 @@ inline flatbuffers::Offset CreateSettingsResponse( flatbuffers::Offset auto_bone_settings = 0, flatbuffers::Offset resets_settings = 0, flatbuffers::Offset stay_aligned = 0, - flatbuffers::Offset hid_settings = 0) { + flatbuffers::Offset hid_settings = 0, + flatbuffers::Offset keybind_settings = 0) { SettingsResponseBuilder builder_(_fbb); + builder_.add_keybind_settings(keybind_settings); builder_.add_hid_settings(hid_settings); builder_.add_stay_aligned(stay_aligned); builder_.add_resets_settings(resets_settings); @@ -6981,7 +7001,8 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl VT_AUTO_BONE_SETTINGS = 20, VT_RESETS_SETTINGS = 22, VT_STAY_ALIGNED = 24, - VT_HID_SETTINGS = 26 + VT_HID_SETTINGS = 26, + VT_KEYBIND_SETTINGS = 28 }; const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { return GetPointer(VT_STEAM_VR_TRACKERS); @@ -7019,6 +7040,9 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl const solarxr_protocol::rpc::HIDSettings *hid_settings() const { return GetPointer(VT_HID_SETTINGS); } + const solarxr_protocol::rpc::KeybindSettings *keybind_settings() const { + return GetPointer(VT_KEYBIND_SETTINGS); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && @@ -7045,6 +7069,8 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl verifier.VerifyTable(stay_aligned()) && VerifyOffset(verifier, VT_HID_SETTINGS) && verifier.VerifyTable(hid_settings()) && + VerifyOffset(verifier, VT_KEYBIND_SETTINGS) && + verifier.VerifyTable(keybind_settings()) && verifier.EndTable(); } }; @@ -7089,6 +7115,9 @@ struct ChangeSettingsRequestBuilder { void add_hid_settings(flatbuffers::Offset hid_settings) { fbb_.AddOffset(ChangeSettingsRequest::VT_HID_SETTINGS, hid_settings); } + void add_keybind_settings(flatbuffers::Offset keybind_settings) { + fbb_.AddOffset(ChangeSettingsRequest::VT_KEYBIND_SETTINGS, keybind_settings); + } explicit ChangeSettingsRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -7113,8 +7142,10 @@ inline flatbuffers::Offset CreateChangeSettingsRequest( flatbuffers::Offset auto_bone_settings = 0, flatbuffers::Offset resets_settings = 0, flatbuffers::Offset stay_aligned = 0, - flatbuffers::Offset hid_settings = 0) { + flatbuffers::Offset hid_settings = 0, + flatbuffers::Offset keybind_settings = 0) { ChangeSettingsRequestBuilder builder_(_fbb); + builder_.add_keybind_settings(keybind_settings); builder_.add_hid_settings(hid_settings); builder_.add_stay_aligned(stay_aligned); builder_.add_resets_settings(resets_settings); @@ -8238,6 +8269,173 @@ inline flatbuffers::Offset CreateHIDSettings( return builder_.Finish(); } +struct Key FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeyBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEY = 4 + }; + const flatbuffers::String *key() const { + return GetPointer(VT_KEY); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_KEY) && + verifier.VerifyString(key()) && + verifier.EndTable(); + } +}; + +struct KeyBuilder { + typedef Key Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_key(flatbuffers::Offset key) { + fbb_.AddOffset(Key::VT_KEY, key); + } + explicit KeyBuilder(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 CreateKey( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset key = 0) { + KeyBuilder builder_(_fbb); + builder_.add_key(key); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateKeyDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *key = nullptr) { + auto key__ = key ? _fbb.CreateString(key) : 0; + return solarxr_protocol::rpc::CreateKey( + _fbb, + key__); +} + +struct Keybind FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeybindBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUE = 4 + }; + const flatbuffers::Vector> *value() const { + return GetPointer> *>(VT_VALUE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_VALUE) && + verifier.VerifyVector(value()) && + verifier.VerifyVectorOfTables(value()) && + verifier.EndTable(); + } +}; + +struct KeybindBuilder { + typedef Keybind Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_value(flatbuffers::Offset>> value) { + fbb_.AddOffset(Keybind::VT_VALUE, value); + } + explicit KeybindBuilder(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 CreateKeybind( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> value = 0) { + KeybindBuilder builder_(_fbb); + builder_.add_value(value); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateKeybindDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *value = nullptr) { + auto value__ = value ? _fbb.CreateVector>(*value) : 0; + return solarxr_protocol::rpc::CreateKeybind( + _fbb, + value__); +} + +struct KeybindSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeybindSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NAME = 4, + VT_KEYBIND = 6 + }; + const flatbuffers::String *name() const { + return GetPointer(VT_NAME); + } + const solarxr_protocol::rpc::Keybind *keybind() const { + return GetPointer(VT_KEYBIND); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_KEYBIND) && + verifier.VerifyTable(keybind()) && + verifier.EndTable(); + } +}; + +struct KeybindSettingsBuilder { + typedef KeybindSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(KeybindSettings::VT_NAME, name); + } + void add_keybind(flatbuffers::Offset keybind) { + fbb_.AddOffset(KeybindSettings::VT_KEYBIND, keybind); + } + explicit KeybindSettingsBuilder(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 CreateKeybindSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset name = 0, + flatbuffers::Offset keybind = 0) { + KeybindSettingsBuilder builder_(_fbb); + builder_.add_keybind(keybind); + builder_.add_name(name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateKeybindSettingsDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *name = nullptr, + flatbuffers::Offset keybind = 0) { + auto name__ = name ? _fbb.CreateString(name) : 0; + return solarxr_protocol::rpc::CreateKeybindSettings( + _fbb, + name__, + keybind); +} + /// See TapDetectionSettings::setup_mode struct TapDetectionSetupNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef TapDetectionSetupNotificationBuilder Builder; diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java index f7368dd3..0faa84a9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java @@ -39,6 +39,8 @@ public final class ChangeSettingsRequest extends Table { public solarxr_protocol.rpc.StayAlignedSettings stayAligned(solarxr_protocol.rpc.StayAlignedSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public solarxr_protocol.rpc.HIDSettings hidSettings() { return hidSettings(new solarxr_protocol.rpc.HIDSettings()); } public solarxr_protocol.rpc.HIDSettings hidSettings(solarxr_protocol.rpc.HIDSettings obj) { int o = __offset(26); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.KeybindSettings keybindSettings() { return keybindSettings(new solarxr_protocol.rpc.KeybindSettings()); } + public solarxr_protocol.rpc.KeybindSettings keybindSettings(solarxr_protocol.rpc.KeybindSettings obj) { int o = __offset(28); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createChangeSettingsRequest(FlatBufferBuilder builder, int steamVrTrackersOffset, @@ -52,8 +54,10 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, int autoBoneSettingsOffset, int resetsSettingsOffset, int stayAlignedOffset, - int hidSettingsOffset) { - builder.startTable(12); + int hidSettingsOffset, + int keybindSettingsOffset) { + builder.startTable(13); + ChangeSettingsRequest.addKeybindSettings(builder, keybindSettingsOffset); ChangeSettingsRequest.addHidSettings(builder, hidSettingsOffset); ChangeSettingsRequest.addStayAligned(builder, stayAlignedOffset); ChangeSettingsRequest.addResetsSettings(builder, resetsSettingsOffset); @@ -69,7 +73,7 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, return ChangeSettingsRequest.endChangeSettingsRequest(builder); } - public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(12); } + public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(13); } public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } @@ -82,6 +86,7 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 0); } public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(10, stayAlignedOffset, 0); } public static void addHidSettings(FlatBufferBuilder builder, int hidSettingsOffset) { builder.addOffset(11, hidSettingsOffset, 0); } + public static void addKeybindSettings(FlatBufferBuilder builder, int keybindSettingsOffset) { builder.addOffset(12, keybindSettingsOffset, 0); } public static int endChangeSettingsRequest(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -123,6 +128,8 @@ public void unpackTo(ChangeSettingsRequestT _o) { else _o.setStayAligned(null); if (hidSettings() != null) _o.setHidSettings(hidSettings().unpack()); else _o.setHidSettings(null); + if (keybindSettings() != null) _o.setKeybindSettings(keybindSettings().unpack()); + else _o.setKeybindSettings(null); } public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { if (_o == null) return 0; @@ -138,6 +145,7 @@ public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.rpc.StayAlignedSettings.pack(builder, _o.getStayAligned()); int _hidSettings = _o.getHidSettings() == null ? 0 : solarxr_protocol.rpc.HIDSettings.pack(builder, _o.getHidSettings()); + int _keybindSettings = _o.getKeybindSettings() == null ? 0 : solarxr_protocol.rpc.KeybindSettings.pack(builder, _o.getKeybindSettings()); return createChangeSettingsRequest( builder, _steamVrTrackers, @@ -151,7 +159,8 @@ public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { _autoBoneSettings, _resetsSettings, _stayAligned, - _hidSettings); + _hidSettings, + _keybindSettings); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java index fea6a617..3fbe43c8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java @@ -20,6 +20,7 @@ public class ChangeSettingsRequestT { private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; private solarxr_protocol.rpc.StayAlignedSettingsT stayAligned; private solarxr_protocol.rpc.HIDSettingsT hidSettings; + private solarxr_protocol.rpc.KeybindSettingsT keybindSettings; public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } @@ -69,6 +70,10 @@ public class ChangeSettingsRequestT { public void setHidSettings(solarxr_protocol.rpc.HIDSettingsT hidSettings) { this.hidSettings = hidSettings; } + public solarxr_protocol.rpc.KeybindSettingsT getKeybindSettings() { return keybindSettings; } + + public void setKeybindSettings(solarxr_protocol.rpc.KeybindSettingsT keybindSettings) { this.keybindSettings = keybindSettings; } + public ChangeSettingsRequestT() { this.steamVrTrackers = null; @@ -83,6 +88,7 @@ public ChangeSettingsRequestT() { this.resetsSettings = null; this.stayAligned = null; this.hidSettings = null; + this.keybindSettings = null; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java index d12d1401..1d413c46 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java @@ -39,6 +39,8 @@ public final class SettingsResponse extends Table { public solarxr_protocol.rpc.StayAlignedSettings stayAligned(solarxr_protocol.rpc.StayAlignedSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public solarxr_protocol.rpc.HIDSettings hidSettings() { return hidSettings(new solarxr_protocol.rpc.HIDSettings()); } public solarxr_protocol.rpc.HIDSettings hidSettings(solarxr_protocol.rpc.HIDSettings obj) { int o = __offset(26); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.KeybindSettings keybindSettings() { return keybindSettings(new solarxr_protocol.rpc.KeybindSettings()); } + public solarxr_protocol.rpc.KeybindSettings keybindSettings(solarxr_protocol.rpc.KeybindSettings obj) { int o = __offset(28); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createSettingsResponse(FlatBufferBuilder builder, int steamVrTrackersOffset, @@ -52,8 +54,10 @@ public static int createSettingsResponse(FlatBufferBuilder builder, int autoBoneSettingsOffset, int resetsSettingsOffset, int stayAlignedOffset, - int hidSettingsOffset) { - builder.startTable(12); + int hidSettingsOffset, + int keybindSettingsOffset) { + builder.startTable(13); + SettingsResponse.addKeybindSettings(builder, keybindSettingsOffset); SettingsResponse.addHidSettings(builder, hidSettingsOffset); SettingsResponse.addStayAligned(builder, stayAlignedOffset); SettingsResponse.addResetsSettings(builder, resetsSettingsOffset); @@ -69,7 +73,7 @@ public static int createSettingsResponse(FlatBufferBuilder builder, return SettingsResponse.endSettingsResponse(builder); } - public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(12); } + public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(13); } public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } @@ -82,6 +86,7 @@ public static int createSettingsResponse(FlatBufferBuilder builder, public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 0); } public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(10, stayAlignedOffset, 0); } public static void addHidSettings(FlatBufferBuilder builder, int hidSettingsOffset) { builder.addOffset(11, hidSettingsOffset, 0); } + public static void addKeybindSettings(FlatBufferBuilder builder, int keybindSettingsOffset) { builder.addOffset(12, keybindSettingsOffset, 0); } public static int endSettingsResponse(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -123,6 +128,8 @@ public void unpackTo(SettingsResponseT _o) { else _o.setStayAligned(null); if (hidSettings() != null) _o.setHidSettings(hidSettings().unpack()); else _o.setHidSettings(null); + if (keybindSettings() != null) _o.setKeybindSettings(keybindSettings().unpack()); + else _o.setKeybindSettings(null); } public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { if (_o == null) return 0; @@ -138,6 +145,7 @@ public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.rpc.StayAlignedSettings.pack(builder, _o.getStayAligned()); int _hidSettings = _o.getHidSettings() == null ? 0 : solarxr_protocol.rpc.HIDSettings.pack(builder, _o.getHidSettings()); + int _keybindSettings = _o.getKeybindSettings() == null ? 0 : solarxr_protocol.rpc.KeybindSettings.pack(builder, _o.getKeybindSettings()); return createSettingsResponse( builder, _steamVrTrackers, @@ -151,7 +159,8 @@ public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { _autoBoneSettings, _resetsSettings, _stayAligned, - _hidSettings); + _hidSettings, + _keybindSettings); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java index 11068908..3cd80677 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java @@ -20,6 +20,7 @@ public class SettingsResponseT { private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; private solarxr_protocol.rpc.StayAlignedSettingsT stayAligned; private solarxr_protocol.rpc.HIDSettingsT hidSettings; + private solarxr_protocol.rpc.KeybindSettingsT keybindSettings; public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } @@ -69,6 +70,10 @@ public class SettingsResponseT { public void setHidSettings(solarxr_protocol.rpc.HIDSettingsT hidSettings) { this.hidSettings = hidSettings; } + public solarxr_protocol.rpc.KeybindSettingsT getKeybindSettings() { return keybindSettings; } + + public void setKeybindSettings(solarxr_protocol.rpc.KeybindSettingsT keybindSettings) { this.keybindSettings = keybindSettings; } + public SettingsResponseT() { this.steamVrTrackers = null; @@ -83,6 +88,7 @@ public SettingsResponseT() { this.resetsSettings = null; this.stayAligned = null; this.hidSettings = null; + this.keybindSettings = null; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt index 68967b02..fb52b4e8 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt @@ -124,6 +124,15 @@ class ChangeSettingsRequest : Table() { null } } + val keybindSettings : solarxr_protocol.rpc.KeybindSettings? get() = keybindSettings(solarxr_protocol.rpc.KeybindSettings()) + fun keybindSettings(obj: solarxr_protocol.rpc.KeybindSettings) : solarxr_protocol.rpc.KeybindSettings? { + val o = __offset(28) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -135,8 +144,9 @@ class ChangeSettingsRequest : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int) : Int { - builder.startTable(12) + fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int, keybindSettingsOffset: Int) : Int { + builder.startTable(13) + addKeybindSettings(builder, keybindSettingsOffset) addHidSettings(builder, hidSettingsOffset) addStayAligned(builder, stayAlignedOffset) addResetsSettings(builder, resetsSettingsOffset) @@ -152,7 +162,7 @@ class ChangeSettingsRequest : Table() { return endChangeSettingsRequest(builder) } @JvmStatic - fun startChangeSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(12) + fun startChangeSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(13) @JvmStatic fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) @JvmStatic @@ -178,6 +188,8 @@ class ChangeSettingsRequest : Table() { @JvmStatic fun addHidSettings(builder: FlatBufferBuilder, hidSettings: Int) = builder.addOffset(11, hidSettings, 0) @JvmStatic + fun addKeybindSettings(builder: FlatBufferBuilder, keybindSettings: Int) = builder.addOffset(12, keybindSettings, 0) + @JvmStatic fun endChangeSettingsRequest(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt index 298b69e4..40e9ceda 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt @@ -124,6 +124,15 @@ class SettingsResponse : Table() { null } } + val keybindSettings : solarxr_protocol.rpc.KeybindSettings? get() = keybindSettings(solarxr_protocol.rpc.KeybindSettings()) + fun keybindSettings(obj: solarxr_protocol.rpc.KeybindSettings) : solarxr_protocol.rpc.KeybindSettings? { + val o = __offset(28) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -135,8 +144,9 @@ class SettingsResponse : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int) : Int { - builder.startTable(12) + fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int, keybindSettingsOffset: Int) : Int { + builder.startTable(13) + addKeybindSettings(builder, keybindSettingsOffset) addHidSettings(builder, hidSettingsOffset) addStayAligned(builder, stayAlignedOffset) addResetsSettings(builder, resetsSettingsOffset) @@ -152,7 +162,7 @@ class SettingsResponse : Table() { return endSettingsResponse(builder) } @JvmStatic - fun startSettingsResponse(builder: FlatBufferBuilder) = builder.startTable(12) + fun startSettingsResponse(builder: FlatBufferBuilder) = builder.startTable(13) @JvmStatic fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) @JvmStatic @@ -178,6 +188,8 @@ class SettingsResponse : Table() { @JvmStatic fun addHidSettings(builder: FlatBufferBuilder, hidSettings: Int) = builder.addOffset(11, hidSettings, 0) @JvmStatic + fun addKeybindSettings(builder: FlatBufferBuilder, keybindSettings: Int) = builder.addOffset(12, keybindSettings, 0) + @JvmStatic fun endSettingsResponse(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 a3a27b23..b5033293 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -232,6 +232,12 @@ pub mod solarxr_protocol { pub use self::stay_aligned_settings_generated::*; mod hidsettings_generated; pub use self::hidsettings_generated::*; + mod key_generated; + pub use self::key_generated::*; + mod keybind_generated; + pub use self::keybind_generated::*; + mod keybind_settings_generated; + pub use self::keybind_settings_generated::*; mod tap_detection_setup_notification_generated; pub use self::tap_detection_setup_notification_generated::*; mod record_bvhrequest_generated; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs index fef1cfb8..11f8bc25 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs @@ -37,6 +37,7 @@ impl<'a> ChangeSettingsRequest<'a> { pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 24; pub const VT_HID_SETTINGS: flatbuffers::VOffsetT = 26; + pub const VT_KEYBIND_SETTINGS: flatbuffers::VOffsetT = 28; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -48,6 +49,7 @@ impl<'a> ChangeSettingsRequest<'a> { args: &'args ChangeSettingsRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ChangeSettingsRequestBuilder::new(_fbb); + if let Some(x) = args.keybind_settings { builder.add_keybind_settings(x); } if let Some(x) = args.hid_settings { builder.add_hid_settings(x); } if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.resets_settings { builder.add_resets_settings(x); } @@ -148,6 +150,13 @@ impl<'a> ChangeSettingsRequest<'a> { // which contains a valid value in this slot unsafe { self._tab.get::>(ChangeSettingsRequest::VT_HID_SETTINGS, None)} } + #[inline] + pub fn keybind_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(ChangeSettingsRequest::VT_KEYBIND_SETTINGS, None)} + } } impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { @@ -169,6 +178,7 @@ impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .visit_field::>("hid_settings", Self::VT_HID_SETTINGS, false)? + .visit_field::>("keybind_settings", Self::VT_KEYBIND_SETTINGS, false)? .finish(); Ok(()) } @@ -186,6 +196,7 @@ pub struct ChangeSettingsRequestArgs<'a> { pub resets_settings: Option>>, pub stay_aligned: Option>>, pub hid_settings: Option>>, + pub keybind_settings: Option>>, } impl<'a> Default for ChangeSettingsRequestArgs<'a> { #[inline] @@ -203,6 +214,7 @@ impl<'a> Default for ChangeSettingsRequestArgs<'a> { resets_settings: None, stay_aligned: None, hid_settings: None, + keybind_settings: None, } } } @@ -261,6 +273,10 @@ impl<'a: 'b, 'b> ChangeSettingsRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_HID_SETTINGS, hid_settings); } #[inline] + pub fn add_keybind_settings(&mut self, keybind_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_KEYBIND_SETTINGS, keybind_settings); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSettingsRequestBuilder<'a, 'b> { let start = _fbb.start_table(); ChangeSettingsRequestBuilder { @@ -290,6 +306,7 @@ impl core::fmt::Debug for ChangeSettingsRequest<'_> { ds.field("resets_settings", &self.resets_settings()); ds.field("stay_aligned", &self.stay_aligned()); ds.field("hid_settings", &self.hid_settings()); + ds.field("keybind_settings", &self.keybind_settings()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs index b014c4b8..1a62324f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs @@ -37,6 +37,7 @@ impl<'a> SettingsResponse<'a> { pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 24; pub const VT_HID_SETTINGS: flatbuffers::VOffsetT = 26; + pub const VT_KEYBIND_SETTINGS: flatbuffers::VOffsetT = 28; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -48,6 +49,7 @@ impl<'a> SettingsResponse<'a> { args: &'args SettingsResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SettingsResponseBuilder::new(_fbb); + if let Some(x) = args.keybind_settings { builder.add_keybind_settings(x); } if let Some(x) = args.hid_settings { builder.add_hid_settings(x); } if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.resets_settings { builder.add_resets_settings(x); } @@ -148,6 +150,13 @@ impl<'a> SettingsResponse<'a> { // which contains a valid value in this slot unsafe { self._tab.get::>(SettingsResponse::VT_HID_SETTINGS, None)} } + #[inline] + pub fn keybind_settings(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(SettingsResponse::VT_KEYBIND_SETTINGS, None)} + } } impl flatbuffers::Verifiable for SettingsResponse<'_> { @@ -169,6 +178,7 @@ impl flatbuffers::Verifiable for SettingsResponse<'_> { .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .visit_field::>("hid_settings", Self::VT_HID_SETTINGS, false)? + .visit_field::>("keybind_settings", Self::VT_KEYBIND_SETTINGS, false)? .finish(); Ok(()) } @@ -186,6 +196,7 @@ pub struct SettingsResponseArgs<'a> { pub resets_settings: Option>>, pub stay_aligned: Option>>, pub hid_settings: Option>>, + pub keybind_settings: Option>>, } impl<'a> Default for SettingsResponseArgs<'a> { #[inline] @@ -203,6 +214,7 @@ impl<'a> Default for SettingsResponseArgs<'a> { resets_settings: None, stay_aligned: None, hid_settings: None, + keybind_settings: None, } } } @@ -261,6 +273,10 @@ impl<'a: 'b, 'b> SettingsResponseBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SettingsResponse::VT_HID_SETTINGS, hid_settings); } #[inline] + pub fn add_keybind_settings(&mut self, keybind_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_KEYBIND_SETTINGS, keybind_settings); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsResponseBuilder<'a, 'b> { let start = _fbb.start_table(); SettingsResponseBuilder { @@ -290,6 +306,7 @@ impl core::fmt::Debug for SettingsResponse<'_> { ds.field("resets_settings", &self.resets_settings()); ds.field("stay_aligned", &self.stay_aligned()); ds.field("hid_settings", &self.hid_settings()); + ds.field("keybind_settings", &self.keybind_settings()); ds.finish() } } diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index 1535b09d..27b977b7 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -89,6 +89,9 @@ export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/he export { HeightRequest, HeightRequestT } from './solarxr-protocol/rpc/height-request.js'; export { HeightResponse, HeightResponseT } from './solarxr-protocol/rpc/height-response.js'; export { IgnoreTrackingChecklistStepRequest, IgnoreTrackingChecklistStepRequestT } from './solarxr-protocol/rpc/ignore-tracking-checklist-step-request.js'; +export { Key, KeyT } from './solarxr-protocol/rpc/key.js'; +export { Keybind, KeybindT } from './solarxr-protocol/rpc/keybind.js'; +export { KeybindSettings, KeybindSettingsT } from './solarxr-protocol/rpc/keybind-settings.js'; export { LegTweaksTmpChange, LegTweaksTmpChangeT } from './solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; export { LegTweaksTmpClear, LegTweaksTmpClearT } from './solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; export { MagToggleRequest, MagToggleRequestT } from './solarxr-protocol/rpc/mag-toggle-request.js'; diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts index 27b19d46..89a5bb1d 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts @@ -6,6 +6,7 @@ import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/ import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; import { HIDSettings, HIDSettingsT } from '../../solarxr-protocol/rpc/hidsettings.js'; +import { KeybindSettings, KeybindSettingsT } from '../../solarxr-protocol/rpc/keybind-settings.js'; import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; import { StayAlignedSettings, StayAlignedSettingsT } from '../../solarxr-protocol/rpc/stay-aligned-settings.js'; @@ -94,8 +95,13 @@ hidSettings(obj?:HIDSettings):HIDSettings|null { return offset ? (obj || new HIDSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } +keybindSettings(obj?:KeybindSettings):KeybindSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 28); + return offset ? (obj || new KeybindSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + static startChangeSettingsRequest(builder:flatbuffers.Builder) { - builder.startObject(12); + builder.startObject(13); } static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { @@ -146,6 +152,10 @@ static addHidSettings(builder:flatbuffers.Builder, hidSettingsOffset:flatbuffers builder.addFieldOffset(11, hidSettingsOffset, 0); } +static addKeybindSettings(builder:flatbuffers.Builder, keybindSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(12, keybindSettingsOffset, 0); +} + static endChangeSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -165,7 +175,8 @@ unpack(): ChangeSettingsRequestT { (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null), (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null), - (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null) + (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null), + (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null) ); } @@ -183,6 +194,7 @@ unpackTo(_o: ChangeSettingsRequestT): void { _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); _o.hidSettings = (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null); + _o.keybindSettings = (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null); } } @@ -199,7 +211,8 @@ constructor( public autoBoneSettings: AutoBoneSettingsT|null = null, public resetsSettings: ResetsSettingsT|null = null, public stayAligned: StayAlignedSettingsT|null = null, - public hidSettings: HIDSettingsT|null = null + public hidSettings: HIDSettingsT|null = null, + public keybindSettings: KeybindSettingsT|null = null ){} @@ -216,6 +229,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); const hidSettings = (this.hidSettings !== null ? this.hidSettings!.pack(builder) : 0); + const keybindSettings = (this.keybindSettings !== null ? this.keybindSettings!.pack(builder) : 0); ChangeSettingsRequest.startChangeSettingsRequest(builder); ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); @@ -230,6 +244,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { ChangeSettingsRequest.addResetsSettings(builder, resetsSettings); ChangeSettingsRequest.addStayAligned(builder, stayAligned); ChangeSettingsRequest.addHidSettings(builder, hidSettings); + ChangeSettingsRequest.addKeybindSettings(builder, keybindSettings); return ChangeSettingsRequest.endChangeSettingsRequest(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts index d707cce6..4a4ac1f9 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts @@ -6,6 +6,7 @@ import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/ import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; import { HIDSettings, HIDSettingsT } from '../../solarxr-protocol/rpc/hidsettings.js'; +import { KeybindSettings, KeybindSettingsT } from '../../solarxr-protocol/rpc/keybind-settings.js'; import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; import { StayAlignedSettings, StayAlignedSettingsT } from '../../solarxr-protocol/rpc/stay-aligned-settings.js'; @@ -94,8 +95,13 @@ hidSettings(obj?:HIDSettings):HIDSettings|null { return offset ? (obj || new HIDSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } +keybindSettings(obj?:KeybindSettings):KeybindSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 28); + return offset ? (obj || new KeybindSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + static startSettingsResponse(builder:flatbuffers.Builder) { - builder.startObject(12); + builder.startObject(13); } static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { @@ -146,6 +152,10 @@ static addHidSettings(builder:flatbuffers.Builder, hidSettingsOffset:flatbuffers builder.addFieldOffset(11, hidSettingsOffset, 0); } +static addKeybindSettings(builder:flatbuffers.Builder, keybindSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(12, keybindSettingsOffset, 0); +} + static endSettingsResponse(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -165,7 +175,8 @@ unpack(): SettingsResponseT { (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null), (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null), - (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null) + (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null), + (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null) ); } @@ -183,6 +194,7 @@ unpackTo(_o: SettingsResponseT): void { _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); _o.hidSettings = (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null); + _o.keybindSettings = (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null); } } @@ -199,7 +211,8 @@ constructor( public autoBoneSettings: AutoBoneSettingsT|null = null, public resetsSettings: ResetsSettingsT|null = null, public stayAligned: StayAlignedSettingsT|null = null, - public hidSettings: HIDSettingsT|null = null + public hidSettings: HIDSettingsT|null = null, + public keybindSettings: KeybindSettingsT|null = null ){} @@ -216,6 +229,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); const hidSettings = (this.hidSettings !== null ? this.hidSettings!.pack(builder) : 0); + const keybindSettings = (this.keybindSettings !== null ? this.keybindSettings!.pack(builder) : 0); SettingsResponse.startSettingsResponse(builder); SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); @@ -230,6 +244,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { SettingsResponse.addResetsSettings(builder, resetsSettings); SettingsResponse.addStayAligned(builder, stayAligned); SettingsResponse.addHidSettings(builder, hidSettings); + SettingsResponse.addKeybindSettings(builder, keybindSettings); return SettingsResponse.endSettingsResponse(builder); } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 7582b09a..ab02e169 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -98,6 +98,7 @@ union RpcMessage { UserHeightRecordingStatusResponse } + table RpcMessageHeader { /// For a request, this identifies the request. For a response, this corresponds /// to the request that it is responding to. @@ -172,6 +173,7 @@ table SettingsResponse { resets_settings: ResetsSettings; stay_aligned: StayAlignedSettings; hid_settings: HIDSettings; + keybind_settings: KeybindSettings; } table ChangeSettingsRequest { @@ -187,6 +189,7 @@ table ChangeSettingsRequest { resets_settings: ResetsSettings; stay_aligned: StayAlignedSettings; hid_settings: HIDSettings; + keybind_settings: KeybindSettings; } table SteamVRTrackersSetting { @@ -327,6 +330,28 @@ table HIDSettings { trackersOverHID: bool; } +table Key { + key: string; +} + +table Keybind { + value: [Key]; +} + +table KeybindSettings { + name: string; + keybind: Keybind; +} + +table KeybindSettings { + name: string; + keybind: [Keybind]; +} + +table Keybind { + keybind: string; +} + /// See TapDetectionSettings::setup_mode table TapDetectionSetupNotification { tracker_id: solarxr_protocol.datatypes.TrackerId; From ec472b0fef24833975c60c8e4b8aec58dde69ce7 Mon Sep 17 00:00:00 2001 From: Hannah Lynn Lindrob Date: Thu, 15 Jan 2026 11:53:34 +0100 Subject: [PATCH 2/8] Working on rpc packet for keybind settings --- .../java/src/solarxr_protocol/rpc/Key.java | 59 +++++++++ .../java/src/solarxr_protocol/rpc/KeyT.java | 22 +++ .../src/solarxr_protocol/rpc/Keybind.java | 70 ++++++++++ .../solarxr_protocol/rpc/KeybindSettings.java | 68 ++++++++++ .../rpc/KeybindSettingsT.java | 28 ++++ .../src/solarxr_protocol/rpc/KeybindT.java | 22 +++ .../kotlin/src/solarxr_protocol/rpc/Key.kt | 52 ++++++++ .../src/solarxr_protocol/rpc/Keybind.kt | 68 ++++++++++ .../solarxr_protocol/rpc/KeybindSettings.kt | 64 +++++++++ .../solarxr_protocol/rpc/key_generated.rs | 108 +++++++++++++++ .../solarxr_protocol/rpc/keybind_generated.rs | 108 +++++++++++++++ .../rpc/keybind_settings_generated.rs | 125 ++++++++++++++++++ .../src/solarxr-protocol/rpc/key.ts | 76 +++++++++++ .../solarxr-protocol/rpc/keybind-settings.ts | 87 ++++++++++++ .../src/solarxr-protocol/rpc/keybind.ts | 92 +++++++++++++ 15 files changed, 1049 insertions(+) create mode 100644 protocol/java/src/solarxr_protocol/rpc/Key.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeyT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/Keybind.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindT.java create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/Key.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/key.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/keybind.ts diff --git a/protocol/java/src/solarxr_protocol/rpc/Key.java b/protocol/java/src/solarxr_protocol/rpc/Key.java new file mode 100644 index 00000000..cd5a0120 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/Key.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 Key extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static Key getRootAsKey(ByteBuffer _bb) { return getRootAsKey(_bb, new Key()); } + public static Key getRootAsKey(ByteBuffer _bb, Key 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 Key __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String key() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer keyAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer keyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createKey(FlatBufferBuilder builder, + int keyOffset) { + builder.startTable(1); + Key.addKey(builder, keyOffset); + return Key.endKey(builder); + } + + public static void startKey(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addKey(FlatBufferBuilder builder, int keyOffset) { builder.addOffset(0, keyOffset, 0); } + public static int endKey(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 Key get(int j) { return get(new Key(), j); } + public Key get(Key obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public KeyT unpack() { + KeyT _o = new KeyT(); + unpackTo(_o); + return _o; + } + public void unpackTo(KeyT _o) { + String _oKey = key(); + _o.setKey(_oKey); + } + public static int pack(FlatBufferBuilder builder, KeyT _o) { + if (_o == null) return 0; + int _key = _o.getKey() == null ? 0 : builder.createString(_o.getKey()); + return createKey( + builder, + _key); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeyT.java b/protocol/java/src/solarxr_protocol/rpc/KeyT.java new file mode 100644 index 00000000..f76ea40b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeyT.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 KeyT { + private String key; + + public String getKey() { return key; } + + public void setKey(String key) { this.key = key; } + + + public KeyT() { + this.key = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/Keybind.java b/protocol/java/src/solarxr_protocol/rpc/Keybind.java new file mode 100644 index 00000000..d2895b47 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/Keybind.java @@ -0,0 +1,70 @@ +// 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 Keybind extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static Keybind getRootAsKeybind(ByteBuffer _bb) { return getRootAsKeybind(_bb, new Keybind()); } + public static Keybind getRootAsKeybind(ByteBuffer _bb, Keybind 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 Keybind __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.Key value(int j) { return value(new solarxr_protocol.rpc.Key(), j); } + public solarxr_protocol.rpc.Key value(solarxr_protocol.rpc.Key obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int valueLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.Key.Vector valueVector() { return valueVector(new solarxr_protocol.rpc.Key.Vector()); } + public solarxr_protocol.rpc.Key.Vector valueVector(solarxr_protocol.rpc.Key.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createKeybind(FlatBufferBuilder builder, + int valueOffset) { + builder.startTable(1); + Keybind.addValue(builder, valueOffset); + return Keybind.endKeybind(builder); + } + + public static void startKeybind(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(0, valueOffset, 0); } + public static int createValueVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endKeybind(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 Keybind get(int j) { return get(new Keybind(), j); } + public Keybind get(Keybind obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public KeybindT unpack() { + KeybindT _o = new KeybindT(); + unpackTo(_o); + return _o; + } + public void unpackTo(KeybindT _o) { + solarxr_protocol.rpc.KeyT[] _oValue = new solarxr_protocol.rpc.KeyT[valueLength()]; + for (int _j = 0; _j < valueLength(); ++_j) {_oValue[_j] = (value(_j) != null ? value(_j).unpack() : null);} + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, KeybindT _o) { + if (_o == null) return 0; + int _value = 0; + if (_o.getValue() != null) { + int[] __value = new int[_o.getValue().length]; + int _j = 0; + for (solarxr_protocol.rpc.KeyT _e : _o.getValue()) { __value[_j] = solarxr_protocol.rpc.Key.pack(builder, _e); _j++;} + _value = createValueVector(builder, __value); + } + return createKeybind( + builder, + _value); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java b/protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java new file mode 100644 index 00000000..aeddbd61 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java @@ -0,0 +1,68 @@ +// 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 KeybindSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static KeybindSettings getRootAsKeybindSettings(ByteBuffer _bb) { return getRootAsKeybindSettings(_bb, new KeybindSettings()); } + public static KeybindSettings getRootAsKeybindSettings(ByteBuffer _bb, KeybindSettings 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 KeybindSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public solarxr_protocol.rpc.Keybind keybind() { return keybind(new solarxr_protocol.rpc.Keybind()); } + public solarxr_protocol.rpc.Keybind keybind(solarxr_protocol.rpc.Keybind obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createKeybindSettings(FlatBufferBuilder builder, + int nameOffset, + int keybindOffset) { + builder.startTable(2); + KeybindSettings.addKeybind(builder, keybindOffset); + KeybindSettings.addName(builder, nameOffset); + return KeybindSettings.endKeybindSettings(builder); + } + + public static void startKeybindSettings(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addKeybind(FlatBufferBuilder builder, int keybindOffset) { builder.addOffset(1, keybindOffset, 0); } + public static int endKeybindSettings(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 KeybindSettings get(int j) { return get(new KeybindSettings(), j); } + public KeybindSettings get(KeybindSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public KeybindSettingsT unpack() { + KeybindSettingsT _o = new KeybindSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(KeybindSettingsT _o) { + String _oName = name(); + _o.setName(_oName); + if (keybind() != null) _o.setKeybind(keybind().unpack()); + else _o.setKeybind(null); + } + public static int pack(FlatBufferBuilder builder, KeybindSettingsT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + int _keybind = _o.getKeybind() == null ? 0 : solarxr_protocol.rpc.Keybind.pack(builder, _o.getKeybind()); + return createKeybindSettings( + builder, + _name, + _keybind); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java new file mode 100644 index 00000000..00b36b08 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java @@ -0,0 +1,28 @@ +// 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 KeybindSettingsT { + private String name; + private solarxr_protocol.rpc.KeybindT keybind; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public solarxr_protocol.rpc.KeybindT getKeybind() { return keybind; } + + public void setKeybind(solarxr_protocol.rpc.KeybindT keybind) { this.keybind = keybind; } + + + public KeybindSettingsT() { + this.name = null; + this.keybind = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java new file mode 100644 index 00000000..3932ad69 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindT.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 KeybindT { + private solarxr_protocol.rpc.KeyT[] value; + + public solarxr_protocol.rpc.KeyT[] getValue() { return value; } + + public void setValue(solarxr_protocol.rpc.KeyT[] value) { this.value = value; } + + + public KeybindT() { + this.value = null; + } +} + diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/Key.kt b/protocol/kotlin/src/solarxr_protocol/rpc/Key.kt new file mode 100644 index 00000000..ee2c7ba7 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/Key.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 Key : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Key { + __init(_i, _bb) + return this + } + val key : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val keyAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun keyInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsKey(_bb: ByteBuffer): Key = getRootAsKey(_bb, Key()) + @JvmStatic + fun getRootAsKey(_bb: ByteBuffer, obj: Key): Key { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createKey(builder: FlatBufferBuilder, keyOffset: Int) : Int { + builder.startTable(1) + addKey(builder, keyOffset) + return endKey(builder) + } + @JvmStatic + fun startKey(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addKey(builder: FlatBufferBuilder, key: Int) = builder.addOffset(0, key, 0) + @JvmStatic + fun endKey(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt new file mode 100644 index 00000000..ac5ff1d4 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt @@ -0,0 +1,68 @@ +// 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 Keybind : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : Keybind { + __init(_i, _bb) + return this + } + fun value(j: Int) : solarxr_protocol.rpc.Key? = value(solarxr_protocol.rpc.Key(), j) + fun value(obj: solarxr_protocol.rpc.Key, j: Int) : solarxr_protocol.rpc.Key? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val valueLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsKeybind(_bb: ByteBuffer): Keybind = getRootAsKeybind(_bb, Keybind()) + @JvmStatic + fun getRootAsKeybind(_bb: ByteBuffer, obj: Keybind): Keybind { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createKeybind(builder: FlatBufferBuilder, valueOffset: Int) : Int { + builder.startTable(1) + addValue(builder, valueOffset) + return endKeybind(builder) + } + @JvmStatic + fun startKeybind(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addValue(builder: FlatBufferBuilder, value: Int) = builder.addOffset(0, value, 0) + @JvmStatic + fun createValueVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startValueVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endKeybind(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt new file mode 100644 index 00000000..de81dbfb --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt @@ -0,0 +1,64 @@ +// 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 KeybindSettings : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : KeybindSettings { + __init(_i, _bb) + return this + } + val name : String? + get() { + val o = __offset(4) + return if (o != 0) __string(o + bb_pos) else null + } + val nameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) + fun nameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) + val keybind : solarxr_protocol.rpc.Keybind? get() = keybind(solarxr_protocol.rpc.Keybind()) + fun keybind(obj: solarxr_protocol.rpc.Keybind) : solarxr_protocol.rpc.Keybind? { + val o = __offset(6) + return if (o != 0) { + obj.__assign(__indirect(o + bb_pos), bb) + } else { + null + } + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsKeybindSettings(_bb: ByteBuffer): KeybindSettings = getRootAsKeybindSettings(_bb, KeybindSettings()) + @JvmStatic + fun getRootAsKeybindSettings(_bb: ByteBuffer, obj: KeybindSettings): KeybindSettings { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createKeybindSettings(builder: FlatBufferBuilder, nameOffset: Int, keybindOffset: Int) : Int { + builder.startTable(2) + addKeybind(builder, keybindOffset) + addName(builder, nameOffset) + return endKeybindSettings(builder) + } + @JvmStatic + fun startKeybindSettings(builder: FlatBufferBuilder) = builder.startTable(2) + @JvmStatic + fun addName(builder: FlatBufferBuilder, name: Int) = builder.addOffset(0, name, 0) + @JvmStatic + fun addKeybind(builder: FlatBufferBuilder, keybind: Int) = builder.addOffset(1, keybind, 0) + @JvmStatic + fun endKeybindSettings(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs new file mode 100644 index 00000000..ffb5c41d --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/key_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 KeyOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct Key<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for Key<'a> { + type Inner = Key<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> Key<'a> { + pub const VT_KEY: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + Key { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args KeyArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = KeyBuilder::new(_fbb); + if let Some(x) = args.key { builder.add_key(x); } + builder.finish() + } + + + #[inline] + pub fn key(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Key::VT_KEY, None)} + } +} + +impl flatbuffers::Verifiable for Key<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("key", Self::VT_KEY, false)? + .finish(); + Ok(()) + } +} +pub struct KeyArgs<'a> { + pub key: Option>, +} +impl<'a> Default for KeyArgs<'a> { + #[inline] + fn default() -> Self { + KeyArgs { + key: None, + } + } +} + +pub struct KeyBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> KeyBuilder<'a, 'b> { + #[inline] + pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(Key::VT_KEY, key); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeyBuilder<'a, 'b> { + let start = _fbb.start_table(); + KeyBuilder { + 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 Key<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("Key"); + ds.field("key", &self.key()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs new file mode 100644 index 00000000..d4fa2ac2 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_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 KeybindOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct Keybind<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for Keybind<'a> { + type Inner = Keybind<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> Keybind<'a> { + pub const VT_VALUE: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + Keybind { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args KeybindArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = KeybindBuilder::new(_fbb); + if let Some(x) = args.value { builder.add_value(x); } + builder.finish() + } + + + #[inline] + pub fn value(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(Keybind::VT_VALUE, None)} + } +} + +impl flatbuffers::Verifiable for Keybind<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("value", Self::VT_VALUE, false)? + .finish(); + Ok(()) + } +} +pub struct KeybindArgs<'a> { + pub value: Option>>>>, +} +impl<'a> Default for KeybindArgs<'a> { + #[inline] + fn default() -> Self { + KeybindArgs { + value: None, + } + } +} + +pub struct KeybindBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> KeybindBuilder<'a, 'b> { + #[inline] + pub fn add_value(&mut self, value: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(Keybind::VT_VALUE, value); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindBuilder<'a, 'b> { + let start = _fbb.start_table(); + KeybindBuilder { + 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 Keybind<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("Keybind"); + ds.field("value", &self.value()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs new file mode 100644 index 00000000..012cbf50 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs @@ -0,0 +1,125 @@ +// 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 KeybindSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct KeybindSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for KeybindSettings<'a> { + type Inner = KeybindSettings<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> KeybindSettings<'a> { + pub const VT_NAME: flatbuffers::VOffsetT = 4; + pub const VT_KEYBIND: flatbuffers::VOffsetT = 6; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + KeybindSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args KeybindSettingsArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = KeybindSettingsBuilder::new(_fbb); + if let Some(x) = args.keybind { builder.add_keybind(x); } + if let Some(x) = args.name { builder.add_name(x); } + builder.finish() + } + + + #[inline] + pub fn name(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(KeybindSettings::VT_NAME, None)} + } + #[inline] + pub fn keybind(&self) -> Option> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(KeybindSettings::VT_KEYBIND, None)} + } +} + +impl flatbuffers::Verifiable for KeybindSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("name", Self::VT_NAME, false)? + .visit_field::>("keybind", Self::VT_KEYBIND, false)? + .finish(); + Ok(()) + } +} +pub struct KeybindSettingsArgs<'a> { + pub name: Option>, + pub keybind: Option>>, +} +impl<'a> Default for KeybindSettingsArgs<'a> { + #[inline] + fn default() -> Self { + KeybindSettingsArgs { + name: None, + keybind: None, + } + } +} + +pub struct KeybindSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> KeybindSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(KeybindSettings::VT_NAME, name); + } + #[inline] + pub fn add_keybind(&mut self, keybind: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(KeybindSettings::VT_KEYBIND, keybind); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + KeybindSettingsBuilder { + 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 KeybindSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("KeybindSettings"); + ds.field("name", &self.name()); + ds.field("keybind", &self.keybind()); + ds.finish() + } +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/key.ts b/protocol/typescript/src/solarxr-protocol/rpc/key.ts new file mode 100644 index 00000000..6162444a --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/key.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class Key implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):Key { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsKey(bb:flatbuffers.ByteBuffer, obj?:Key):Key { + return (obj || new Key()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsKey(bb:flatbuffers.ByteBuffer, obj?:Key):Key { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new Key()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +key():string|null +key(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +key(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 startKey(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, keyOffset, 0); +} + +static endKey(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset):flatbuffers.Offset { + Key.startKey(builder); + Key.addKey(builder, keyOffset); + return Key.endKey(builder); +} + +unpack(): KeyT { + return new KeyT( + this.key() + ); +} + + +unpackTo(_o: KeyT): void { + _o.key = this.key(); +} +} + +export class KeyT implements flatbuffers.IGeneratedObject { +constructor( + public key: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const key = (this.key !== null ? builder.createString(this.key!) : 0); + + return Key.createKey(builder, + key + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts new file mode 100644 index 00000000..f8e2434d --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts @@ -0,0 +1,87 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Keybind, KeybindT } from '../../solarxr-protocol/rpc/keybind.js'; + + +export class KeybindSettings implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):KeybindSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsKeybindSettings(bb:flatbuffers.ByteBuffer, obj?:KeybindSettings):KeybindSettings { + return (obj || new KeybindSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsKeybindSettings(bb:flatbuffers.ByteBuffer, obj?:KeybindSettings):KeybindSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new KeybindSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +name():string|null +name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +name(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; +} + +keybind(obj?:Keybind):Keybind|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new Keybind()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startKeybindSettings(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, nameOffset, 0); +} + +static addKeybind(builder:flatbuffers.Builder, keybindOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, keybindOffset, 0); +} + +static endKeybindSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): KeybindSettingsT { + return new KeybindSettingsT( + this.name(), + (this.keybind() !== null ? this.keybind()!.unpack() : null) + ); +} + + +unpackTo(_o: KeybindSettingsT): void { + _o.name = this.name(); + _o.keybind = (this.keybind() !== null ? this.keybind()!.unpack() : null); +} +} + +export class KeybindSettingsT implements flatbuffers.IGeneratedObject { +constructor( + public name: string|Uint8Array|null = null, + public keybind: KeybindT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const name = (this.name !== null ? builder.createString(this.name!) : 0); + const keybind = (this.keybind !== null ? this.keybind!.pack(builder) : 0); + + KeybindSettings.startKeybindSettings(builder); + KeybindSettings.addName(builder, name); + KeybindSettings.addKeybind(builder, keybind); + + return KeybindSettings.endKeybindSettings(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts new file mode 100644 index 00000000..c0f454fb --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts @@ -0,0 +1,92 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Key, KeyT } from '../../solarxr-protocol/rpc/key.js'; + + +export class Keybind implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):Keybind { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsKeybind(bb:flatbuffers.ByteBuffer, obj?:Keybind):Keybind { + return (obj || new Keybind()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsKeybind(bb:flatbuffers.ByteBuffer, obj?:Keybind):Keybind { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new Keybind()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +value(index: number, obj?:Key):Key|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new Key()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +valueLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startKeybind(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, valueOffset, 0); +} + +static createValueVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]!); + } + return builder.endVector(); +} + +static startValueVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createKeybind(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset):flatbuffers.Offset { + Keybind.startKeybind(builder); + Keybind.addValue(builder, valueOffset); + return Keybind.endKeybind(builder); +} + +unpack(): KeybindT { + return new KeybindT( + this.bb!.createObjList(this.value.bind(this), this.valueLength()) + ); +} + + +unpackTo(_o: KeybindT): void { + _o.value = this.bb!.createObjList(this.value.bind(this), this.valueLength()); +} +} + +export class KeybindT implements flatbuffers.IGeneratedObject { +constructor( + public value: (KeyT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const value = Keybind.createValueVector(builder, builder.createObjectOffsetList(this.value)); + + return Keybind.createKeybind(builder, + value + ); +} +} From c00e106072b9e513e5de13b6fb97068c81ac4a87 Mon Sep 17 00:00:00 2001 From: Hannah Lynn Lindrob Date: Fri, 16 Jan 2026 14:24:34 +0100 Subject: [PATCH 3/8] Working on keybindhandler --- .../generated/all_generated.h | 453 ++++++++++-------- .../rpc/ChangeSettingsRequest.java | 17 +- .../rpc/ChangeSettingsRequestT.java | 6 - .../java/src/solarxr_protocol/rpc/Key.java | 59 --- .../java/src/solarxr_protocol/rpc/KeyT.java | 22 - .../src/solarxr_protocol/rpc/Keybind.java | 45 +- .../solarxr_protocol/rpc/KeybindSettings.java | 68 --- .../rpc/KeybindSettingsT.java | 28 -- .../src/solarxr_protocol/rpc/KeybindT.java | 18 +- .../src/solarxr_protocol/rpc/RpcMessage.java | 4 +- .../rpc/RpcMessageHeader.java | 8 + .../solarxr_protocol/rpc/RpcMessageUnion.java | 4 + .../rpc/SettingsResponse.java | 17 +- .../rpc/SettingsResponseT.java | 6 - .../rpc/ChangeSettingsRequest.kt | 18 +- .../kotlin/src/solarxr_protocol/rpc/Key.kt | 52 -- .../src/solarxr_protocol/rpc/Keybind.kt | 44 +- .../solarxr_protocol/rpc/KeybindSettings.kt | 64 --- .../src/solarxr_protocol/rpc/RpcMessage.kt | 4 +- .../solarxr_protocol/rpc/SettingsResponse.kt | 18 +- protocol/rust/src/generated/mod.rs | 14 +- .../rpc/change_settings_request_generated.rs | 17 - .../solarxr_protocol/rpc/key_generated.rs | 108 ----- .../solarxr_protocol/rpc/keybind_generated.rs | 46 +- .../rpc/keybind_settings_generated.rs | 125 ----- .../rpc/rpc_message_generated.rs | 14 +- .../rpc/rpc_message_header_generated.rs | 46 ++ .../rpc/settings_response_generated.rs | 17 - protocol/typescript/src/all_generated.ts | 5 +- .../rpc/change-settings-request.ts | 21 +- .../src/solarxr-protocol/rpc/key.ts | 76 --- .../solarxr-protocol/rpc/keybind-settings.ts | 87 ---- .../src/solarxr-protocol/rpc/keybind.ts | 59 ++- .../rpc/rpc-message-header.ts | 4 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 18 +- .../solarxr-protocol/rpc/settings-response.ts | 21 +- schema/rpc.fbs | 47 +- 37 files changed, 528 insertions(+), 1152 deletions(-) delete mode 100644 protocol/java/src/solarxr_protocol/rpc/Key.java delete mode 100644 protocol/java/src/solarxr_protocol/rpc/KeyT.java delete mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java delete mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java delete mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/Key.kt delete mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt delete mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs delete mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs delete mode 100644 protocol/typescript/src/solarxr-protocol/rpc/key.ts delete mode 100644 protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index d88b9369..c2e34601 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -146,6 +146,15 @@ struct ModelSettingsBuilder; } // namespace settings +struct Keybind; +struct KeybindBuilder; + +struct KeybindRequest; +struct KeybindRequestBuilder; + +struct KeybindResponse; +struct KeybindResponseBuilder; + struct RpcMessageHeader; struct RpcMessageHeaderBuilder; @@ -212,15 +221,6 @@ struct StayAlignedSettingsBuilder; struct HIDSettings; struct HIDSettingsBuilder; -struct Key; -struct KeyBuilder; - -struct Keybind; -struct KeybindBuilder; - -struct KeybindSettings; -struct KeybindSettingsBuilder; - struct TapDetectionSetupNotification; struct TapDetectionSetupNotificationBuilder; @@ -1383,11 +1383,13 @@ enum class RpcMessage : uint8_t { StartUserHeightCalibration = 76, CancelUserHeightCalibration = 77, UserHeightRecordingStatusResponse = 78, + KeybindRequest = 79, + KeybindResponse = 80, MIN = NONE, - MAX = UserHeightRecordingStatusResponse + MAX = KeybindResponse }; -inline const RpcMessage (&EnumValuesRpcMessage())[79] { +inline const RpcMessage (&EnumValuesRpcMessage())[81] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -1467,13 +1469,15 @@ inline const RpcMessage (&EnumValuesRpcMessage())[79] { RpcMessage::IgnoreTrackingChecklistStepRequest, RpcMessage::StartUserHeightCalibration, RpcMessage::CancelUserHeightCalibration, - RpcMessage::UserHeightRecordingStatusResponse + RpcMessage::UserHeightRecordingStatusResponse, + RpcMessage::KeybindRequest, + RpcMessage::KeybindResponse }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[80] = { + static const char * const names[82] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -1553,13 +1557,15 @@ inline const char * const *EnumNamesRpcMessage() { "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", + "KeybindRequest", + "KeybindResponse", nullptr }; return names; } inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::UserHeightRecordingStatusResponse)) return ""; + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::KeybindResponse)) return ""; const size_t index = static_cast(e); return EnumNamesRpcMessage()[index]; } @@ -1880,9 +1886,53 @@ template<> struct RpcMessageTraits struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::KeybindRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::KeybindResponse; +}; + bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); +enum class KeybindName : uint8_t { + FULL_RESET = 0, + YAW_RESET = 1, + MOUNTING_RESET = 2, + PAUSE_TRACKING = 3, + MIN = FULL_RESET, + MAX = PAUSE_TRACKING +}; + +inline const KeybindName (&EnumValuesKeybindName())[4] { + static const KeybindName values[] = { + KeybindName::FULL_RESET, + KeybindName::YAW_RESET, + KeybindName::MOUNTING_RESET, + KeybindName::PAUSE_TRACKING + }; + return values; +} + +inline const char * const *EnumNamesKeybindName() { + static const char * const names[5] = { + "FULL_RESET", + "YAW_RESET", + "MOUNTING_RESET", + "PAUSE_TRACKING", + nullptr + }; + return names; +} + +inline const char *EnumNameKeybindName(KeybindName e) { + if (flatbuffers::IsOutRange(e, KeybindName::FULL_RESET, KeybindName::PAUSE_TRACKING)) return ""; + const size_t index = static_cast(e); + return EnumNamesKeybindName()[index]; +} + enum class ResetType : uint8_t { Yaw = 0, Full = 1, @@ -5819,6 +5869,162 @@ inline flatbuffers::Offset CreateModelSettings( } // namespace settings +struct Keybind FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeybindBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEYBIND_NAME = 4, + VT_VALUE = 6, + VT_DELAY = 8 + }; + solarxr_protocol::rpc::KeybindName keybind_name() const { + return static_cast(GetField(VT_KEYBIND_NAME, 0)); + } + const flatbuffers::String *value() const { + return GetPointer(VT_VALUE); + } + int64_t delay() const { + return GetField(VT_DELAY, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_KEYBIND_NAME, 1) && + VerifyOffset(verifier, VT_VALUE) && + verifier.VerifyString(value()) && + VerifyField(verifier, VT_DELAY, 8) && + verifier.EndTable(); + } +}; + +struct KeybindBuilder { + typedef Keybind Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_keybind_name(solarxr_protocol::rpc::KeybindName keybind_name) { + fbb_.AddElement(Keybind::VT_KEYBIND_NAME, static_cast(keybind_name), 0); + } + void add_value(flatbuffers::Offset value) { + fbb_.AddOffset(Keybind::VT_VALUE, value); + } + void add_delay(int64_t delay) { + fbb_.AddElement(Keybind::VT_DELAY, delay, 0); + } + explicit KeybindBuilder(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 CreateKeybind( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET, + flatbuffers::Offset value = 0, + int64_t delay = 0) { + KeybindBuilder builder_(_fbb); + builder_.add_delay(delay); + builder_.add_value(value); + builder_.add_keybind_name(keybind_name); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateKeybindDirect( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET, + const char *value = nullptr, + int64_t delay = 0) { + auto value__ = value ? _fbb.CreateString(value) : 0; + return solarxr_protocol::rpc::CreateKeybind( + _fbb, + keybind_name, + value__, + delay); +} + +struct KeybindRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeybindRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct KeybindRequestBuilder { + typedef KeybindRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit KeybindRequestBuilder(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 CreateKeybindRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + KeybindRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct KeybindResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeybindResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEYBINDS = 4 + }; + const flatbuffers::Vector> *keybinds() const { + return GetPointer> *>(VT_KEYBINDS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_KEYBINDS) && + verifier.VerifyVector(keybinds()) && + verifier.VerifyVectorOfTables(keybinds()) && + verifier.EndTable(); + } +}; + +struct KeybindResponseBuilder { + typedef KeybindResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_keybinds(flatbuffers::Offset>> keybinds) { + fbb_.AddOffset(KeybindResponse::VT_KEYBINDS, keybinds); + } + explicit KeybindResponseBuilder(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 CreateKeybindResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> keybinds = 0) { + KeybindResponseBuilder builder_(_fbb); + builder_.add_keybinds(keybinds); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateKeybindResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *keybinds = nullptr) { + auto keybinds__ = keybinds ? _fbb.CreateVector>(*keybinds) : 0; + return solarxr_protocol::rpc::CreateKeybindResponse( + _fbb, + keybinds__); +} + struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef RpcMessageHeaderBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { @@ -6072,6 +6278,12 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::UserHeightRecordingStatusResponse *message_as_UserHeightRecordingStatusResponse() const { return message_type() == solarxr_protocol::rpc::RpcMessage::UserHeightRecordingStatusResponse ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::KeybindRequest *message_as_KeybindRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::KeybindRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::KeybindResponse *message_as_KeybindResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::KeybindResponse ? static_cast(message()) : nullptr; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TX_ID, 4) && @@ -6394,6 +6606,14 @@ template<> inline const solarxr_protocol::rpc::UserHeightRecordingStatusResponse return message_as_UserHeightRecordingStatusResponse(); } +template<> inline const solarxr_protocol::rpc::KeybindRequest *RpcMessageHeader::message_as() const { + return message_as_KeybindRequest(); +} + +template<> inline const solarxr_protocol::rpc::KeybindResponse *RpcMessageHeader::message_as() const { + return message_as_KeybindResponse(); +} + struct RpcMessageHeaderBuilder { typedef RpcMessageHeader Table; flatbuffers::FlatBufferBuilder &fbb_; @@ -6827,8 +7047,7 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_AUTO_BONE_SETTINGS = 20, VT_RESETS_SETTINGS = 22, VT_STAY_ALIGNED = 24, - VT_HID_SETTINGS = 26, - VT_KEYBIND_SETTINGS = 28 + VT_HID_SETTINGS = 26 }; const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { return GetPointer(VT_STEAM_VR_TRACKERS); @@ -6866,9 +7085,6 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::HIDSettings *hid_settings() const { return GetPointer(VT_HID_SETTINGS); } - const solarxr_protocol::rpc::KeybindSettings *keybind_settings() const { - return GetPointer(VT_KEYBIND_SETTINGS); - } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && @@ -6895,8 +7111,6 @@ struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { verifier.VerifyTable(stay_aligned()) && VerifyOffset(verifier, VT_HID_SETTINGS) && verifier.VerifyTable(hid_settings()) && - VerifyOffset(verifier, VT_KEYBIND_SETTINGS) && - verifier.VerifyTable(keybind_settings()) && verifier.EndTable(); } }; @@ -6941,9 +7155,6 @@ struct SettingsResponseBuilder { void add_hid_settings(flatbuffers::Offset hid_settings) { fbb_.AddOffset(SettingsResponse::VT_HID_SETTINGS, hid_settings); } - void add_keybind_settings(flatbuffers::Offset keybind_settings) { - fbb_.AddOffset(SettingsResponse::VT_KEYBIND_SETTINGS, keybind_settings); - } explicit SettingsResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -6968,10 +7179,8 @@ inline flatbuffers::Offset CreateSettingsResponse( flatbuffers::Offset auto_bone_settings = 0, flatbuffers::Offset resets_settings = 0, flatbuffers::Offset stay_aligned = 0, - flatbuffers::Offset hid_settings = 0, - flatbuffers::Offset keybind_settings = 0) { + flatbuffers::Offset hid_settings = 0) { SettingsResponseBuilder builder_(_fbb); - builder_.add_keybind_settings(keybind_settings); builder_.add_hid_settings(hid_settings); builder_.add_stay_aligned(stay_aligned); builder_.add_resets_settings(resets_settings); @@ -7001,8 +7210,7 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl VT_AUTO_BONE_SETTINGS = 20, VT_RESETS_SETTINGS = 22, VT_STAY_ALIGNED = 24, - VT_HID_SETTINGS = 26, - VT_KEYBIND_SETTINGS = 28 + VT_HID_SETTINGS = 26 }; const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { return GetPointer(VT_STEAM_VR_TRACKERS); @@ -7040,9 +7248,6 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl const solarxr_protocol::rpc::HIDSettings *hid_settings() const { return GetPointer(VT_HID_SETTINGS); } - const solarxr_protocol::rpc::KeybindSettings *keybind_settings() const { - return GetPointer(VT_KEYBIND_SETTINGS); - } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && @@ -7069,8 +7274,6 @@ struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl verifier.VerifyTable(stay_aligned()) && VerifyOffset(verifier, VT_HID_SETTINGS) && verifier.VerifyTable(hid_settings()) && - VerifyOffset(verifier, VT_KEYBIND_SETTINGS) && - verifier.VerifyTable(keybind_settings()) && verifier.EndTable(); } }; @@ -7115,9 +7318,6 @@ struct ChangeSettingsRequestBuilder { void add_hid_settings(flatbuffers::Offset hid_settings) { fbb_.AddOffset(ChangeSettingsRequest::VT_HID_SETTINGS, hid_settings); } - void add_keybind_settings(flatbuffers::Offset keybind_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_KEYBIND_SETTINGS, keybind_settings); - } explicit ChangeSettingsRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -7142,10 +7342,8 @@ inline flatbuffers::Offset CreateChangeSettingsRequest( flatbuffers::Offset auto_bone_settings = 0, flatbuffers::Offset resets_settings = 0, flatbuffers::Offset stay_aligned = 0, - flatbuffers::Offset hid_settings = 0, - flatbuffers::Offset keybind_settings = 0) { + flatbuffers::Offset hid_settings = 0) { ChangeSettingsRequestBuilder builder_(_fbb); - builder_.add_keybind_settings(keybind_settings); builder_.add_hid_settings(hid_settings); builder_.add_stay_aligned(stay_aligned); builder_.add_resets_settings(resets_settings); @@ -8269,173 +8467,6 @@ inline flatbuffers::Offset CreateHIDSettings( return builder_.Finish(); } -struct Key FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef KeyBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_KEY = 4 - }; - const flatbuffers::String *key() const { - return GetPointer(VT_KEY); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_KEY) && - verifier.VerifyString(key()) && - verifier.EndTable(); - } -}; - -struct KeyBuilder { - typedef Key Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_key(flatbuffers::Offset key) { - fbb_.AddOffset(Key::VT_KEY, key); - } - explicit KeyBuilder(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 CreateKey( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset key = 0) { - KeyBuilder builder_(_fbb); - builder_.add_key(key); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateKeyDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *key = nullptr) { - auto key__ = key ? _fbb.CreateString(key) : 0; - return solarxr_protocol::rpc::CreateKey( - _fbb, - key__); -} - -struct Keybind FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef KeybindBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_VALUE = 4 - }; - const flatbuffers::Vector> *value() const { - return GetPointer> *>(VT_VALUE); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_VALUE) && - verifier.VerifyVector(value()) && - verifier.VerifyVectorOfTables(value()) && - verifier.EndTable(); - } -}; - -struct KeybindBuilder { - typedef Keybind Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_value(flatbuffers::Offset>> value) { - fbb_.AddOffset(Keybind::VT_VALUE, value); - } - explicit KeybindBuilder(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 CreateKeybind( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> value = 0) { - KeybindBuilder builder_(_fbb); - builder_.add_value(value); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateKeybindDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *value = nullptr) { - auto value__ = value ? _fbb.CreateVector>(*value) : 0; - return solarxr_protocol::rpc::CreateKeybind( - _fbb, - value__); -} - -struct KeybindSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef KeybindSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_NAME = 4, - VT_KEYBIND = 6 - }; - const flatbuffers::String *name() const { - return GetPointer(VT_NAME); - } - const solarxr_protocol::rpc::Keybind *keybind() const { - return GetPointer(VT_KEYBIND); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_NAME) && - verifier.VerifyString(name()) && - VerifyOffset(verifier, VT_KEYBIND) && - verifier.VerifyTable(keybind()) && - verifier.EndTable(); - } -}; - -struct KeybindSettingsBuilder { - typedef KeybindSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_name(flatbuffers::Offset name) { - fbb_.AddOffset(KeybindSettings::VT_NAME, name); - } - void add_keybind(flatbuffers::Offset keybind) { - fbb_.AddOffset(KeybindSettings::VT_KEYBIND, keybind); - } - explicit KeybindSettingsBuilder(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 CreateKeybindSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset name = 0, - flatbuffers::Offset keybind = 0) { - KeybindSettingsBuilder builder_(_fbb); - builder_.add_keybind(keybind); - builder_.add_name(name); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateKeybindSettingsDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *name = nullptr, - flatbuffers::Offset keybind = 0) { - auto name__ = name ? _fbb.CreateString(name) : 0; - return solarxr_protocol::rpc::CreateKeybindSettings( - _fbb, - name__, - keybind); -} - /// See TapDetectionSettings::setup_mode struct TapDetectionSetupNotification FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef TapDetectionSetupNotificationBuilder Builder; @@ -14648,6 +14679,14 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::KeybindRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::KeybindResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } default: return true; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java index 0faa84a9..f7368dd3 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java @@ -39,8 +39,6 @@ public final class ChangeSettingsRequest extends Table { public solarxr_protocol.rpc.StayAlignedSettings stayAligned(solarxr_protocol.rpc.StayAlignedSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public solarxr_protocol.rpc.HIDSettings hidSettings() { return hidSettings(new solarxr_protocol.rpc.HIDSettings()); } public solarxr_protocol.rpc.HIDSettings hidSettings(solarxr_protocol.rpc.HIDSettings obj) { int o = __offset(26); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.KeybindSettings keybindSettings() { return keybindSettings(new solarxr_protocol.rpc.KeybindSettings()); } - public solarxr_protocol.rpc.KeybindSettings keybindSettings(solarxr_protocol.rpc.KeybindSettings obj) { int o = __offset(28); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createChangeSettingsRequest(FlatBufferBuilder builder, int steamVrTrackersOffset, @@ -54,10 +52,8 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, int autoBoneSettingsOffset, int resetsSettingsOffset, int stayAlignedOffset, - int hidSettingsOffset, - int keybindSettingsOffset) { - builder.startTable(13); - ChangeSettingsRequest.addKeybindSettings(builder, keybindSettingsOffset); + int hidSettingsOffset) { + builder.startTable(12); ChangeSettingsRequest.addHidSettings(builder, hidSettingsOffset); ChangeSettingsRequest.addStayAligned(builder, stayAlignedOffset); ChangeSettingsRequest.addResetsSettings(builder, resetsSettingsOffset); @@ -73,7 +69,7 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, return ChangeSettingsRequest.endChangeSettingsRequest(builder); } - public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(13); } + public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(12); } public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } @@ -86,7 +82,6 @@ public static int createChangeSettingsRequest(FlatBufferBuilder builder, public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 0); } public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(10, stayAlignedOffset, 0); } public static void addHidSettings(FlatBufferBuilder builder, int hidSettingsOffset) { builder.addOffset(11, hidSettingsOffset, 0); } - public static void addKeybindSettings(FlatBufferBuilder builder, int keybindSettingsOffset) { builder.addOffset(12, keybindSettingsOffset, 0); } public static int endChangeSettingsRequest(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -128,8 +123,6 @@ public void unpackTo(ChangeSettingsRequestT _o) { else _o.setStayAligned(null); if (hidSettings() != null) _o.setHidSettings(hidSettings().unpack()); else _o.setHidSettings(null); - if (keybindSettings() != null) _o.setKeybindSettings(keybindSettings().unpack()); - else _o.setKeybindSettings(null); } public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { if (_o == null) return 0; @@ -145,7 +138,6 @@ public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.rpc.StayAlignedSettings.pack(builder, _o.getStayAligned()); int _hidSettings = _o.getHidSettings() == null ? 0 : solarxr_protocol.rpc.HIDSettings.pack(builder, _o.getHidSettings()); - int _keybindSettings = _o.getKeybindSettings() == null ? 0 : solarxr_protocol.rpc.KeybindSettings.pack(builder, _o.getKeybindSettings()); return createChangeSettingsRequest( builder, _steamVrTrackers, @@ -159,8 +151,7 @@ public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { _autoBoneSettings, _resetsSettings, _stayAligned, - _hidSettings, - _keybindSettings); + _hidSettings); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java index 3fbe43c8..fea6a617 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java @@ -20,7 +20,6 @@ public class ChangeSettingsRequestT { private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; private solarxr_protocol.rpc.StayAlignedSettingsT stayAligned; private solarxr_protocol.rpc.HIDSettingsT hidSettings; - private solarxr_protocol.rpc.KeybindSettingsT keybindSettings; public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } @@ -70,10 +69,6 @@ public class ChangeSettingsRequestT { public void setHidSettings(solarxr_protocol.rpc.HIDSettingsT hidSettings) { this.hidSettings = hidSettings; } - public solarxr_protocol.rpc.KeybindSettingsT getKeybindSettings() { return keybindSettings; } - - public void setKeybindSettings(solarxr_protocol.rpc.KeybindSettingsT keybindSettings) { this.keybindSettings = keybindSettings; } - public ChangeSettingsRequestT() { this.steamVrTrackers = null; @@ -88,7 +83,6 @@ public ChangeSettingsRequestT() { this.resetsSettings = null; this.stayAligned = null; this.hidSettings = null; - this.keybindSettings = null; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/Key.java b/protocol/java/src/solarxr_protocol/rpc/Key.java deleted file mode 100644 index cd5a0120..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/Key.java +++ /dev/null @@ -1,59 +0,0 @@ -// 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 Key extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static Key getRootAsKey(ByteBuffer _bb) { return getRootAsKey(_bb, new Key()); } - public static Key getRootAsKey(ByteBuffer _bb, Key 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 Key __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String key() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer keyAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer keyInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - - public static int createKey(FlatBufferBuilder builder, - int keyOffset) { - builder.startTable(1); - Key.addKey(builder, keyOffset); - return Key.endKey(builder); - } - - public static void startKey(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addKey(FlatBufferBuilder builder, int keyOffset) { builder.addOffset(0, keyOffset, 0); } - public static int endKey(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 Key get(int j) { return get(new Key(), j); } - public Key get(Key obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public KeyT unpack() { - KeyT _o = new KeyT(); - unpackTo(_o); - return _o; - } - public void unpackTo(KeyT _o) { - String _oKey = key(); - _o.setKey(_oKey); - } - public static int pack(FlatBufferBuilder builder, KeyT _o) { - if (_o == null) return 0; - int _key = _o.getKey() == null ? 0 : builder.createString(_o.getKey()); - return createKey( - builder, - _key); - } -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/KeyT.java b/protocol/java/src/solarxr_protocol/rpc/KeyT.java deleted file mode 100644 index f76ea40b..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/KeyT.java +++ /dev/null @@ -1,22 +0,0 @@ -// 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 KeyT { - private String key; - - public String getKey() { return key; } - - public void setKey(String key) { this.key = key; } - - - public KeyT() { - this.key = null; - } -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/Keybind.java b/protocol/java/src/solarxr_protocol/rpc/Keybind.java index d2895b47..d9a3214f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/Keybind.java +++ b/protocol/java/src/solarxr_protocol/rpc/Keybind.java @@ -15,23 +15,27 @@ public final class Keybind extends Table { public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } public Keybind __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - public solarxr_protocol.rpc.Key value(int j) { return value(new solarxr_protocol.rpc.Key(), j); } - public solarxr_protocol.rpc.Key value(solarxr_protocol.rpc.Key obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int valueLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.rpc.Key.Vector valueVector() { return valueVector(new solarxr_protocol.rpc.Key.Vector()); } - public solarxr_protocol.rpc.Key.Vector valueVector(solarxr_protocol.rpc.Key.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public int keybindName() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public String value() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public long delay() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } public static int createKeybind(FlatBufferBuilder builder, - int valueOffset) { - builder.startTable(1); + int keybindName, + int valueOffset, + long delay) { + builder.startTable(3); + Keybind.addDelay(builder, delay); Keybind.addValue(builder, valueOffset); + Keybind.addKeybindName(builder, keybindName); return Keybind.endKeybind(builder); } - public static void startKeybind(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(0, valueOffset, 0); } - public static int createValueVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } - public static void startValueVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void startKeybind(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addKeybindName(FlatBufferBuilder builder, int keybindName) { builder.addByte(0, (byte) keybindName, (byte) 0); } + public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(1, valueOffset, 0); } + public static void addDelay(FlatBufferBuilder builder, long delay) { builder.addLong(2, delay, 0L); } public static int endKeybind(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -49,22 +53,21 @@ public KeybindT unpack() { return _o; } public void unpackTo(KeybindT _o) { - solarxr_protocol.rpc.KeyT[] _oValue = new solarxr_protocol.rpc.KeyT[valueLength()]; - for (int _j = 0; _j < valueLength(); ++_j) {_oValue[_j] = (value(_j) != null ? value(_j).unpack() : null);} + int _oKeybindName = keybindName(); + _o.setKeybindName(_oKeybindName); + String _oValue = value(); _o.setValue(_oValue); + long _oDelay = delay(); + _o.setDelay(_oDelay); } public static int pack(FlatBufferBuilder builder, KeybindT _o) { if (_o == null) return 0; - int _value = 0; - if (_o.getValue() != null) { - int[] __value = new int[_o.getValue().length]; - int _j = 0; - for (solarxr_protocol.rpc.KeyT _e : _o.getValue()) { __value[_j] = solarxr_protocol.rpc.Key.pack(builder, _e); _j++;} - _value = createValueVector(builder, __value); - } + int _value = _o.getValue() == null ? 0 : builder.createString(_o.getValue()); return createKeybind( builder, - _value); + _o.getKeybindName(), + _value, + _o.getDelay()); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java b/protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java deleted file mode 100644 index aeddbd61..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/KeybindSettings.java +++ /dev/null @@ -1,68 +0,0 @@ -// 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 KeybindSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } - public static KeybindSettings getRootAsKeybindSettings(ByteBuffer _bb) { return getRootAsKeybindSettings(_bb, new KeybindSettings()); } - public static KeybindSettings getRootAsKeybindSettings(ByteBuffer _bb, KeybindSettings 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 KeybindSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - public solarxr_protocol.rpc.Keybind keybind() { return keybind(new solarxr_protocol.rpc.Keybind()); } - public solarxr_protocol.rpc.Keybind keybind(solarxr_protocol.rpc.Keybind obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createKeybindSettings(FlatBufferBuilder builder, - int nameOffset, - int keybindOffset) { - builder.startTable(2); - KeybindSettings.addKeybind(builder, keybindOffset); - KeybindSettings.addName(builder, nameOffset); - return KeybindSettings.endKeybindSettings(builder); - } - - public static void startKeybindSettings(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } - public static void addKeybind(FlatBufferBuilder builder, int keybindOffset) { builder.addOffset(1, keybindOffset, 0); } - public static int endKeybindSettings(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 KeybindSettings get(int j) { return get(new KeybindSettings(), j); } - public KeybindSettings get(KeybindSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public KeybindSettingsT unpack() { - KeybindSettingsT _o = new KeybindSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(KeybindSettingsT _o) { - String _oName = name(); - _o.setName(_oName); - if (keybind() != null) _o.setKeybind(keybind().unpack()); - else _o.setKeybind(null); - } - public static int pack(FlatBufferBuilder builder, KeybindSettingsT _o) { - if (_o == null) return 0; - int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); - int _keybind = _o.getKeybind() == null ? 0 : solarxr_protocol.rpc.Keybind.pack(builder, _o.getKeybind()); - return createKeybindSettings( - builder, - _name, - _keybind); - } -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java deleted file mode 100644 index 00b36b08..00000000 --- a/protocol/java/src/solarxr_protocol/rpc/KeybindSettingsT.java +++ /dev/null @@ -1,28 +0,0 @@ -// 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 KeybindSettingsT { - private String name; - private solarxr_protocol.rpc.KeybindT keybind; - - public String getName() { return name; } - - public void setName(String name) { this.name = name; } - - public solarxr_protocol.rpc.KeybindT getKeybind() { return keybind; } - - public void setKeybind(solarxr_protocol.rpc.KeybindT keybind) { this.keybind = keybind; } - - - public KeybindSettingsT() { - this.name = null; - this.keybind = null; - } -} - diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java index 3932ad69..6a5ff944 100644 --- a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java @@ -8,15 +8,27 @@ import com.google.flatbuffers.*; public class KeybindT { - private solarxr_protocol.rpc.KeyT[] value; + private int keybindName; + private String value; + private long delay; - public solarxr_protocol.rpc.KeyT[] getValue() { return value; } + public int getKeybindName() { return keybindName; } - public void setValue(solarxr_protocol.rpc.KeyT[] value) { this.value = value; } + public void setKeybindName(int keybindName) { this.keybindName = keybindName; } + + public String getValue() { return value; } + + public void setValue(String value) { this.value = value; } + + public long getDelay() { return delay; } + + public void setDelay(long delay) { this.delay = delay; } public KeybindT() { + this.keybindName = 0; this.value = null; + this.delay = 0L; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index 5435c77b..1c7f75e1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -84,8 +84,10 @@ private RpcMessage() { } public static final byte StartUserHeightCalibration = 76; public static final byte CancelUserHeightCalibration = 77; public static final byte UserHeightRecordingStatusResponse = 78; + public static final byte KeybindRequest = 79; + public static final byte KeybindResponse = 80; - 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", }; + 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", "KeybindResponse", }; 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 f8ec9923..bd424edb 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -364,6 +364,14 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.UserHeightRecordingStatusResponse()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.UserHeightRecordingStatusResponse) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.KeybindRequest: + _oMessageValue = message(new solarxr_protocol.rpc.KeybindRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.KeybindRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.KeybindResponse: + _oMessageValue = message(new solarxr_protocol.rpc.KeybindResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.KeybindResponse) _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 0fb9afb4..6ed495b7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -99,6 +99,8 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.StartUserHeightCalibrationT asStartUserHeightCalibration() { return (solarxr_protocol.rpc.StartUserHeightCalibrationT) value; } public solarxr_protocol.rpc.CancelUserHeightCalibrationT asCancelUserHeightCalibration() { return (solarxr_protocol.rpc.CancelUserHeightCalibrationT) value; } public solarxr_protocol.rpc.UserHeightRecordingStatusResponseT asUserHeightRecordingStatusResponse() { return (solarxr_protocol.rpc.UserHeightRecordingStatusResponseT) value; } + public solarxr_protocol.rpc.KeybindRequestT asKeybindRequest() { return (solarxr_protocol.rpc.KeybindRequestT) value; } + public solarxr_protocol.rpc.KeybindResponseT asKeybindResponse() { return (solarxr_protocol.rpc.KeybindResponseT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { switch (_o.type) { @@ -180,6 +182,8 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.StartUserHeightCalibration: return solarxr_protocol.rpc.StartUserHeightCalibration.pack(builder, _o.asStartUserHeightCalibration()); case RpcMessage.CancelUserHeightCalibration: return solarxr_protocol.rpc.CancelUserHeightCalibration.pack(builder, _o.asCancelUserHeightCalibration()); case RpcMessage.UserHeightRecordingStatusResponse: return solarxr_protocol.rpc.UserHeightRecordingStatusResponse.pack(builder, _o.asUserHeightRecordingStatusResponse()); + case RpcMessage.KeybindRequest: return solarxr_protocol.rpc.KeybindRequest.pack(builder, _o.asKeybindRequest()); + case RpcMessage.KeybindResponse: return solarxr_protocol.rpc.KeybindResponse.pack(builder, _o.asKeybindResponse()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java index 1d413c46..d12d1401 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java @@ -39,8 +39,6 @@ public final class SettingsResponse extends Table { public solarxr_protocol.rpc.StayAlignedSettings stayAligned(solarxr_protocol.rpc.StayAlignedSettings obj) { int o = __offset(24); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public solarxr_protocol.rpc.HIDSettings hidSettings() { return hidSettings(new solarxr_protocol.rpc.HIDSettings()); } public solarxr_protocol.rpc.HIDSettings hidSettings(solarxr_protocol.rpc.HIDSettings obj) { int o = __offset(26); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.KeybindSettings keybindSettings() { return keybindSettings(new solarxr_protocol.rpc.KeybindSettings()); } - public solarxr_protocol.rpc.KeybindSettings keybindSettings(solarxr_protocol.rpc.KeybindSettings obj) { int o = __offset(28); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } public static int createSettingsResponse(FlatBufferBuilder builder, int steamVrTrackersOffset, @@ -54,10 +52,8 @@ public static int createSettingsResponse(FlatBufferBuilder builder, int autoBoneSettingsOffset, int resetsSettingsOffset, int stayAlignedOffset, - int hidSettingsOffset, - int keybindSettingsOffset) { - builder.startTable(13); - SettingsResponse.addKeybindSettings(builder, keybindSettingsOffset); + int hidSettingsOffset) { + builder.startTable(12); SettingsResponse.addHidSettings(builder, hidSettingsOffset); SettingsResponse.addStayAligned(builder, stayAlignedOffset); SettingsResponse.addResetsSettings(builder, resetsSettingsOffset); @@ -73,7 +69,7 @@ public static int createSettingsResponse(FlatBufferBuilder builder, return SettingsResponse.endSettingsResponse(builder); } - public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(13); } + public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(12); } public static void addSteamVrTrackers(FlatBufferBuilder builder, int steamVrTrackersOffset) { builder.addOffset(0, steamVrTrackersOffset, 0); } public static void addFiltering(FlatBufferBuilder builder, int filteringOffset) { builder.addOffset(1, filteringOffset, 0); } public static void addDriftCompensation(FlatBufferBuilder builder, int driftCompensationOffset) { builder.addOffset(2, driftCompensationOffset, 0); } @@ -86,7 +82,6 @@ public static int createSettingsResponse(FlatBufferBuilder builder, public static void addResetsSettings(FlatBufferBuilder builder, int resetsSettingsOffset) { builder.addOffset(9, resetsSettingsOffset, 0); } public static void addStayAligned(FlatBufferBuilder builder, int stayAlignedOffset) { builder.addOffset(10, stayAlignedOffset, 0); } public static void addHidSettings(FlatBufferBuilder builder, int hidSettingsOffset) { builder.addOffset(11, hidSettingsOffset, 0); } - public static void addKeybindSettings(FlatBufferBuilder builder, int keybindSettingsOffset) { builder.addOffset(12, keybindSettingsOffset, 0); } public static int endSettingsResponse(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -128,8 +123,6 @@ public void unpackTo(SettingsResponseT _o) { else _o.setStayAligned(null); if (hidSettings() != null) _o.setHidSettings(hidSettings().unpack()); else _o.setHidSettings(null); - if (keybindSettings() != null) _o.setKeybindSettings(keybindSettings().unpack()); - else _o.setKeybindSettings(null); } public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { if (_o == null) return 0; @@ -145,7 +138,6 @@ public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { int _resetsSettings = _o.getResetsSettings() == null ? 0 : solarxr_protocol.rpc.ResetsSettings.pack(builder, _o.getResetsSettings()); int _stayAligned = _o.getStayAligned() == null ? 0 : solarxr_protocol.rpc.StayAlignedSettings.pack(builder, _o.getStayAligned()); int _hidSettings = _o.getHidSettings() == null ? 0 : solarxr_protocol.rpc.HIDSettings.pack(builder, _o.getHidSettings()); - int _keybindSettings = _o.getKeybindSettings() == null ? 0 : solarxr_protocol.rpc.KeybindSettings.pack(builder, _o.getKeybindSettings()); return createSettingsResponse( builder, _steamVrTrackers, @@ -159,8 +151,7 @@ public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { _autoBoneSettings, _resetsSettings, _stayAligned, - _hidSettings, - _keybindSettings); + _hidSettings); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java index 3cd80677..11068908 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java @@ -20,7 +20,6 @@ public class SettingsResponseT { private solarxr_protocol.rpc.ResetsSettingsT resetsSettings; private solarxr_protocol.rpc.StayAlignedSettingsT stayAligned; private solarxr_protocol.rpc.HIDSettingsT hidSettings; - private solarxr_protocol.rpc.KeybindSettingsT keybindSettings; public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } @@ -70,10 +69,6 @@ public class SettingsResponseT { public void setHidSettings(solarxr_protocol.rpc.HIDSettingsT hidSettings) { this.hidSettings = hidSettings; } - public solarxr_protocol.rpc.KeybindSettingsT getKeybindSettings() { return keybindSettings; } - - public void setKeybindSettings(solarxr_protocol.rpc.KeybindSettingsT keybindSettings) { this.keybindSettings = keybindSettings; } - public SettingsResponseT() { this.steamVrTrackers = null; @@ -88,7 +83,6 @@ public SettingsResponseT() { this.resetsSettings = null; this.stayAligned = null; this.hidSettings = null; - this.keybindSettings = null; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt index fb52b4e8..68967b02 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeSettingsRequest.kt @@ -124,15 +124,6 @@ class ChangeSettingsRequest : Table() { null } } - val keybindSettings : solarxr_protocol.rpc.KeybindSettings? get() = keybindSettings(solarxr_protocol.rpc.KeybindSettings()) - fun keybindSettings(obj: solarxr_protocol.rpc.KeybindSettings) : solarxr_protocol.rpc.KeybindSettings? { - val o = __offset(28) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -144,9 +135,8 @@ class ChangeSettingsRequest : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int, keybindSettingsOffset: Int) : Int { - builder.startTable(13) - addKeybindSettings(builder, keybindSettingsOffset) + fun createChangeSettingsRequest(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int) : Int { + builder.startTable(12) addHidSettings(builder, hidSettingsOffset) addStayAligned(builder, stayAlignedOffset) addResetsSettings(builder, resetsSettingsOffset) @@ -162,7 +152,7 @@ class ChangeSettingsRequest : Table() { return endChangeSettingsRequest(builder) } @JvmStatic - fun startChangeSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(13) + fun startChangeSettingsRequest(builder: FlatBufferBuilder) = builder.startTable(12) @JvmStatic fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) @JvmStatic @@ -188,8 +178,6 @@ class ChangeSettingsRequest : Table() { @JvmStatic fun addHidSettings(builder: FlatBufferBuilder, hidSettings: Int) = builder.addOffset(11, hidSettings, 0) @JvmStatic - fun addKeybindSettings(builder: FlatBufferBuilder, keybindSettings: Int) = builder.addOffset(12, keybindSettings, 0) - @JvmStatic fun endChangeSettingsRequest(builder: FlatBufferBuilder) : Int { val o = builder.endTable() return o diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/Key.kt b/protocol/kotlin/src/solarxr_protocol/rpc/Key.kt deleted file mode 100644 index ee2c7ba7..00000000 --- a/protocol/kotlin/src/solarxr_protocol/rpc/Key.kt +++ /dev/null @@ -1,52 +0,0 @@ -// 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 Key : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : Key { - __init(_i, _bb) - return this - } - val key : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val keyAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun keyInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsKey(_bb: ByteBuffer): Key = getRootAsKey(_bb, Key()) - @JvmStatic - fun getRootAsKey(_bb: ByteBuffer, obj: Key): Key { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createKey(builder: FlatBufferBuilder, keyOffset: Int) : Int { - builder.startTable(1) - addKey(builder, keyOffset) - return endKey(builder) - } - @JvmStatic - fun startKey(builder: FlatBufferBuilder) = builder.startTable(1) - @JvmStatic - fun addKey(builder: FlatBufferBuilder, key: Int) = builder.addOffset(0, key, 0) - @JvmStatic - fun endKey(builder: FlatBufferBuilder) : Int { - val o = builder.endTable() - return o - } - } -} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt index ac5ff1d4..ef54274a 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt @@ -16,18 +16,22 @@ class Keybind : Table() { __init(_i, _bb) return this } - fun value(j: Int) : solarxr_protocol.rpc.Key? = value(solarxr_protocol.rpc.Key(), j) - fun value(obj: solarxr_protocol.rpc.Key, j: Int) : solarxr_protocol.rpc.Key? { - val o = __offset(4) - return if (o != 0) { - obj.__assign(__indirect(__vector(o) + j * 4), bb) - } else { - null + val keybindName : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u } - } - val valueLength : Int + val value : String? get() { - val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + val o = __offset(6) + return if (o != 0) __string(o + bb_pos) else null + } + val valueAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun valueInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + val delay : Long + get() { + val o = __offset(8) + return if(o != 0) bb.getLong(o + bb_pos) else 0L } companion object { @JvmStatic @@ -40,25 +44,21 @@ class Keybind : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createKeybind(builder: FlatBufferBuilder, valueOffset: Int) : Int { - builder.startTable(1) + fun createKeybind(builder: FlatBufferBuilder, keybindName: UByte, valueOffset: Int, delay: Long) : Int { + builder.startTable(3) + addDelay(builder, delay) addValue(builder, valueOffset) + addKeybindName(builder, keybindName) return endKeybind(builder) } @JvmStatic - fun startKeybind(builder: FlatBufferBuilder) = builder.startTable(1) + fun startKeybind(builder: FlatBufferBuilder) = builder.startTable(3) @JvmStatic - fun addValue(builder: FlatBufferBuilder, value: Int) = builder.addOffset(0, value, 0) + fun addKeybindName(builder: FlatBufferBuilder, keybindName: UByte) = builder.addByte(0, keybindName.toByte(), 0) @JvmStatic - fun createValueVector(builder: FlatBufferBuilder, data: IntArray) : Int { - builder.startVector(4, data.size, 4) - for (i in data.size - 1 downTo 0) { - builder.addOffset(data[i]) - } - return builder.endVector() - } + fun addValue(builder: FlatBufferBuilder, value: Int) = builder.addOffset(1, value, 0) @JvmStatic - fun startValueVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + fun addDelay(builder: FlatBufferBuilder, delay: Long) = builder.addLong(2, delay, 0L) @JvmStatic fun endKeybind(builder: FlatBufferBuilder) : Int { val o = builder.endTable() diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt deleted file mode 100644 index de81dbfb..00000000 --- a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindSettings.kt +++ /dev/null @@ -1,64 +0,0 @@ -// 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 KeybindSettings : Table() { - - fun __init(_i: Int, _bb: ByteBuffer) { - __reset(_i, _bb) - } - fun __assign(_i: Int, _bb: ByteBuffer) : KeybindSettings { - __init(_i, _bb) - return this - } - val name : String? - get() { - val o = __offset(4) - return if (o != 0) __string(o + bb_pos) else null - } - val nameAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(4, 1) - fun nameInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 4, 1) - val keybind : solarxr_protocol.rpc.Keybind? get() = keybind(solarxr_protocol.rpc.Keybind()) - fun keybind(obj: solarxr_protocol.rpc.Keybind) : solarxr_protocol.rpc.Keybind? { - val o = __offset(6) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } - companion object { - @JvmStatic - fun validateVersion() = Constants.FLATBUFFERS_22_10_26() - @JvmStatic - fun getRootAsKeybindSettings(_bb: ByteBuffer): KeybindSettings = getRootAsKeybindSettings(_bb, KeybindSettings()) - @JvmStatic - fun getRootAsKeybindSettings(_bb: ByteBuffer, obj: KeybindSettings): KeybindSettings { - _bb.order(ByteOrder.LITTLE_ENDIAN) - return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) - } - @JvmStatic - fun createKeybindSettings(builder: FlatBufferBuilder, nameOffset: Int, keybindOffset: Int) : Int { - builder.startTable(2) - addKeybind(builder, keybindOffset) - addName(builder, nameOffset) - return endKeybindSettings(builder) - } - @JvmStatic - fun startKeybindSettings(builder: FlatBufferBuilder) = builder.startTable(2) - @JvmStatic - fun addName(builder: FlatBufferBuilder, name: Int) = builder.addOffset(0, name, 0) - @JvmStatic - fun addKeybind(builder: FlatBufferBuilder, keybind: Int) = builder.addOffset(1, keybind, 0) - @JvmStatic - fun endKeybindSettings(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 0aba32ed..6145ce8a 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -84,7 +84,9 @@ class RpcMessage private constructor() { const val StartUserHeightCalibration: UByte = 76u const val CancelUserHeightCalibration: UByte = 77u const val UserHeightRecordingStatusResponse: UByte = 78u - 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse") + const val KeybindRequest: UByte = 79u + const val KeybindResponse: UByte = 80u + 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", "KeybindResponse") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt index 40e9ceda..298b69e4 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/SettingsResponse.kt @@ -124,15 +124,6 @@ class SettingsResponse : Table() { null } } - val keybindSettings : solarxr_protocol.rpc.KeybindSettings? get() = keybindSettings(solarxr_protocol.rpc.KeybindSettings()) - fun keybindSettings(obj: solarxr_protocol.rpc.KeybindSettings) : solarxr_protocol.rpc.KeybindSettings? { - val o = __offset(28) - return if (o != 0) { - obj.__assign(__indirect(o + bb_pos), bb) - } else { - null - } - } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -144,9 +135,8 @@ class SettingsResponse : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int, keybindSettingsOffset: Int) : Int { - builder.startTable(13) - addKeybindSettings(builder, keybindSettingsOffset) + fun createSettingsResponse(builder: FlatBufferBuilder, steamVrTrackersOffset: Int, filteringOffset: Int, driftCompensationOffset: Int, oscRouterOffset: Int, vrcOscOffset: Int, vmcOscOffset: Int, modelSettingsOffset: Int, tapDetectionSettingsOffset: Int, autoBoneSettingsOffset: Int, resetsSettingsOffset: Int, stayAlignedOffset: Int, hidSettingsOffset: Int) : Int { + builder.startTable(12) addHidSettings(builder, hidSettingsOffset) addStayAligned(builder, stayAlignedOffset) addResetsSettings(builder, resetsSettingsOffset) @@ -162,7 +152,7 @@ class SettingsResponse : Table() { return endSettingsResponse(builder) } @JvmStatic - fun startSettingsResponse(builder: FlatBufferBuilder) = builder.startTable(13) + fun startSettingsResponse(builder: FlatBufferBuilder) = builder.startTable(12) @JvmStatic fun addSteamVrTrackers(builder: FlatBufferBuilder, steamVrTrackers: Int) = builder.addOffset(0, steamVrTrackers, 0) @JvmStatic @@ -188,8 +178,6 @@ class SettingsResponse : Table() { @JvmStatic fun addHidSettings(builder: FlatBufferBuilder, hidSettings: Int) = builder.addOffset(11, hidSettings, 0) @JvmStatic - fun addKeybindSettings(builder: FlatBufferBuilder, keybindSettings: Int) = builder.addOffset(12, keybindSettings, 0) - @JvmStatic fun endSettingsResponse(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 b5033293..3bb9f629 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -150,6 +150,8 @@ pub mod solarxr_protocol { } // settings mod rpc_message_generated; pub use self::rpc_message_generated::*; + mod keybind_name_generated; + pub use self::keybind_name_generated::*; mod reset_type_generated; pub use self::reset_type_generated::*; mod reset_status_generated; @@ -188,6 +190,12 @@ pub mod solarxr_protocol { pub use self::stay_aligned_relaxed_pose_generated::*; mod user_height_calibration_status_generated; pub use self::user_height_calibration_status_generated::*; + mod keybind_generated; + pub use self::keybind_generated::*; + mod keybind_request_generated; + pub use self::keybind_request_generated::*; + mod keybind_response_generated; + pub use self::keybind_response_generated::*; mod rpc_message_header_generated; pub use self::rpc_message_header_generated::*; mod heartbeat_request_generated; @@ -232,12 +240,6 @@ pub mod solarxr_protocol { pub use self::stay_aligned_settings_generated::*; mod hidsettings_generated; pub use self::hidsettings_generated::*; - mod key_generated; - pub use self::key_generated::*; - mod keybind_generated; - pub use self::keybind_generated::*; - mod keybind_settings_generated; - pub use self::keybind_settings_generated::*; mod tap_detection_setup_notification_generated; pub use self::tap_detection_setup_notification_generated::*; mod record_bvhrequest_generated; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs index 11f8bc25..fef1cfb8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_settings_request_generated.rs @@ -37,7 +37,6 @@ impl<'a> ChangeSettingsRequest<'a> { pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 24; pub const VT_HID_SETTINGS: flatbuffers::VOffsetT = 26; - pub const VT_KEYBIND_SETTINGS: flatbuffers::VOffsetT = 28; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -49,7 +48,6 @@ impl<'a> ChangeSettingsRequest<'a> { args: &'args ChangeSettingsRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ChangeSettingsRequestBuilder::new(_fbb); - if let Some(x) = args.keybind_settings { builder.add_keybind_settings(x); } if let Some(x) = args.hid_settings { builder.add_hid_settings(x); } if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.resets_settings { builder.add_resets_settings(x); } @@ -150,13 +148,6 @@ impl<'a> ChangeSettingsRequest<'a> { // which contains a valid value in this slot unsafe { self._tab.get::>(ChangeSettingsRequest::VT_HID_SETTINGS, None)} } - #[inline] - pub fn keybind_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(ChangeSettingsRequest::VT_KEYBIND_SETTINGS, None)} - } } impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { @@ -178,7 +169,6 @@ impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .visit_field::>("hid_settings", Self::VT_HID_SETTINGS, false)? - .visit_field::>("keybind_settings", Self::VT_KEYBIND_SETTINGS, false)? .finish(); Ok(()) } @@ -196,7 +186,6 @@ pub struct ChangeSettingsRequestArgs<'a> { pub resets_settings: Option>>, pub stay_aligned: Option>>, pub hid_settings: Option>>, - pub keybind_settings: Option>>, } impl<'a> Default for ChangeSettingsRequestArgs<'a> { #[inline] @@ -214,7 +203,6 @@ impl<'a> Default for ChangeSettingsRequestArgs<'a> { resets_settings: None, stay_aligned: None, hid_settings: None, - keybind_settings: None, } } } @@ -273,10 +261,6 @@ impl<'a: 'b, 'b> ChangeSettingsRequestBuilder<'a, 'b> { self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_HID_SETTINGS, hid_settings); } #[inline] - pub fn add_keybind_settings(&mut self, keybind_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_KEYBIND_SETTINGS, keybind_settings); - } - #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSettingsRequestBuilder<'a, 'b> { let start = _fbb.start_table(); ChangeSettingsRequestBuilder { @@ -306,7 +290,6 @@ impl core::fmt::Debug for ChangeSettingsRequest<'_> { ds.field("resets_settings", &self.resets_settings()); ds.field("stay_aligned", &self.stay_aligned()); ds.field("hid_settings", &self.hid_settings()); - ds.field("keybind_settings", &self.keybind_settings()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs deleted file mode 100644 index ffb5c41d..00000000 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/key_generated.rs +++ /dev/null @@ -1,108 +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::*; -pub enum KeyOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct Key<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for Key<'a> { - type Inner = Key<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> Key<'a> { - pub const VT_KEY: flatbuffers::VOffsetT = 4; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - Key { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args KeyArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = KeyBuilder::new(_fbb); - if let Some(x) = args.key { builder.add_key(x); } - builder.finish() - } - - - #[inline] - pub fn key(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(Key::VT_KEY, None)} - } -} - -impl flatbuffers::Verifiable for Key<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("key", Self::VT_KEY, false)? - .finish(); - Ok(()) - } -} -pub struct KeyArgs<'a> { - pub key: Option>, -} -impl<'a> Default for KeyArgs<'a> { - #[inline] - fn default() -> Self { - KeyArgs { - key: None, - } - } -} - -pub struct KeyBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> KeyBuilder<'a, 'b> { - #[inline] - pub fn add_key(&mut self, key: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(Key::VT_KEY, key); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeyBuilder<'a, 'b> { - let start = _fbb.start_table(); - KeyBuilder { - 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 Key<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("Key"); - ds.field("key", &self.key()); - ds.finish() - } -} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs index d4fa2ac2..2353fa0d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs @@ -25,7 +25,9 @@ impl<'a> flatbuffers::Follow<'a> for Keybind<'a> { } impl<'a> Keybind<'a> { - pub const VT_VALUE: flatbuffers::VOffsetT = 4; + pub const VT_KEYBIND_NAME: flatbuffers::VOffsetT = 4; + pub const VT_VALUE: flatbuffers::VOffsetT = 6; + pub const VT_DELAY: flatbuffers::VOffsetT = 8; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -37,17 +39,33 @@ impl<'a> Keybind<'a> { args: &'args KeybindArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = KeybindBuilder::new(_fbb); + builder.add_delay(args.delay); if let Some(x) = args.value { builder.add_value(x); } + builder.add_keybind_name(args.keybind_name); builder.finish() } #[inline] - pub fn value(&self) -> Option>>> { + pub fn keybind_name(&self) -> KeybindName { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>>>(Keybind::VT_VALUE, None)} + unsafe { self._tab.get::(Keybind::VT_KEYBIND_NAME, Some(KeybindName::FULL_RESET)).unwrap()} + } + #[inline] + pub fn value(&self) -> Option<&'a str> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>(Keybind::VT_VALUE, None)} + } + #[inline] + pub fn delay(&self) -> i64 { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(Keybind::VT_DELAY, Some(0)).unwrap()} } } @@ -58,19 +76,25 @@ impl flatbuffers::Verifiable for Keybind<'_> { ) -> Result<(), flatbuffers::InvalidFlatbuffer> { use self::flatbuffers::Verifiable; v.visit_table(pos)? - .visit_field::>>>("value", Self::VT_VALUE, false)? + .visit_field::("keybind_name", Self::VT_KEYBIND_NAME, false)? + .visit_field::>("value", Self::VT_VALUE, false)? + .visit_field::("delay", Self::VT_DELAY, false)? .finish(); Ok(()) } } pub struct KeybindArgs<'a> { - pub value: Option>>>>, + pub keybind_name: KeybindName, + pub value: Option>, + pub delay: i64, } impl<'a> Default for KeybindArgs<'a> { #[inline] fn default() -> Self { KeybindArgs { + keybind_name: KeybindName::FULL_RESET, value: None, + delay: 0, } } } @@ -81,10 +105,18 @@ pub struct KeybindBuilder<'a: 'b, 'b> { } impl<'a: 'b, 'b> KeybindBuilder<'a, 'b> { #[inline] - pub fn add_value(&mut self, value: flatbuffers::WIPOffset>>>) { + pub fn add_keybind_name(&mut self, keybind_name: KeybindName) { + self.fbb_.push_slot::(Keybind::VT_KEYBIND_NAME, keybind_name, KeybindName::FULL_RESET); + } + #[inline] + pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) { self.fbb_.push_slot_always::>(Keybind::VT_VALUE, value); } #[inline] + pub fn add_delay(&mut self, delay: i64) { + self.fbb_.push_slot::(Keybind::VT_DELAY, delay, 0); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindBuilder<'a, 'b> { let start = _fbb.start_table(); KeybindBuilder { @@ -102,7 +134,9 @@ impl<'a: 'b, 'b> KeybindBuilder<'a, 'b> { impl core::fmt::Debug for Keybind<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Keybind"); + ds.field("keybind_name", &self.keybind_name()); ds.field("value", &self.value()); + ds.field("delay", &self.delay()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs deleted file mode 100644 index 012cbf50..00000000 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_settings_generated.rs +++ /dev/null @@ -1,125 +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::*; -pub enum KeybindSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct KeybindSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for KeybindSettings<'a> { - type Inner = KeybindSettings<'a>; - #[inline] - unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table::new(buf, loc) } - } -} - -impl<'a> KeybindSettings<'a> { - pub const VT_NAME: flatbuffers::VOffsetT = 4; - pub const VT_KEYBIND: flatbuffers::VOffsetT = 6; - - #[inline] - pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - KeybindSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args KeybindSettingsArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = KeybindSettingsBuilder::new(_fbb); - if let Some(x) = args.keybind { builder.add_keybind(x); } - if let Some(x) = args.name { builder.add_name(x); } - builder.finish() - } - - - #[inline] - pub fn name(&self) -> Option<&'a str> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(KeybindSettings::VT_NAME, None)} - } - #[inline] - pub fn keybind(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(KeybindSettings::VT_KEYBIND, None)} - } -} - -impl flatbuffers::Verifiable for KeybindSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("name", Self::VT_NAME, false)? - .visit_field::>("keybind", Self::VT_KEYBIND, false)? - .finish(); - Ok(()) - } -} -pub struct KeybindSettingsArgs<'a> { - pub name: Option>, - pub keybind: Option>>, -} -impl<'a> Default for KeybindSettingsArgs<'a> { - #[inline] - fn default() -> Self { - KeybindSettingsArgs { - name: None, - keybind: None, - } - } -} - -pub struct KeybindSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> KeybindSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(KeybindSettings::VT_NAME, name); - } - #[inline] - pub fn add_keybind(&mut self, keybind: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(KeybindSettings::VT_KEYBIND, keybind); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - KeybindSettingsBuilder { - 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 KeybindSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("KeybindSettings"); - ds.field("name", &self.name()); - ds.field("keybind", &self.keybind()); - 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 f056f10c..ca766f9d 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 = 78; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 80; #[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; 79] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 81] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -95,6 +95,8 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 79] = [ RpcMessage::StartUserHeightCalibration, RpcMessage::CancelUserHeightCalibration, RpcMessage::UserHeightRecordingStatusResponse, + RpcMessage::KeybindRequest, + RpcMessage::KeybindResponse, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -181,9 +183,11 @@ impl RpcMessage { pub const StartUserHeightCalibration: Self = Self(76); pub const CancelUserHeightCalibration: Self = Self(77); pub const UserHeightRecordingStatusResponse: Self = Self(78); + pub const KeybindRequest: Self = Self(79); + pub const KeybindResponse: Self = Self(80); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 78; + pub const ENUM_MAX: u8 = 80; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -264,6 +268,8 @@ impl RpcMessage { Self::StartUserHeightCalibration, Self::CancelUserHeightCalibration, Self::UserHeightRecordingStatusResponse, + Self::KeybindRequest, + Self::KeybindResponse, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -347,6 +353,8 @@ impl RpcMessage { Self::StartUserHeightCalibration => Some("StartUserHeightCalibration"), Self::CancelUserHeightCalibration => Some("CancelUserHeightCalibration"), Self::UserHeightRecordingStatusResponse => Some("UserHeightRecordingStatusResponse"), + Self::KeybindRequest => Some("KeybindRequest"), + Self::KeybindResponse => Some("KeybindResponse"), _ => 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 5302176d..81832f43 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 @@ -1239,6 +1239,36 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_keybind_request(&self) -> Option> { + if self.message_type() == RpcMessage::KeybindRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { KeybindRequest::init_from_table(t) } + }) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_keybind_response(&self) -> Option> { + if self.message_type() == RpcMessage::KeybindResponse { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { KeybindResponse::init_from_table(t) } + }) + } else { + None + } + } + } impl flatbuffers::Verifiable for RpcMessageHeader<'_> { @@ -1329,6 +1359,8 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::StartUserHeightCalibration => v.verify_union_variant::>("RpcMessage::StartUserHeightCalibration", pos), RpcMessage::CancelUserHeightCalibration => v.verify_union_variant::>("RpcMessage::CancelUserHeightCalibration", pos), RpcMessage::UserHeightRecordingStatusResponse => v.verify_union_variant::>("RpcMessage::UserHeightRecordingStatusResponse", pos), + RpcMessage::KeybindRequest => v.verify_union_variant::>("RpcMessage::KeybindRequest", pos), + RpcMessage::KeybindResponse => v.verify_union_variant::>("RpcMessage::KeybindResponse", pos), _ => Ok(()), } })? @@ -1936,6 +1968,20 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::KeybindRequest => { + if let Some(x) = self.message_as_keybind_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::KeybindResponse => { + if let Some(x) = self.message_as_keybind_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/settings_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs index 1a62324f..b014c4b8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_response_generated.rs @@ -37,7 +37,6 @@ impl<'a> SettingsResponse<'a> { pub const VT_RESETS_SETTINGS: flatbuffers::VOffsetT = 22; pub const VT_STAY_ALIGNED: flatbuffers::VOffsetT = 24; pub const VT_HID_SETTINGS: flatbuffers::VOffsetT = 26; - pub const VT_KEYBIND_SETTINGS: flatbuffers::VOffsetT = 28; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -49,7 +48,6 @@ impl<'a> SettingsResponse<'a> { args: &'args SettingsResponseArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = SettingsResponseBuilder::new(_fbb); - if let Some(x) = args.keybind_settings { builder.add_keybind_settings(x); } if let Some(x) = args.hid_settings { builder.add_hid_settings(x); } if let Some(x) = args.stay_aligned { builder.add_stay_aligned(x); } if let Some(x) = args.resets_settings { builder.add_resets_settings(x); } @@ -150,13 +148,6 @@ impl<'a> SettingsResponse<'a> { // which contains a valid value in this slot unsafe { self._tab.get::>(SettingsResponse::VT_HID_SETTINGS, None)} } - #[inline] - pub fn keybind_settings(&self) -> Option> { - // Safety: - // Created from valid Table for this object - // which contains a valid value in this slot - unsafe { self._tab.get::>(SettingsResponse::VT_KEYBIND_SETTINGS, None)} - } } impl flatbuffers::Verifiable for SettingsResponse<'_> { @@ -178,7 +169,6 @@ impl flatbuffers::Verifiable for SettingsResponse<'_> { .visit_field::>("resets_settings", Self::VT_RESETS_SETTINGS, false)? .visit_field::>("stay_aligned", Self::VT_STAY_ALIGNED, false)? .visit_field::>("hid_settings", Self::VT_HID_SETTINGS, false)? - .visit_field::>("keybind_settings", Self::VT_KEYBIND_SETTINGS, false)? .finish(); Ok(()) } @@ -196,7 +186,6 @@ pub struct SettingsResponseArgs<'a> { pub resets_settings: Option>>, pub stay_aligned: Option>>, pub hid_settings: Option>>, - pub keybind_settings: Option>>, } impl<'a> Default for SettingsResponseArgs<'a> { #[inline] @@ -214,7 +203,6 @@ impl<'a> Default for SettingsResponseArgs<'a> { resets_settings: None, stay_aligned: None, hid_settings: None, - keybind_settings: None, } } } @@ -273,10 +261,6 @@ impl<'a: 'b, 'b> SettingsResponseBuilder<'a, 'b> { self.fbb_.push_slot_always::>(SettingsResponse::VT_HID_SETTINGS, hid_settings); } #[inline] - pub fn add_keybind_settings(&mut self, keybind_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_KEYBIND_SETTINGS, keybind_settings); - } - #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsResponseBuilder<'a, 'b> { let start = _fbb.start_table(); SettingsResponseBuilder { @@ -306,7 +290,6 @@ impl core::fmt::Debug for SettingsResponse<'_> { ds.field("resets_settings", &self.resets_settings()); ds.field("stay_aligned", &self.stay_aligned()); ds.field("hid_settings", &self.hid_settings()); - ds.field("keybind_settings", &self.keybind_settings()); ds.finish() } } diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index 27b977b7..05e342d9 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -89,9 +89,10 @@ export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/he export { HeightRequest, HeightRequestT } from './solarxr-protocol/rpc/height-request.js'; export { HeightResponse, HeightResponseT } from './solarxr-protocol/rpc/height-response.js'; export { IgnoreTrackingChecklistStepRequest, IgnoreTrackingChecklistStepRequestT } from './solarxr-protocol/rpc/ignore-tracking-checklist-step-request.js'; -export { Key, KeyT } from './solarxr-protocol/rpc/key.js'; export { Keybind, KeybindT } from './solarxr-protocol/rpc/keybind.js'; -export { KeybindSettings, KeybindSettingsT } from './solarxr-protocol/rpc/keybind-settings.js'; +export { KeybindName } from './solarxr-protocol/rpc/keybind-name.js'; +export { KeybindRequest, KeybindRequestT } from './solarxr-protocol/rpc/keybind-request.js'; +export { KeybindResponse, KeybindResponseT } from './solarxr-protocol/rpc/keybind-response.js'; export { LegTweaksTmpChange, LegTweaksTmpChangeT } from './solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; export { LegTweaksTmpClear, LegTweaksTmpClearT } from './solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; export { MagToggleRequest, MagToggleRequestT } from './solarxr-protocol/rpc/mag-toggle-request.js'; diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts index 89a5bb1d..27b19d46 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts @@ -6,7 +6,6 @@ import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/ import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; import { HIDSettings, HIDSettingsT } from '../../solarxr-protocol/rpc/hidsettings.js'; -import { KeybindSettings, KeybindSettingsT } from '../../solarxr-protocol/rpc/keybind-settings.js'; import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; import { StayAlignedSettings, StayAlignedSettingsT } from '../../solarxr-protocol/rpc/stay-aligned-settings.js'; @@ -95,13 +94,8 @@ hidSettings(obj?:HIDSettings):HIDSettings|null { return offset ? (obj || new HIDSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } -keybindSettings(obj?:KeybindSettings):KeybindSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 28); - return offset ? (obj || new KeybindSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - static startChangeSettingsRequest(builder:flatbuffers.Builder) { - builder.startObject(13); + builder.startObject(12); } static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { @@ -152,10 +146,6 @@ static addHidSettings(builder:flatbuffers.Builder, hidSettingsOffset:flatbuffers builder.addFieldOffset(11, hidSettingsOffset, 0); } -static addKeybindSettings(builder:flatbuffers.Builder, keybindSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(12, keybindSettingsOffset, 0); -} - static endChangeSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -175,8 +165,7 @@ unpack(): ChangeSettingsRequestT { (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null), (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null), - (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null), - (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null) + (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null) ); } @@ -194,7 +183,6 @@ unpackTo(_o: ChangeSettingsRequestT): void { _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); _o.hidSettings = (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null); - _o.keybindSettings = (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null); } } @@ -211,8 +199,7 @@ constructor( public autoBoneSettings: AutoBoneSettingsT|null = null, public resetsSettings: ResetsSettingsT|null = null, public stayAligned: StayAlignedSettingsT|null = null, - public hidSettings: HIDSettingsT|null = null, - public keybindSettings: KeybindSettingsT|null = null + public hidSettings: HIDSettingsT|null = null ){} @@ -229,7 +216,6 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); const hidSettings = (this.hidSettings !== null ? this.hidSettings!.pack(builder) : 0); - const keybindSettings = (this.keybindSettings !== null ? this.keybindSettings!.pack(builder) : 0); ChangeSettingsRequest.startChangeSettingsRequest(builder); ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); @@ -244,7 +230,6 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { ChangeSettingsRequest.addResetsSettings(builder, resetsSettings); ChangeSettingsRequest.addStayAligned(builder, stayAligned); ChangeSettingsRequest.addHidSettings(builder, hidSettings); - ChangeSettingsRequest.addKeybindSettings(builder, keybindSettings); return ChangeSettingsRequest.endChangeSettingsRequest(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/key.ts b/protocol/typescript/src/solarxr-protocol/rpc/key.ts deleted file mode 100644 index 6162444a..00000000 --- a/protocol/typescript/src/solarxr-protocol/rpc/key.ts +++ /dev/null @@ -1,76 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class Key implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):Key { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsKey(bb:flatbuffers.ByteBuffer, obj?:Key):Key { - return (obj || new Key()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsKey(bb:flatbuffers.ByteBuffer, obj?:Key):Key { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new Key()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -key():string|null -key(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -key(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 startKey(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, keyOffset, 0); -} - -static endKey(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createKey(builder:flatbuffers.Builder, keyOffset:flatbuffers.Offset):flatbuffers.Offset { - Key.startKey(builder); - Key.addKey(builder, keyOffset); - return Key.endKey(builder); -} - -unpack(): KeyT { - return new KeyT( - this.key() - ); -} - - -unpackTo(_o: KeyT): void { - _o.key = this.key(); -} -} - -export class KeyT implements flatbuffers.IGeneratedObject { -constructor( - public key: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const key = (this.key !== null ? builder.createString(this.key!) : 0); - - return Key.createKey(builder, - key - ); -} -} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts deleted file mode 100644 index f8e2434d..00000000 --- a/protocol/typescript/src/solarxr-protocol/rpc/keybind-settings.ts +++ /dev/null @@ -1,87 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { Keybind, KeybindT } from '../../solarxr-protocol/rpc/keybind.js'; - - -export class KeybindSettings implements flatbuffers.IUnpackableObject { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; - __init(i:number, bb:flatbuffers.ByteBuffer):KeybindSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsKeybindSettings(bb:flatbuffers.ByteBuffer, obj?:KeybindSettings):KeybindSettings { - return (obj || new KeybindSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsKeybindSettings(bb:flatbuffers.ByteBuffer, obj?:KeybindSettings):KeybindSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new KeybindSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -name():string|null -name(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -name(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; -} - -keybind(obj?:Keybind):Keybind|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new Keybind()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startKeybindSettings(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addName(builder:flatbuffers.Builder, nameOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, nameOffset, 0); -} - -static addKeybind(builder:flatbuffers.Builder, keybindOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, keybindOffset, 0); -} - -static endKeybindSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): KeybindSettingsT { - return new KeybindSettingsT( - this.name(), - (this.keybind() !== null ? this.keybind()!.unpack() : null) - ); -} - - -unpackTo(_o: KeybindSettingsT): void { - _o.name = this.name(); - _o.keybind = (this.keybind() !== null ? this.keybind()!.unpack() : null); -} -} - -export class KeybindSettingsT implements flatbuffers.IGeneratedObject { -constructor( - public name: string|Uint8Array|null = null, - public keybind: KeybindT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const name = (this.name !== null ? builder.createString(this.name!) : 0); - const keybind = (this.keybind !== null ? this.keybind!.pack(builder) : 0); - - KeybindSettings.startKeybindSettings(builder); - KeybindSettings.addName(builder, name); - KeybindSettings.addKeybind(builder, keybind); - - return KeybindSettings.endKeybindSettings(builder); -} -} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts index c0f454fb..9038c2b4 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { Key, KeyT } from '../../solarxr-protocol/rpc/key.js'; +import { KeybindName } from '../../solarxr-protocol/rpc/keybind-name.js'; export class Keybind implements flatbuffers.IUnpackableObject { @@ -23,34 +23,37 @@ static getSizePrefixedRootAsKeybind(bb:flatbuffers.ByteBuffer, obj?:Keybind):Key return (obj || new Keybind()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } -value(index: number, obj?:Key):Key|null { +keybindName():KeybindName { const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new Key()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; + return offset ? this.bb!.readUint8(this.bb_pos + offset) : KeybindName.FULL_RESET; } -valueLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +value():string|null +value(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +value(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +delay():bigint { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0'); } static startKeybind(builder:flatbuffers.Builder) { - builder.startObject(1); + builder.startObject(3); } -static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, valueOffset, 0); +static addKeybindName(builder:flatbuffers.Builder, keybindName:KeybindName) { + builder.addFieldInt8(0, keybindName, KeybindName.FULL_RESET); } -static createValueVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { - builder.startVector(4, data.length, 4); - for (let i = data.length - 1; i >= 0; i--) { - builder.addOffset(data[i]!); - } - return builder.endVector(); +static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, valueOffset, 0); } -static startValueVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); +static addDelay(builder:flatbuffers.Builder, delay:bigint) { + builder.addFieldInt64(2, delay, BigInt('0')); } static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -58,35 +61,45 @@ static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { return offset; } -static createKeybind(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset):flatbuffers.Offset { +static createKeybind(builder:flatbuffers.Builder, keybindName:KeybindName, valueOffset:flatbuffers.Offset, delay:bigint):flatbuffers.Offset { Keybind.startKeybind(builder); + Keybind.addKeybindName(builder, keybindName); Keybind.addValue(builder, valueOffset); + Keybind.addDelay(builder, delay); return Keybind.endKeybind(builder); } unpack(): KeybindT { return new KeybindT( - this.bb!.createObjList(this.value.bind(this), this.valueLength()) + this.keybindName(), + this.value(), + this.delay() ); } unpackTo(_o: KeybindT): void { - _o.value = this.bb!.createObjList(this.value.bind(this), this.valueLength()); + _o.keybindName = this.keybindName(); + _o.value = this.value(); + _o.delay = this.delay(); } } export class KeybindT implements flatbuffers.IGeneratedObject { constructor( - public value: (KeyT)[] = [] + public keybindName: KeybindName = KeybindName.FULL_RESET, + public value: string|Uint8Array|null = null, + public delay: bigint = BigInt('0') ){} pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const value = Keybind.createValueVector(builder, builder.createObjectOffsetList(this.value)); + const value = (this.value !== null ? builder.createString(this.value!) : 0); return Keybind.createKeybind(builder, - value + this.keybindName, + value, + this.delay ); } } 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 45268429..14f2c452 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -29,6 +29,8 @@ import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rp import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; import { HeightResponse, HeightResponseT } from '../../solarxr-protocol/rpc/height-response.js'; import { IgnoreTrackingChecklistStepRequest, IgnoreTrackingChecklistStepRequestT } from '../../solarxr-protocol/rpc/ignore-tracking-checklist-step-request.js'; +import { KeybindRequest, KeybindRequestT } from '../../solarxr-protocol/rpc/keybind-request.js'; +import { KeybindResponse, KeybindResponseT } from '../../solarxr-protocol/rpc/keybind-response.js'; import { LegTweaksTmpChange, LegTweaksTmpChangeT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; import { LegTweaksTmpClear, LegTweaksTmpClearT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; import { MagToggleRequest, MagToggleRequestT } from '../../solarxr-protocol/rpc/mag-toggle-request.js'; @@ -178,7 +180,7 @@ export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|CancelUserHeightCalibrationT|ChangeMagToggleRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|DetectStayAlignedRelaxedPoseRequestT|EnableStayAlignedRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|IgnoreTrackingChecklistStepRequestT|LegTweaksTmpChangeT|LegTweaksTmpClearT|MagToggleRequestT|MagToggleResponseT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|ResetStayAlignedRelaxedPoseRequestT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerCustomCommandRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResetRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartUserHeightCalibrationT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingChecklistRequestT|TrackingChecklistResponseT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|UserHeightRecordingStatusResponseT|VRCConfigSettingToggleMuteT|VRCConfigStateChangeResponseT|VRCConfigStateRequestT|WifiProvisioningStatusResponseT|null = null + public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|CancelUserHeightCalibrationT|ChangeMagToggleRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|DetectStayAlignedRelaxedPoseRequestT|EnableStayAlignedRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|IgnoreTrackingChecklistStepRequestT|KeybindRequestT|KeybindResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|MagToggleRequestT|MagToggleResponseT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|ResetStayAlignedRelaxedPoseRequestT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerCustomCommandRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResetRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartUserHeightCalibrationT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingChecklistRequestT|TrackingChecklistResponseT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|UserHeightRecordingStatusResponseT|VRCConfigSettingToggleMuteT|VRCConfigStateChangeResponseT|VRCConfigStateRequestT|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 76d9891b..60e69e50 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -26,6 +26,8 @@ import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rp import { HeightRequest, HeightRequestT } from '../../solarxr-protocol/rpc/height-request.js'; import { HeightResponse, HeightResponseT } from '../../solarxr-protocol/rpc/height-response.js'; import { IgnoreTrackingChecklistStepRequest, IgnoreTrackingChecklistStepRequestT } from '../../solarxr-protocol/rpc/ignore-tracking-checklist-step-request.js'; +import { KeybindRequest, KeybindRequestT } from '../../solarxr-protocol/rpc/keybind-request.js'; +import { KeybindResponse, KeybindResponseT } from '../../solarxr-protocol/rpc/keybind-response.js'; import { LegTweaksTmpChange, LegTweaksTmpChangeT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-change.js'; import { LegTweaksTmpClear, LegTweaksTmpClearT } from '../../solarxr-protocol/rpc/leg-tweaks-tmp-clear.js'; import { MagToggleRequest, MagToggleRequestT } from '../../solarxr-protocol/rpc/mag-toggle-request.js'; @@ -159,13 +161,15 @@ export enum RpcMessage { IgnoreTrackingChecklistStepRequest = 75, StartUserHeightCalibration = 76, CancelUserHeightCalibration = 77, - UserHeightRecordingStatusResponse = 78 + UserHeightRecordingStatusResponse = 78, + KeybindRequest = 79, + KeybindResponse = 80 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { + accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -246,15 +250,17 @@ export function unionToRpcMessage( case 'StartUserHeightCalibration': return accessor(new StartUserHeightCalibration())! as StartUserHeightCalibration; case 'CancelUserHeightCalibration': return accessor(new CancelUserHeightCalibration())! as CancelUserHeightCalibration; case 'UserHeightRecordingStatusResponse': return accessor(new UserHeightRecordingStatusResponse())! as UserHeightRecordingStatusResponse; + case 'KeybindRequest': return accessor(new KeybindRequest())! as KeybindRequest; + case 'KeybindResponse': return accessor(new KeybindResponse())! as KeybindResponse; default: return null; } } export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null, + accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null, index: number -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -335,6 +341,8 @@ export function unionListToRpcMessage( case 'StartUserHeightCalibration': return accessor(index, new StartUserHeightCalibration())! as StartUserHeightCalibration; case 'CancelUserHeightCalibration': return accessor(index, new CancelUserHeightCalibration())! as CancelUserHeightCalibration; case 'UserHeightRecordingStatusResponse': return accessor(index, new UserHeightRecordingStatusResponse())! as UserHeightRecordingStatusResponse; + case 'KeybindRequest': return accessor(index, new KeybindRequest())! as KeybindRequest; + case 'KeybindResponse': return accessor(index, new KeybindResponse())! as KeybindResponse; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts index 4a4ac1f9..d707cce6 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts @@ -6,7 +6,6 @@ import { AutoBoneSettings, AutoBoneSettingsT } from '../../solarxr-protocol/rpc/ import { DriftCompensationSettings, DriftCompensationSettingsT } from '../../solarxr-protocol/rpc/drift-compensation-settings.js'; import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings.js'; import { HIDSettings, HIDSettingsT } from '../../solarxr-protocol/rpc/hidsettings.js'; -import { KeybindSettings, KeybindSettingsT } from '../../solarxr-protocol/rpc/keybind-settings.js'; import { OSCRouterSettings, OSCRouterSettingsT } from '../../solarxr-protocol/rpc/oscrouter-settings.js'; import { ResetsSettings, ResetsSettingsT } from '../../solarxr-protocol/rpc/resets-settings.js'; import { StayAlignedSettings, StayAlignedSettingsT } from '../../solarxr-protocol/rpc/stay-aligned-settings.js'; @@ -95,13 +94,8 @@ hidSettings(obj?:HIDSettings):HIDSettings|null { return offset ? (obj || new HIDSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; } -keybindSettings(obj?:KeybindSettings):KeybindSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 28); - return offset ? (obj || new KeybindSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - static startSettingsResponse(builder:flatbuffers.Builder) { - builder.startObject(13); + builder.startObject(12); } static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { @@ -152,10 +146,6 @@ static addHidSettings(builder:flatbuffers.Builder, hidSettingsOffset:flatbuffers builder.addFieldOffset(11, hidSettingsOffset, 0); } -static addKeybindSettings(builder:flatbuffers.Builder, keybindSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(12, keybindSettingsOffset, 0); -} - static endSettingsResponse(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -175,8 +165,7 @@ unpack(): SettingsResponseT { (this.autoBoneSettings() !== null ? this.autoBoneSettings()!.unpack() : null), (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null), (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null), - (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null), - (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null) + (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null) ); } @@ -194,7 +183,6 @@ unpackTo(_o: SettingsResponseT): void { _o.resetsSettings = (this.resetsSettings() !== null ? this.resetsSettings()!.unpack() : null); _o.stayAligned = (this.stayAligned() !== null ? this.stayAligned()!.unpack() : null); _o.hidSettings = (this.hidSettings() !== null ? this.hidSettings()!.unpack() : null); - _o.keybindSettings = (this.keybindSettings() !== null ? this.keybindSettings()!.unpack() : null); } } @@ -211,8 +199,7 @@ constructor( public autoBoneSettings: AutoBoneSettingsT|null = null, public resetsSettings: ResetsSettingsT|null = null, public stayAligned: StayAlignedSettingsT|null = null, - public hidSettings: HIDSettingsT|null = null, - public keybindSettings: KeybindSettingsT|null = null + public hidSettings: HIDSettingsT|null = null ){} @@ -229,7 +216,6 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const resetsSettings = (this.resetsSettings !== null ? this.resetsSettings!.pack(builder) : 0); const stayAligned = (this.stayAligned !== null ? this.stayAligned!.pack(builder) : 0); const hidSettings = (this.hidSettings !== null ? this.hidSettings!.pack(builder) : 0); - const keybindSettings = (this.keybindSettings !== null ? this.keybindSettings!.pack(builder) : 0); SettingsResponse.startSettingsResponse(builder); SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); @@ -244,7 +230,6 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { SettingsResponse.addResetsSettings(builder, resetsSettings); SettingsResponse.addStayAligned(builder, stayAligned); SettingsResponse.addHidSettings(builder, hidSettings); - SettingsResponse.addKeybindSettings(builder, keybindSettings); return SettingsResponse.endSettingsResponse(builder); } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index ab02e169..d6291665 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -95,7 +95,28 @@ union RpcMessage { IgnoreTrackingChecklistStepRequest, StartUserHeightCalibration, CancelUserHeightCalibration, - UserHeightRecordingStatusResponse + UserHeightRecordingStatusResponse, + KeybindRequest, + KeybindResponse +} + +enum KeybindName: uint8 { + FULL_RESET = 0, + YAW_RESET = 1, + MOUNTING_RESET = 2, + PAUSE_TRACKING = 3 +} + +table Keybind { + keybind_name: KeybindName; + value: string; + delay: long; +} + +table KeybindRequest {} + +table KeybindResponse { + keybinds: [Keybind]; } @@ -173,7 +194,6 @@ table SettingsResponse { resets_settings: ResetsSettings; stay_aligned: StayAlignedSettings; hid_settings: HIDSettings; - keybind_settings: KeybindSettings; } table ChangeSettingsRequest { @@ -189,9 +209,9 @@ table ChangeSettingsRequest { resets_settings: ResetsSettings; stay_aligned: StayAlignedSettings; hid_settings: HIDSettings; - keybind_settings: KeybindSettings; } + table SteamVRTrackersSetting { waist: bool; chest: bool; @@ -330,27 +350,6 @@ table HIDSettings { trackersOverHID: bool; } -table Key { - key: string; -} - -table Keybind { - value: [Key]; -} - -table KeybindSettings { - name: string; - keybind: Keybind; -} - -table KeybindSettings { - name: string; - keybind: [Keybind]; -} - -table Keybind { - keybind: string; -} /// See TapDetectionSettings::setup_mode table TapDetectionSetupNotification { From 5eb7ee18d6a14e1b3a54e72cffb6340dc3dd8a44 Mon Sep 17 00:00:00 2001 From: Hannah Lynn Lindrob Date: Fri, 16 Jan 2026 16:04:25 +0100 Subject: [PATCH 4/8] Keybind Request and Response are working --- .../generated/all_generated.h | 140 +++++++++++++----- .../src/solarxr_protocol/rpc/Keybind.java | 34 ++--- .../src/solarxr_protocol/rpc/KeybindT.java | 16 +- .../src/solarxr_protocol/rpc/RpcMessage.java | 5 +- .../rpc/RpcMessageHeader.java | 4 + .../solarxr_protocol/rpc/RpcMessageUnion.java | 2 + .../src/solarxr_protocol/rpc/Keybind.kt | 18 +-- .../src/solarxr_protocol/rpc/RpcMessage.kt | 5 +- protocol/rust/src/generated/mod.rs | 2 + .../solarxr_protocol/rpc/keybind_generated.rs | 40 ++--- .../rpc/rpc_message_generated.rs | 12 +- .../rpc/rpc_message_header_generated.rs | 23 +++ protocol/typescript/src/all_generated.ts | 1 + .../src/solarxr-protocol/rpc/keybind.ts | 40 ++--- .../rpc/rpc-message-header.ts | 3 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 14 +- schema/rpc.fbs | 17 ++- 17 files changed, 245 insertions(+), 131 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index c2e34601..ffb4e192 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -155,6 +155,9 @@ struct KeybindRequestBuilder; struct KeybindResponse; struct KeybindResponseBuilder; +struct ChangeKeybindRequest; +struct ChangeKeybindRequestBuilder; + struct RpcMessageHeader; struct RpcMessageHeaderBuilder; @@ -1384,12 +1387,13 @@ enum class RpcMessage : uint8_t { CancelUserHeightCalibration = 77, UserHeightRecordingStatusResponse = 78, KeybindRequest = 79, - KeybindResponse = 80, + ChangeKeybindRequest = 80, + KeybindResponse = 81, MIN = NONE, MAX = KeybindResponse }; -inline const RpcMessage (&EnumValuesRpcMessage())[81] { +inline const RpcMessage (&EnumValuesRpcMessage())[82] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -1471,13 +1475,14 @@ inline const RpcMessage (&EnumValuesRpcMessage())[81] { RpcMessage::CancelUserHeightCalibration, RpcMessage::UserHeightRecordingStatusResponse, RpcMessage::KeybindRequest, + RpcMessage::ChangeKeybindRequest, RpcMessage::KeybindResponse }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[82] = { + static const char * const names[83] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -1558,6 +1563,7 @@ inline const char * const *EnumNamesRpcMessage() { "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", + "ChangeKeybindRequest", "KeybindResponse", nullptr }; @@ -1890,6 +1896,10 @@ template<> struct RpcMessageTraits { static const RpcMessage enum_value = RpcMessage::KeybindRequest; }; +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ChangeKeybindRequest; +}; + template<> struct RpcMessageTraits { static const RpcMessage enum_value = RpcMessage::KeybindResponse; }; @@ -5873,24 +5883,24 @@ struct Keybind FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef KeybindBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_KEYBIND_NAME = 4, - VT_VALUE = 6, - VT_DELAY = 8 + VT_KEYBIND_VALUE = 6, + VT_KEYBIND_DELAY = 8 }; solarxr_protocol::rpc::KeybindName keybind_name() const { return static_cast(GetField(VT_KEYBIND_NAME, 0)); } - const flatbuffers::String *value() const { - return GetPointer(VT_VALUE); + const flatbuffers::String *keybind_value() const { + return GetPointer(VT_KEYBIND_VALUE); } - int64_t delay() const { - return GetField(VT_DELAY, 0); + int64_t keybind_delay() const { + return GetField(VT_KEYBIND_DELAY, 0); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_KEYBIND_NAME, 1) && - VerifyOffset(verifier, VT_VALUE) && - verifier.VerifyString(value()) && - VerifyField(verifier, VT_DELAY, 8) && + VerifyOffset(verifier, VT_KEYBIND_VALUE) && + verifier.VerifyString(keybind_value()) && + VerifyField(verifier, VT_KEYBIND_DELAY, 8) && verifier.EndTable(); } }; @@ -5902,11 +5912,11 @@ struct KeybindBuilder { void add_keybind_name(solarxr_protocol::rpc::KeybindName keybind_name) { fbb_.AddElement(Keybind::VT_KEYBIND_NAME, static_cast(keybind_name), 0); } - void add_value(flatbuffers::Offset value) { - fbb_.AddOffset(Keybind::VT_VALUE, value); + void add_keybind_value(flatbuffers::Offset keybind_value) { + fbb_.AddOffset(Keybind::VT_KEYBIND_VALUE, keybind_value); } - void add_delay(int64_t delay) { - fbb_.AddElement(Keybind::VT_DELAY, delay, 0); + void add_keybind_delay(int64_t keybind_delay) { + fbb_.AddElement(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0); } explicit KeybindBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { @@ -5922,11 +5932,11 @@ struct KeybindBuilder { inline flatbuffers::Offset CreateKeybind( flatbuffers::FlatBufferBuilder &_fbb, solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET, - flatbuffers::Offset value = 0, - int64_t delay = 0) { + flatbuffers::Offset keybind_value = 0, + int64_t keybind_delay = 0) { KeybindBuilder builder_(_fbb); - builder_.add_delay(delay); - builder_.add_value(value); + builder_.add_keybind_delay(keybind_delay); + builder_.add_keybind_value(keybind_value); builder_.add_keybind_name(keybind_name); return builder_.Finish(); } @@ -5934,20 +5944,27 @@ inline flatbuffers::Offset CreateKeybind( inline flatbuffers::Offset CreateKeybindDirect( flatbuffers::FlatBufferBuilder &_fbb, solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET, - const char *value = nullptr, - int64_t delay = 0) { - auto value__ = value ? _fbb.CreateString(value) : 0; + const char *keybind_value = nullptr, + int64_t keybind_delay = 0) { + auto keybind_value__ = keybind_value ? _fbb.CreateString(keybind_value) : 0; return solarxr_protocol::rpc::CreateKeybind( _fbb, keybind_name, - value__, - delay); + keybind_value__, + keybind_delay); } struct KeybindRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef KeybindRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEYBIND_NAME = 4 + }; + solarxr_protocol::rpc::KeybindName keybind_name() const { + return static_cast(GetField(VT_KEYBIND_NAME, 0)); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && + VerifyField(verifier, VT_KEYBIND_NAME, 1) && verifier.EndTable(); } }; @@ -5956,6 +5973,9 @@ struct KeybindRequestBuilder { typedef KeybindRequest Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; + void add_keybind_name(solarxr_protocol::rpc::KeybindName keybind_name) { + fbb_.AddElement(KeybindRequest::VT_KEYBIND_NAME, static_cast(keybind_name), 0); + } explicit KeybindRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -5968,24 +5988,26 @@ struct KeybindRequestBuilder { }; inline flatbuffers::Offset CreateKeybindRequest( - flatbuffers::FlatBufferBuilder &_fbb) { + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET) { KeybindRequestBuilder builder_(_fbb); + builder_.add_keybind_name(keybind_name); return builder_.Finish(); } struct KeybindResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef KeybindResponseBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_KEYBINDS = 4 + VT_KEYBIND = 4 }; - const flatbuffers::Vector> *keybinds() const { - return GetPointer> *>(VT_KEYBINDS); + const flatbuffers::Vector> *keybind() const { + return GetPointer> *>(VT_KEYBIND); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_KEYBINDS) && - verifier.VerifyVector(keybinds()) && - verifier.VerifyVectorOfTables(keybinds()) && + VerifyOffset(verifier, VT_KEYBIND) && + verifier.VerifyVector(keybind()) && + verifier.VerifyVectorOfTables(keybind()) && verifier.EndTable(); } }; @@ -5994,8 +6016,8 @@ struct KeybindResponseBuilder { typedef KeybindResponse Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_keybinds(flatbuffers::Offset>> keybinds) { - fbb_.AddOffset(KeybindResponse::VT_KEYBINDS, keybinds); + void add_keybind(flatbuffers::Offset>> keybind) { + fbb_.AddOffset(KeybindResponse::VT_KEYBIND, keybind); } explicit KeybindResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { @@ -6010,19 +6032,48 @@ struct KeybindResponseBuilder { inline flatbuffers::Offset CreateKeybindResponse( flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> keybinds = 0) { + flatbuffers::Offset>> keybind = 0) { KeybindResponseBuilder builder_(_fbb); - builder_.add_keybinds(keybinds); + builder_.add_keybind(keybind); return builder_.Finish(); } inline flatbuffers::Offset CreateKeybindResponseDirect( flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *keybinds = nullptr) { - auto keybinds__ = keybinds ? _fbb.CreateVector>(*keybinds) : 0; + const std::vector> *keybind = nullptr) { + auto keybind__ = keybind ? _fbb.CreateVector>(*keybind) : 0; return solarxr_protocol::rpc::CreateKeybindResponse( _fbb, - keybinds__); + keybind__); +} + +struct ChangeKeybindRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ChangeKeybindRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct ChangeKeybindRequestBuilder { + typedef ChangeKeybindRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ChangeKeybindRequestBuilder(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 CreateChangeKeybindRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + ChangeKeybindRequestBuilder builder_(_fbb); + return builder_.Finish(); } struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { @@ -6281,6 +6332,9 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::KeybindRequest *message_as_KeybindRequest() const { return message_type() == solarxr_protocol::rpc::RpcMessage::KeybindRequest ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::ChangeKeybindRequest *message_as_ChangeKeybindRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ChangeKeybindRequest ? static_cast(message()) : nullptr; + } const solarxr_protocol::rpc::KeybindResponse *message_as_KeybindResponse() const { return message_type() == solarxr_protocol::rpc::RpcMessage::KeybindResponse ? static_cast(message()) : nullptr; } @@ -6610,6 +6664,10 @@ template<> inline const solarxr_protocol::rpc::KeybindRequest *RpcMessageHeader: return message_as_KeybindRequest(); } +template<> inline const solarxr_protocol::rpc::ChangeKeybindRequest *RpcMessageHeader::message_as() const { + return message_as_ChangeKeybindRequest(); +} + template<> inline const solarxr_protocol::rpc::KeybindResponse *RpcMessageHeader::message_as() const { return message_as_KeybindResponse(); } @@ -14683,6 +14741,10 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::ChangeKeybindRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } case RpcMessage::KeybindResponse: { auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); diff --git a/protocol/java/src/solarxr_protocol/rpc/Keybind.java b/protocol/java/src/solarxr_protocol/rpc/Keybind.java index d9a3214f..3ef9aefd 100644 --- a/protocol/java/src/solarxr_protocol/rpc/Keybind.java +++ b/protocol/java/src/solarxr_protocol/rpc/Keybind.java @@ -16,26 +16,26 @@ public final class Keybind extends Table { public Keybind __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public int keybindName() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public String value() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - public long delay() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public String keybindValue() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer keybindValueAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer keybindValueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public long keybindDelay() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } public static int createKeybind(FlatBufferBuilder builder, int keybindName, - int valueOffset, - long delay) { + int keybindValueOffset, + long keybindDelay) { builder.startTable(3); - Keybind.addDelay(builder, delay); - Keybind.addValue(builder, valueOffset); + Keybind.addKeybindDelay(builder, keybindDelay); + Keybind.addKeybindValue(builder, keybindValueOffset); Keybind.addKeybindName(builder, keybindName); return Keybind.endKeybind(builder); } public static void startKeybind(FlatBufferBuilder builder) { builder.startTable(3); } public static void addKeybindName(FlatBufferBuilder builder, int keybindName) { builder.addByte(0, (byte) keybindName, (byte) 0); } - public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(1, valueOffset, 0); } - public static void addDelay(FlatBufferBuilder builder, long delay) { builder.addLong(2, delay, 0L); } + public static void addKeybindValue(FlatBufferBuilder builder, int keybindValueOffset) { builder.addOffset(1, keybindValueOffset, 0); } + public static void addKeybindDelay(FlatBufferBuilder builder, long keybindDelay) { builder.addLong(2, keybindDelay, 0L); } public static int endKeybind(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -55,19 +55,19 @@ public KeybindT unpack() { public void unpackTo(KeybindT _o) { int _oKeybindName = keybindName(); _o.setKeybindName(_oKeybindName); - String _oValue = value(); - _o.setValue(_oValue); - long _oDelay = delay(); - _o.setDelay(_oDelay); + String _oKeybindValue = keybindValue(); + _o.setKeybindValue(_oKeybindValue); + long _oKeybindDelay = keybindDelay(); + _o.setKeybindDelay(_oKeybindDelay); } public static int pack(FlatBufferBuilder builder, KeybindT _o) { if (_o == null) return 0; - int _value = _o.getValue() == null ? 0 : builder.createString(_o.getValue()); + int _keybindValue = _o.getKeybindValue() == null ? 0 : builder.createString(_o.getKeybindValue()); return createKeybind( builder, _o.getKeybindName(), - _value, - _o.getDelay()); + _keybindValue, + _o.getKeybindDelay()); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java index 6a5ff944..36d3ffe2 100644 --- a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java @@ -9,26 +9,26 @@ public class KeybindT { private int keybindName; - private String value; - private long delay; + private String keybindValue; + private long keybindDelay; public int getKeybindName() { return keybindName; } public void setKeybindName(int keybindName) { this.keybindName = keybindName; } - public String getValue() { return value; } + public String getKeybindValue() { return keybindValue; } - public void setValue(String value) { this.value = value; } + public void setKeybindValue(String keybindValue) { this.keybindValue = keybindValue; } - public long getDelay() { return delay; } + public long getKeybindDelay() { return keybindDelay; } - public void setDelay(long delay) { this.delay = delay; } + public void setKeybindDelay(long keybindDelay) { this.keybindDelay = keybindDelay; } public KeybindT() { this.keybindName = 0; - this.value = null; - this.delay = 0L; + this.keybindValue = null; + this.keybindDelay = 0L; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index 1c7f75e1..8c7b0ac5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -85,9 +85,10 @@ private RpcMessage() { } public static final byte CancelUserHeightCalibration = 77; public static final byte UserHeightRecordingStatusResponse = 78; public static final byte KeybindRequest = 79; - public static final byte KeybindResponse = 80; + public static final byte ChangeKeybindRequest = 80; + public static final byte KeybindResponse = 81; - 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", "KeybindResponse", }; + 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", "ChangeKeybindRequest", "KeybindResponse", }; 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 bd424edb..0001a2d5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -368,6 +368,10 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.KeybindRequest()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.KeybindRequest) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.ChangeKeybindRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ChangeKeybindRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ChangeKeybindRequest) _oMessageValue).unpack() : null); + break; case solarxr_protocol.rpc.RpcMessage.KeybindResponse: _oMessageValue = message(new solarxr_protocol.rpc.KeybindResponse()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.KeybindResponse) _oMessageValue).unpack() : null); diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java index 6ed495b7..b47b278d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -100,6 +100,7 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.CancelUserHeightCalibrationT asCancelUserHeightCalibration() { return (solarxr_protocol.rpc.CancelUserHeightCalibrationT) value; } public solarxr_protocol.rpc.UserHeightRecordingStatusResponseT asUserHeightRecordingStatusResponse() { return (solarxr_protocol.rpc.UserHeightRecordingStatusResponseT) value; } public solarxr_protocol.rpc.KeybindRequestT asKeybindRequest() { return (solarxr_protocol.rpc.KeybindRequestT) value; } + public solarxr_protocol.rpc.ChangeKeybindRequestT asChangeKeybindRequest() { return (solarxr_protocol.rpc.ChangeKeybindRequestT) value; } public solarxr_protocol.rpc.KeybindResponseT asKeybindResponse() { return (solarxr_protocol.rpc.KeybindResponseT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { @@ -183,6 +184,7 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.CancelUserHeightCalibration: return solarxr_protocol.rpc.CancelUserHeightCalibration.pack(builder, _o.asCancelUserHeightCalibration()); case RpcMessage.UserHeightRecordingStatusResponse: return solarxr_protocol.rpc.UserHeightRecordingStatusResponse.pack(builder, _o.asUserHeightRecordingStatusResponse()); case RpcMessage.KeybindRequest: return solarxr_protocol.rpc.KeybindRequest.pack(builder, _o.asKeybindRequest()); + case RpcMessage.ChangeKeybindRequest: return solarxr_protocol.rpc.ChangeKeybindRequest.pack(builder, _o.asChangeKeybindRequest()); case RpcMessage.KeybindResponse: return solarxr_protocol.rpc.KeybindResponse.pack(builder, _o.asKeybindResponse()); default: return 0; } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt index ef54274a..3538a586 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt @@ -21,14 +21,14 @@ class Keybind : Table() { val o = __offset(4) return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u } - val value : String? + val keybindValue : String? get() { val o = __offset(6) return if (o != 0) __string(o + bb_pos) else null } - val valueAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) - fun valueInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - val delay : Long + val keybindValueAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) + fun keybindValueInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) + val keybindDelay : Long get() { val o = __offset(8) return if(o != 0) bb.getLong(o + bb_pos) else 0L @@ -44,10 +44,10 @@ class Keybind : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createKeybind(builder: FlatBufferBuilder, keybindName: UByte, valueOffset: Int, delay: Long) : Int { + fun createKeybind(builder: FlatBufferBuilder, keybindName: UByte, keybindValueOffset: Int, keybindDelay: Long) : Int { builder.startTable(3) - addDelay(builder, delay) - addValue(builder, valueOffset) + addKeybindDelay(builder, keybindDelay) + addKeybindValue(builder, keybindValueOffset) addKeybindName(builder, keybindName) return endKeybind(builder) } @@ -56,9 +56,9 @@ class Keybind : Table() { @JvmStatic fun addKeybindName(builder: FlatBufferBuilder, keybindName: UByte) = builder.addByte(0, keybindName.toByte(), 0) @JvmStatic - fun addValue(builder: FlatBufferBuilder, value: Int) = builder.addOffset(1, value, 0) + fun addKeybindValue(builder: FlatBufferBuilder, keybindValue: Int) = builder.addOffset(1, keybindValue, 0) @JvmStatic - fun addDelay(builder: FlatBufferBuilder, delay: Long) = builder.addLong(2, delay, 0L) + fun addKeybindDelay(builder: FlatBufferBuilder, keybindDelay: Long) = builder.addLong(2, keybindDelay, 0L) @JvmStatic fun endKeybind(builder: FlatBufferBuilder) : Int { val o = builder.endTable() diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt index 6145ce8a..6061068e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/RpcMessage.kt @@ -85,8 +85,9 @@ class RpcMessage private constructor() { const val CancelUserHeightCalibration: UByte = 77u const val UserHeightRecordingStatusResponse: UByte = 78u const val KeybindRequest: UByte = 79u - const val KeybindResponse: UByte = 80u - 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", "KeybindResponse") + const val ChangeKeybindRequest: UByte = 80u + const val KeybindResponse: UByte = 81u + 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", "FirmwareUpdateRequest", "FirmwareUpdateStatusResponse", "FirmwareUpdateStopQueuesRequest", "SettingsResetRequest", "MagToggleRequest", "MagToggleResponse", "ChangeMagToggleRequest", "RecordBVHStatusRequest", "VRCConfigStateRequest", "VRCConfigStateChangeResponse", "EnableStayAlignedRequest", "DetectStayAlignedRelaxedPoseRequest", "ResetStayAlignedRelaxedPoseRequest", "SerialTrackerCustomCommandRequest", "VRCConfigSettingToggleMute", "TrackingChecklistRequest", "TrackingChecklistResponse", "IgnoreTrackingChecklistStepRequest", "StartUserHeightCalibration", "CancelUserHeightCalibration", "UserHeightRecordingStatusResponse", "KeybindRequest", "ChangeKeybindRequest", "KeybindResponse") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 3bb9f629..30077b62 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -196,6 +196,8 @@ pub mod solarxr_protocol { pub use self::keybind_request_generated::*; mod keybind_response_generated; pub use self::keybind_response_generated::*; + mod change_keybind_request_generated; + pub use self::change_keybind_request_generated::*; mod rpc_message_header_generated; pub use self::rpc_message_header_generated::*; mod heartbeat_request_generated; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs index 2353fa0d..169aaa27 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs @@ -26,8 +26,8 @@ impl<'a> flatbuffers::Follow<'a> for Keybind<'a> { impl<'a> Keybind<'a> { pub const VT_KEYBIND_NAME: flatbuffers::VOffsetT = 4; - pub const VT_VALUE: flatbuffers::VOffsetT = 6; - pub const VT_DELAY: flatbuffers::VOffsetT = 8; + pub const VT_KEYBIND_VALUE: flatbuffers::VOffsetT = 6; + pub const VT_KEYBIND_DELAY: flatbuffers::VOffsetT = 8; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -39,8 +39,8 @@ impl<'a> Keybind<'a> { args: &'args KeybindArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = KeybindBuilder::new(_fbb); - builder.add_delay(args.delay); - if let Some(x) = args.value { builder.add_value(x); } + builder.add_keybind_delay(args.keybind_delay); + if let Some(x) = args.keybind_value { builder.add_keybind_value(x); } builder.add_keybind_name(args.keybind_name); builder.finish() } @@ -54,18 +54,18 @@ impl<'a> Keybind<'a> { unsafe { self._tab.get::(Keybind::VT_KEYBIND_NAME, Some(KeybindName::FULL_RESET)).unwrap()} } #[inline] - pub fn value(&self) -> Option<&'a str> { + pub fn keybind_value(&self) -> Option<&'a str> { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::>(Keybind::VT_VALUE, None)} + unsafe { self._tab.get::>(Keybind::VT_KEYBIND_VALUE, None)} } #[inline] - pub fn delay(&self) -> i64 { + pub fn keybind_delay(&self) -> i64 { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::(Keybind::VT_DELAY, Some(0)).unwrap()} + unsafe { self._tab.get::(Keybind::VT_KEYBIND_DELAY, Some(0)).unwrap()} } } @@ -77,24 +77,24 @@ impl flatbuffers::Verifiable for Keybind<'_> { use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("keybind_name", Self::VT_KEYBIND_NAME, false)? - .visit_field::>("value", Self::VT_VALUE, false)? - .visit_field::("delay", Self::VT_DELAY, false)? + .visit_field::>("keybind_value", Self::VT_KEYBIND_VALUE, false)? + .visit_field::("keybind_delay", Self::VT_KEYBIND_DELAY, false)? .finish(); Ok(()) } } pub struct KeybindArgs<'a> { pub keybind_name: KeybindName, - pub value: Option>, - pub delay: i64, + pub keybind_value: Option>, + pub keybind_delay: i64, } impl<'a> Default for KeybindArgs<'a> { #[inline] fn default() -> Self { KeybindArgs { keybind_name: KeybindName::FULL_RESET, - value: None, - delay: 0, + keybind_value: None, + keybind_delay: 0, } } } @@ -109,12 +109,12 @@ impl<'a: 'b, 'b> KeybindBuilder<'a, 'b> { self.fbb_.push_slot::(Keybind::VT_KEYBIND_NAME, keybind_name, KeybindName::FULL_RESET); } #[inline] - pub fn add_value(&mut self, value: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(Keybind::VT_VALUE, value); + pub fn add_keybind_value(&mut self, keybind_value: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(Keybind::VT_KEYBIND_VALUE, keybind_value); } #[inline] - pub fn add_delay(&mut self, delay: i64) { - self.fbb_.push_slot::(Keybind::VT_DELAY, delay, 0); + pub fn add_keybind_delay(&mut self, keybind_delay: i64) { + self.fbb_.push_slot::(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindBuilder<'a, 'b> { @@ -135,8 +135,8 @@ impl core::fmt::Debug for Keybind<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Keybind"); ds.field("keybind_name", &self.keybind_name()); - ds.field("value", &self.value()); - ds.field("delay", &self.delay()); + ds.field("keybind_value", &self.keybind_value()); + ds.field("keybind_delay", &self.keybind_delay()); 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 ca766f9d..c0224c72 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 = 80; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 81; #[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; 81] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 82] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -96,6 +96,7 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 81] = [ RpcMessage::CancelUserHeightCalibration, RpcMessage::UserHeightRecordingStatusResponse, RpcMessage::KeybindRequest, + RpcMessage::ChangeKeybindRequest, RpcMessage::KeybindResponse, ]; @@ -184,10 +185,11 @@ impl RpcMessage { pub const CancelUserHeightCalibration: Self = Self(77); pub const UserHeightRecordingStatusResponse: Self = Self(78); pub const KeybindRequest: Self = Self(79); - pub const KeybindResponse: Self = Self(80); + pub const ChangeKeybindRequest: Self = Self(80); + pub const KeybindResponse: Self = Self(81); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 80; + pub const ENUM_MAX: u8 = 81; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -269,6 +271,7 @@ impl RpcMessage { Self::CancelUserHeightCalibration, Self::UserHeightRecordingStatusResponse, Self::KeybindRequest, + Self::ChangeKeybindRequest, Self::KeybindResponse, ]; /// Returns the variant's name or "" if unknown. @@ -354,6 +357,7 @@ impl RpcMessage { Self::CancelUserHeightCalibration => Some("CancelUserHeightCalibration"), Self::UserHeightRecordingStatusResponse => Some("UserHeightRecordingStatusResponse"), Self::KeybindRequest => Some("KeybindRequest"), + Self::ChangeKeybindRequest => Some("ChangeKeybindRequest"), Self::KeybindResponse => Some("KeybindResponse"), _ => 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 81832f43..06d81b83 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 @@ -1254,6 +1254,21 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_change_keybind_request(&self) -> Option> { + if self.message_type() == RpcMessage::ChangeKeybindRequest { + self.message().map(|t| { + // Safety: + // Created from a valid Table for this object + // Which contains a valid union in this slot + unsafe { ChangeKeybindRequest::init_from_table(t) } + }) + } else { + None + } + } + #[inline] #[allow(non_snake_case)] pub fn message_as_keybind_response(&self) -> Option> { @@ -1360,6 +1375,7 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::CancelUserHeightCalibration => v.verify_union_variant::>("RpcMessage::CancelUserHeightCalibration", pos), RpcMessage::UserHeightRecordingStatusResponse => v.verify_union_variant::>("RpcMessage::UserHeightRecordingStatusResponse", pos), RpcMessage::KeybindRequest => v.verify_union_variant::>("RpcMessage::KeybindRequest", pos), + RpcMessage::ChangeKeybindRequest => v.verify_union_variant::>("RpcMessage::ChangeKeybindRequest", pos), RpcMessage::KeybindResponse => v.verify_union_variant::>("RpcMessage::KeybindResponse", pos), _ => Ok(()), } @@ -1975,6 +1991,13 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::ChangeKeybindRequest => { + if let Some(x) = self.message_as_change_keybind_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, RpcMessage::KeybindResponse => { if let Some(x) = self.message_as_keybind_response() { ds.field("message", &x) diff --git a/protocol/typescript/src/all_generated.ts b/protocol/typescript/src/all_generated.ts index 05e342d9..bc983a32 100644 --- a/protocol/typescript/src/all_generated.ts +++ b/protocol/typescript/src/all_generated.ts @@ -64,6 +64,7 @@ export { AutoBoneProcessType } from './solarxr-protocol/rpc/auto-bone-process-ty export { AutoBoneSettings, AutoBoneSettingsT } from './solarxr-protocol/rpc/auto-bone-settings.js'; export { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from './solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; export { CancelUserHeightCalibration, CancelUserHeightCalibrationT } from './solarxr-protocol/rpc/cancel-user-height-calibration.js'; +export { ChangeKeybindRequest, ChangeKeybindRequestT } from './solarxr-protocol/rpc/change-keybind-request.js'; export { ChangeMagToggleRequest, ChangeMagToggleRequestT } from './solarxr-protocol/rpc/change-mag-toggle-request.js'; export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr-protocol/rpc/change-settings-request.js'; export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr-protocol/rpc/change-skeleton-config-request.js'; diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts index 9038c2b4..6007732b 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts @@ -28,14 +28,14 @@ keybindName():KeybindName { return offset ? this.bb!.readUint8(this.bb_pos + offset) : KeybindName.FULL_RESET; } -value():string|null -value(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -value(optionalEncoding?:any):string|Uint8Array|null { +keybindValue():string|null +keybindValue(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +keybindValue(optionalEncoding?:any):string|Uint8Array|null { const offset = this.bb!.__offset(this.bb_pos, 6); return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } -delay():bigint { +keybindDelay():bigint { const offset = this.bb!.__offset(this.bb_pos, 8); return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0'); } @@ -48,12 +48,12 @@ static addKeybindName(builder:flatbuffers.Builder, keybindName:KeybindName) { builder.addFieldInt8(0, keybindName, KeybindName.FULL_RESET); } -static addValue(builder:flatbuffers.Builder, valueOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, valueOffset, 0); +static addKeybindValue(builder:flatbuffers.Builder, keybindValueOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, keybindValueOffset, 0); } -static addDelay(builder:flatbuffers.Builder, delay:bigint) { - builder.addFieldInt64(2, delay, BigInt('0')); +static addKeybindDelay(builder:flatbuffers.Builder, keybindDelay:bigint) { + builder.addFieldInt64(2, keybindDelay, BigInt('0')); } static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -61,45 +61,45 @@ static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { return offset; } -static createKeybind(builder:flatbuffers.Builder, keybindName:KeybindName, valueOffset:flatbuffers.Offset, delay:bigint):flatbuffers.Offset { +static createKeybind(builder:flatbuffers.Builder, keybindName:KeybindName, keybindValueOffset:flatbuffers.Offset, keybindDelay:bigint):flatbuffers.Offset { Keybind.startKeybind(builder); Keybind.addKeybindName(builder, keybindName); - Keybind.addValue(builder, valueOffset); - Keybind.addDelay(builder, delay); + Keybind.addKeybindValue(builder, keybindValueOffset); + Keybind.addKeybindDelay(builder, keybindDelay); return Keybind.endKeybind(builder); } unpack(): KeybindT { return new KeybindT( this.keybindName(), - this.value(), - this.delay() + this.keybindValue(), + this.keybindDelay() ); } unpackTo(_o: KeybindT): void { _o.keybindName = this.keybindName(); - _o.value = this.value(); - _o.delay = this.delay(); + _o.keybindValue = this.keybindValue(); + _o.keybindDelay = this.keybindDelay(); } } export class KeybindT implements flatbuffers.IGeneratedObject { constructor( public keybindName: KeybindName = KeybindName.FULL_RESET, - public value: string|Uint8Array|null = null, - public delay: bigint = BigInt('0') + public keybindValue: string|Uint8Array|null = null, + public keybindDelay: bigint = BigInt('0') ){} pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const value = (this.value !== null ? builder.createString(this.value!) : 0); + const keybindValue = (this.keybindValue !== null ? builder.createString(this.keybindValue!) : 0); return Keybind.createKeybind(builder, this.keybindName, - value, - this.delay + keybindValue, + this.keybindDelay ); } } 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 14f2c452..f6f19856 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -12,6 +12,7 @@ import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-p import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response.js'; import { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; import { CancelUserHeightCalibration, CancelUserHeightCalibrationT } from '../../solarxr-protocol/rpc/cancel-user-height-calibration.js'; +import { ChangeKeybindRequest, ChangeKeybindRequestT } from '../../solarxr-protocol/rpc/change-keybind-request.js'; import { ChangeMagToggleRequest, ChangeMagToggleRequestT } from '../../solarxr-protocol/rpc/change-mag-toggle-request.js'; import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request.js'; import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request.js'; @@ -180,7 +181,7 @@ export class RpcMessageHeaderT implements flatbuffers.IGeneratedObject { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|CancelUserHeightCalibrationT|ChangeMagToggleRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|DetectStayAlignedRelaxedPoseRequestT|EnableStayAlignedRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|IgnoreTrackingChecklistStepRequestT|KeybindRequestT|KeybindResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|MagToggleRequestT|MagToggleResponseT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|ResetStayAlignedRelaxedPoseRequestT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerCustomCommandRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResetRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartUserHeightCalibrationT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingChecklistRequestT|TrackingChecklistResponseT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|UserHeightRecordingStatusResponseT|VRCConfigSettingToggleMuteT|VRCConfigStateChangeResponseT|VRCConfigStateRequestT|WifiProvisioningStatusResponseT|null = null + public message: AddUnknownDeviceRequestT|AssignTrackerRequestT|AutoBoneApplyRequestT|AutoBoneCancelRecordingRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|AutoBoneStopRecordingRequestT|CancelUserHeightCalibrationT|ChangeKeybindRequestT|ChangeMagToggleRequestT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|ClearDriftCompensationRequestT|ClearMountingResetRequestT|CloseSerialRequestT|DetectStayAlignedRelaxedPoseRequestT|EnableStayAlignedRequestT|FirmwareUpdateRequestT|FirmwareUpdateStatusResponseT|FirmwareUpdateStopQueuesRequestT|ForgetDeviceRequestT|HeartbeatRequestT|HeartbeatResponseT|HeightRequestT|HeightResponseT|IgnoreTrackingChecklistStepRequestT|KeybindRequestT|KeybindResponseT|LegTweaksTmpChangeT|LegTweaksTmpClearT|MagToggleRequestT|MagToggleResponseT|NewSerialDeviceResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusRequestT|RecordBVHStatusT|ResetRequestT|ResetResponseT|ResetStayAlignedRelaxedPoseRequestT|SaveFileNotificationT|SerialDevicesRequestT|SerialDevicesResponseT|SerialTrackerCustomCommandRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerGetWifiScanRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|ServerInfosRequestT|ServerInfosResponseT|SetPauseTrackingRequestT|SetWifiRequestT|SettingsRequestT|SettingsResetRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|StartUserHeightCalibrationT|StartWifiProvisioningRequestT|StatusSystemFixedT|StatusSystemRequestT|StatusSystemResponseT|StatusSystemUpdateT|StopWifiProvisioningRequestT|TapDetectionSetupNotificationT|TrackingChecklistRequestT|TrackingChecklistResponseT|TrackingPauseStateRequestT|TrackingPauseStateResponseT|UnknownDeviceHandshakeNotificationT|UserHeightRecordingStatusResponseT|VRCConfigSettingToggleMuteT|VRCConfigStateChangeResponseT|VRCConfigStateRequestT|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 60e69e50..11a80960 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -9,6 +9,7 @@ import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-p import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response.js'; import { AutoBoneStopRecordingRequest, AutoBoneStopRecordingRequestT } from '../../solarxr-protocol/rpc/auto-bone-stop-recording-request.js'; import { CancelUserHeightCalibration, CancelUserHeightCalibrationT } from '../../solarxr-protocol/rpc/cancel-user-height-calibration.js'; +import { ChangeKeybindRequest, ChangeKeybindRequestT } from '../../solarxr-protocol/rpc/change-keybind-request.js'; import { ChangeMagToggleRequest, ChangeMagToggleRequestT } from '../../solarxr-protocol/rpc/change-mag-toggle-request.js'; import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request.js'; import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request.js'; @@ -163,13 +164,14 @@ export enum RpcMessage { CancelUserHeightCalibration = 77, UserHeightRecordingStatusResponse = 78, KeybindRequest = 79, - KeybindResponse = 80 + ChangeKeybindRequest = 80, + KeybindResponse = 81 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { + accessor: (obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeKeybindRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeKeybindRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeKeybindRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -251,6 +253,7 @@ export function unionToRpcMessage( case 'CancelUserHeightCalibration': return accessor(new CancelUserHeightCalibration())! as CancelUserHeightCalibration; case 'UserHeightRecordingStatusResponse': return accessor(new UserHeightRecordingStatusResponse())! as UserHeightRecordingStatusResponse; case 'KeybindRequest': return accessor(new KeybindRequest())! as KeybindRequest; + case 'ChangeKeybindRequest': return accessor(new ChangeKeybindRequest())! as ChangeKeybindRequest; case 'KeybindResponse': return accessor(new KeybindResponse())! as KeybindResponse; default: return null; } @@ -258,9 +261,9 @@ export function unionToRpcMessage( export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null, + accessor: (index: number, obj:AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeKeybindRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse) => AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeKeybindRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null, index: number -): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { +): AddUnknownDeviceRequest|AssignTrackerRequest|AutoBoneApplyRequest|AutoBoneCancelRecordingRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|AutoBoneStopRecordingRequest|CancelUserHeightCalibration|ChangeKeybindRequest|ChangeMagToggleRequest|ChangeSettingsRequest|ChangeSkeletonConfigRequest|ClearDriftCompensationRequest|ClearMountingResetRequest|CloseSerialRequest|DetectStayAlignedRelaxedPoseRequest|EnableStayAlignedRequest|FirmwareUpdateRequest|FirmwareUpdateStatusResponse|FirmwareUpdateStopQueuesRequest|ForgetDeviceRequest|HeartbeatRequest|HeartbeatResponse|HeightRequest|HeightResponse|IgnoreTrackingChecklistStepRequest|KeybindRequest|KeybindResponse|LegTweaksTmpChange|LegTweaksTmpClear|MagToggleRequest|MagToggleResponse|NewSerialDeviceResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|RecordBVHStatusRequest|ResetRequest|ResetResponse|ResetStayAlignedRelaxedPoseRequest|SaveFileNotification|SerialDevicesRequest|SerialDevicesResponse|SerialTrackerCustomCommandRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerGetWifiScanRequest|SerialTrackerRebootRequest|SerialUpdateResponse|ServerInfosRequest|ServerInfosResponse|SetPauseTrackingRequest|SetWifiRequest|SettingsRequest|SettingsResetRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|StartUserHeightCalibration|StartWifiProvisioningRequest|StatusSystemFixed|StatusSystemRequest|StatusSystemResponse|StatusSystemUpdate|StopWifiProvisioningRequest|TapDetectionSetupNotification|TrackingChecklistRequest|TrackingChecklistResponse|TrackingPauseStateRequest|TrackingPauseStateResponse|UnknownDeviceHandshakeNotification|UserHeightRecordingStatusResponse|VRCConfigSettingToggleMute|VRCConfigStateChangeResponse|VRCConfigStateRequest|WifiProvisioningStatusResponse|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -342,6 +345,7 @@ export function unionListToRpcMessage( case 'CancelUserHeightCalibration': return accessor(index, new CancelUserHeightCalibration())! as CancelUserHeightCalibration; case 'UserHeightRecordingStatusResponse': return accessor(index, new UserHeightRecordingStatusResponse())! as UserHeightRecordingStatusResponse; case 'KeybindRequest': return accessor(index, new KeybindRequest())! as KeybindRequest; + case 'ChangeKeybindRequest': return accessor(index, new ChangeKeybindRequest())! as ChangeKeybindRequest; case 'KeybindResponse': return accessor(index, new KeybindResponse())! as KeybindResponse; default: return null; } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index d6291665..add4da94 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -97,6 +97,7 @@ union RpcMessage { CancelUserHeightCalibration, UserHeightRecordingStatusResponse, KeybindRequest, + ChangeKeybindRequest, KeybindResponse } @@ -109,16 +110,24 @@ enum KeybindName: uint8 { table Keybind { keybind_name: KeybindName; - value: string; - delay: long; + keybind_value: string; + keybind_delay: long; } -table KeybindRequest {} +// Requests specified keybind eg. FULL_RESET -> KeybindResponse sends the keybind back to gui +table KeybindRequest { + keybind_name: KeybindName; +} +// Returns keybinds for displaying in gui table KeybindResponse { - keybinds: [Keybind]; + keybind: [Keybind]; } +table ChangeKeybindRequest { +} + + table RpcMessageHeader { /// For a request, this identifies the request. For a response, this corresponds From 3dcef9ced33106646453f630ec8b9a1dbea1edaf Mon Sep 17 00:00:00 2001 From: Hannah Lynn Lindrob Date: Fri, 16 Jan 2026 16:29:16 +0100 Subject: [PATCH 5/8] Added keybind schema --- .../rpc/ChangeKeybindRequest.java | 44 +++++++ .../rpc/ChangeKeybindRequestT.java | 16 +++ .../src/solarxr_protocol/rpc/KeybindName.java | 17 +++ .../solarxr_protocol/rpc/KeybindRequest.java | 56 +++++++++ .../solarxr_protocol/rpc/KeybindRequestT.java | 22 ++++ .../solarxr_protocol/rpc/KeybindResponse.java | 70 ++++++++++++ .../rpc/KeybindResponseT.java | 22 ++++ .../rpc/ChangeKeybindRequest.kt | 37 ++++++ .../src/solarxr_protocol/rpc/KeybindName.kt | 16 +++ .../solarxr_protocol/rpc/KeybindRequest.kt | 50 ++++++++ .../solarxr_protocol/rpc/KeybindResponse.kt | 68 +++++++++++ .../rpc/change_keybind_request_generated.rs | 90 +++++++++++++++ .../rpc/keybind_name_generated.rs | 104 +++++++++++++++++ .../rpc/keybind_request_generated.rs | 108 ++++++++++++++++++ .../rpc/keybind_response_generated.rs | 108 ++++++++++++++++++ .../rpc/change-keybind-request.ts | 54 +++++++++ .../src/solarxr-protocol/rpc/keybind-name.ts | 8 ++ .../solarxr-protocol/rpc/keybind-request.ts | 73 ++++++++++++ .../solarxr-protocol/rpc/keybind-response.ts | 92 +++++++++++++++ 19 files changed, 1055 insertions(+) create mode 100644 protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindName.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindResponse.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/KeybindResponseT.java create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/KeybindRequest.kt create mode 100644 protocol/kotlin/src/solarxr_protocol/rpc/KeybindResponse.kt create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/keybind_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/keybind_response_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/keybind-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/keybind-response.ts diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java new file mode 100644 index 00000000..ee512f95 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java @@ -0,0 +1,44 @@ +// 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 ChangeKeybindRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static ChangeKeybindRequest getRootAsChangeKeybindRequest(ByteBuffer _bb) { return getRootAsChangeKeybindRequest(_bb, new ChangeKeybindRequest()); } + public static ChangeKeybindRequest getRootAsChangeKeybindRequest(ByteBuffer _bb, ChangeKeybindRequest 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 ChangeKeybindRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startChangeKeybindRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endChangeKeybindRequest(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 ChangeKeybindRequest get(int j) { return get(new ChangeKeybindRequest(), j); } + public ChangeKeybindRequest get(ChangeKeybindRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ChangeKeybindRequestT unpack() { + ChangeKeybindRequestT _o = new ChangeKeybindRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ChangeKeybindRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, ChangeKeybindRequestT _o) { + if (_o == null) return 0; + startChangeKeybindRequest(builder); + return endChangeKeybindRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java new file mode 100644 index 00000000..12540cf5 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.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 ChangeKeybindRequestT { + + + public ChangeKeybindRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindName.java b/protocol/java/src/solarxr_protocol/rpc/KeybindName.java new file mode 100644 index 00000000..be151e41 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindName.java @@ -0,0 +1,17 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class KeybindName { + private KeybindName() { } + public static final int FULL_RESET = 0; + public static final int YAW_RESET = 1; + public static final int MOUNTING_RESET = 2; + public static final int PAUSE_TRACKING = 3; + + public static final String[] names = { "FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindRequest.java b/protocol/java/src/solarxr_protocol/rpc/KeybindRequest.java new file mode 100644 index 00000000..435e0a85 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindRequest.java @@ -0,0 +1,56 @@ +// 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 KeybindRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static KeybindRequest getRootAsKeybindRequest(ByteBuffer _bb) { return getRootAsKeybindRequest(_bb, new KeybindRequest()); } + public static KeybindRequest getRootAsKeybindRequest(ByteBuffer _bb, KeybindRequest 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 KeybindRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int keybindName() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createKeybindRequest(FlatBufferBuilder builder, + int keybindName) { + builder.startTable(1); + KeybindRequest.addKeybindName(builder, keybindName); + return KeybindRequest.endKeybindRequest(builder); + } + + public static void startKeybindRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addKeybindName(FlatBufferBuilder builder, int keybindName) { builder.addByte(0, (byte) keybindName, (byte) 0); } + public static int endKeybindRequest(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 KeybindRequest get(int j) { return get(new KeybindRequest(), j); } + public KeybindRequest get(KeybindRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public KeybindRequestT unpack() { + KeybindRequestT _o = new KeybindRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(KeybindRequestT _o) { + int _oKeybindName = keybindName(); + _o.setKeybindName(_oKeybindName); + } + public static int pack(FlatBufferBuilder builder, KeybindRequestT _o) { + if (_o == null) return 0; + return createKeybindRequest( + builder, + _o.getKeybindName()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindRequestT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindRequestT.java new file mode 100644 index 00000000..9e89aa05 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindRequestT.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 KeybindRequestT { + private int keybindName; + + public int getKeybindName() { return keybindName; } + + public void setKeybindName(int keybindName) { this.keybindName = keybindName; } + + + public KeybindRequestT() { + this.keybindName = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindResponse.java b/protocol/java/src/solarxr_protocol/rpc/KeybindResponse.java new file mode 100644 index 00000000..afd24640 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindResponse.java @@ -0,0 +1,70 @@ +// 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 KeybindResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_22_10_26(); } + public static KeybindResponse getRootAsKeybindResponse(ByteBuffer _bb) { return getRootAsKeybindResponse(_bb, new KeybindResponse()); } + public static KeybindResponse getRootAsKeybindResponse(ByteBuffer _bb, KeybindResponse 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 KeybindResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.Keybind keybind(int j) { return keybind(new solarxr_protocol.rpc.Keybind(), j); } + public solarxr_protocol.rpc.Keybind keybind(solarxr_protocol.rpc.Keybind obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int keybindLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.Keybind.Vector keybindVector() { return keybindVector(new solarxr_protocol.rpc.Keybind.Vector()); } + public solarxr_protocol.rpc.Keybind.Vector keybindVector(solarxr_protocol.rpc.Keybind.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createKeybindResponse(FlatBufferBuilder builder, + int keybindOffset) { + builder.startTable(1); + KeybindResponse.addKeybind(builder, keybindOffset); + return KeybindResponse.endKeybindResponse(builder); + } + + public static void startKeybindResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addKeybind(FlatBufferBuilder builder, int keybindOffset) { builder.addOffset(0, keybindOffset, 0); } + public static int createKeybindVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startKeybindVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endKeybindResponse(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 KeybindResponse get(int j) { return get(new KeybindResponse(), j); } + public KeybindResponse get(KeybindResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public KeybindResponseT unpack() { + KeybindResponseT _o = new KeybindResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(KeybindResponseT _o) { + solarxr_protocol.rpc.KeybindT[] _oKeybind = new solarxr_protocol.rpc.KeybindT[keybindLength()]; + for (int _j = 0; _j < keybindLength(); ++_j) {_oKeybind[_j] = (keybind(_j) != null ? keybind(_j).unpack() : null);} + _o.setKeybind(_oKeybind); + } + public static int pack(FlatBufferBuilder builder, KeybindResponseT _o) { + if (_o == null) return 0; + int _keybind = 0; + if (_o.getKeybind() != null) { + int[] __keybind = new int[_o.getKeybind().length]; + int _j = 0; + for (solarxr_protocol.rpc.KeybindT _e : _o.getKeybind()) { __keybind[_j] = solarxr_protocol.rpc.Keybind.pack(builder, _e); _j++;} + _keybind = createKeybindVector(builder, __keybind); + } + return createKeybindResponse( + builder, + _keybind); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindResponseT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindResponseT.java new file mode 100644 index 00000000..4d43b5ad --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindResponseT.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 KeybindResponseT { + private solarxr_protocol.rpc.KeybindT[] keybind; + + public solarxr_protocol.rpc.KeybindT[] getKeybind() { return keybind; } + + public void setKeybind(solarxr_protocol.rpc.KeybindT[] keybind) { this.keybind = keybind; } + + + public KeybindResponseT() { + this.keybind = null; + } +} + diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt new file mode 100644 index 00000000..0d4a1929 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt @@ -0,0 +1,37 @@ +// 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 ChangeKeybindRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : ChangeKeybindRequest { + __init(_i, _bb) + return this + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsChangeKeybindRequest(_bb: ByteBuffer): ChangeKeybindRequest = getRootAsChangeKeybindRequest(_bb, ChangeKeybindRequest()) + @JvmStatic + fun getRootAsChangeKeybindRequest(_bb: ByteBuffer, obj: ChangeKeybindRequest): ChangeKeybindRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun startChangeKeybindRequest(builder: FlatBufferBuilder) = builder.startTable(0) + @JvmStatic + fun endChangeKeybindRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt new file mode 100644 index 00000000..bd45b90f --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc + +@Suppress("unused") +class KeybindName private constructor() { + companion object { + const val FULLRESET: UByte = 0u + const val YAWRESET: UByte = 1u + const val MOUNTINGRESET: UByte = 2u + const val PAUSETRACKING: UByte = 3u + val names : Array = arrayOf("FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING") + @JvmStatic + fun name(e: Int) : String = names[e] + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindRequest.kt new file mode 100644 index 00000000..b4511984 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindRequest.kt @@ -0,0 +1,50 @@ +// 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 KeybindRequest : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : KeybindRequest { + __init(_i, _bb) + return this + } + val keybindName : UByte + get() { + val o = __offset(4) + return if(o != 0) bb.get(o + bb_pos).toUByte() else 0u + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsKeybindRequest(_bb: ByteBuffer): KeybindRequest = getRootAsKeybindRequest(_bb, KeybindRequest()) + @JvmStatic + fun getRootAsKeybindRequest(_bb: ByteBuffer, obj: KeybindRequest): KeybindRequest { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createKeybindRequest(builder: FlatBufferBuilder, keybindName: UByte) : Int { + builder.startTable(1) + addKeybindName(builder, keybindName) + return endKeybindRequest(builder) + } + @JvmStatic + fun startKeybindRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addKeybindName(builder: FlatBufferBuilder, keybindName: UByte) = builder.addByte(0, keybindName.toByte(), 0) + @JvmStatic + fun endKeybindRequest(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindResponse.kt b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindResponse.kt new file mode 100644 index 00000000..aea76955 --- /dev/null +++ b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindResponse.kt @@ -0,0 +1,68 @@ +// 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 KeybindResponse : Table() { + + fun __init(_i: Int, _bb: ByteBuffer) { + __reset(_i, _bb) + } + fun __assign(_i: Int, _bb: ByteBuffer) : KeybindResponse { + __init(_i, _bb) + return this + } + fun keybind(j: Int) : solarxr_protocol.rpc.Keybind? = keybind(solarxr_protocol.rpc.Keybind(), j) + fun keybind(obj: solarxr_protocol.rpc.Keybind, j: Int) : solarxr_protocol.rpc.Keybind? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val keybindLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } + companion object { + @JvmStatic + fun validateVersion() = Constants.FLATBUFFERS_22_10_26() + @JvmStatic + fun getRootAsKeybindResponse(_bb: ByteBuffer): KeybindResponse = getRootAsKeybindResponse(_bb, KeybindResponse()) + @JvmStatic + fun getRootAsKeybindResponse(_bb: ByteBuffer, obj: KeybindResponse): KeybindResponse { + _bb.order(ByteOrder.LITTLE_ENDIAN) + return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) + } + @JvmStatic + fun createKeybindResponse(builder: FlatBufferBuilder, keybindOffset: Int) : Int { + builder.startTable(1) + addKeybind(builder, keybindOffset) + return endKeybindResponse(builder) + } + @JvmStatic + fun startKeybindResponse(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addKeybind(builder: FlatBufferBuilder, keybind: Int) = builder.addOffset(0, keybind, 0) + @JvmStatic + fun createKeybindVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startKeybindVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) + @JvmStatic + fun endKeybindResponse(builder: FlatBufferBuilder) : Int { + val o = builder.endTable() + return o + } + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs new file mode 100644 index 00000000..e793ebd5 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs @@ -0,0 +1,90 @@ +// 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 ChangeKeybindRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ChangeKeybindRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ChangeKeybindRequest<'a> { + type Inner = ChangeKeybindRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> ChangeKeybindRequest<'a> { + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ChangeKeybindRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args ChangeKeybindRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ChangeKeybindRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for ChangeKeybindRequest<'_> { + #[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 ChangeKeybindRequestArgs { +} +impl<'a> Default for ChangeKeybindRequestArgs { + #[inline] + fn default() -> Self { + ChangeKeybindRequestArgs { + } + } +} + +pub struct ChangeKeybindRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ChangeKeybindRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeKeybindRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ChangeKeybindRequestBuilder { + 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 ChangeKeybindRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("ChangeKeybindRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs new file mode 100644 index 00000000..bb0ca9fb --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs @@ -0,0 +1,104 @@ +// 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_KEYBIND_NAME: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_KEYBIND_NAME: u8 = 3; +#[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_KEYBIND_NAME: [KeybindName; 4] = [ + KeybindName::FULL_RESET, + KeybindName::YAW_RESET, + KeybindName::MOUNTING_RESET, + KeybindName::PAUSE_TRACKING, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct KeybindName(pub u8); +#[allow(non_upper_case_globals)] +impl KeybindName { + pub const FULL_RESET: Self = Self(0); + pub const YAW_RESET: Self = Self(1); + pub const MOUNTING_RESET: Self = Self(2); + pub const PAUSE_TRACKING: Self = Self(3); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 3; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::FULL_RESET, + Self::YAW_RESET, + Self::MOUNTING_RESET, + Self::PAUSE_TRACKING, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::FULL_RESET => Some("FULL_RESET"), + Self::YAW_RESET => Some("YAW_RESET"), + Self::MOUNTING_RESET => Some("MOUNTING_RESET"), + Self::PAUSE_TRACKING => Some("PAUSE_TRACKING"), + _ => None, + } + } +} +impl core::fmt::Debug for KeybindName { + 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 KeybindName { + 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 KeybindName { + type Output = KeybindName; + #[inline] + unsafe fn push(&self, dst: &mut [u8], _written_len: usize) { + flatbuffers::emplace_scalar::(dst, self.0); + } +} + +impl flatbuffers::EndianScalar for KeybindName { + 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 KeybindName { + #[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 KeybindName {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_request_generated.rs new file mode 100644 index 00000000..0e5c119a --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_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 KeybindRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct KeybindRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for KeybindRequest<'a> { + type Inner = KeybindRequest<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> KeybindRequest<'a> { + pub const VT_KEYBIND_NAME: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + KeybindRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args KeybindRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = KeybindRequestBuilder::new(_fbb); + builder.add_keybind_name(args.keybind_name); + builder.finish() + } + + + #[inline] + pub fn keybind_name(&self) -> KeybindName { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::(KeybindRequest::VT_KEYBIND_NAME, Some(KeybindName::FULL_RESET)).unwrap()} + } +} + +impl flatbuffers::Verifiable for KeybindRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("keybind_name", Self::VT_KEYBIND_NAME, false)? + .finish(); + Ok(()) + } +} +pub struct KeybindRequestArgs { + pub keybind_name: KeybindName, +} +impl<'a> Default for KeybindRequestArgs { + #[inline] + fn default() -> Self { + KeybindRequestArgs { + keybind_name: KeybindName::FULL_RESET, + } + } +} + +pub struct KeybindRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> KeybindRequestBuilder<'a, 'b> { + #[inline] + pub fn add_keybind_name(&mut self, keybind_name: KeybindName) { + self.fbb_.push_slot::(KeybindRequest::VT_KEYBIND_NAME, keybind_name, KeybindName::FULL_RESET); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + KeybindRequestBuilder { + 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 KeybindRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("KeybindRequest"); + ds.field("keybind_name", &self.keybind_name()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_response_generated.rs new file mode 100644 index 00000000..7545b8d4 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_response_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 KeybindResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct KeybindResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for KeybindResponse<'a> { + type Inner = KeybindResponse<'a>; + #[inline] + unsafe fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table::new(buf, loc) } + } +} + +impl<'a> KeybindResponse<'a> { + pub const VT_KEYBIND: flatbuffers::VOffsetT = 4; + + #[inline] + pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + KeybindResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args KeybindResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = KeybindResponseBuilder::new(_fbb); + if let Some(x) = args.keybind { builder.add_keybind(x); } + builder.finish() + } + + + #[inline] + pub fn keybind(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(KeybindResponse::VT_KEYBIND, None)} + } +} + +impl flatbuffers::Verifiable for KeybindResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("keybind", Self::VT_KEYBIND, false)? + .finish(); + Ok(()) + } +} +pub struct KeybindResponseArgs<'a> { + pub keybind: Option>>>>, +} +impl<'a> Default for KeybindResponseArgs<'a> { + #[inline] + fn default() -> Self { + KeybindResponseArgs { + keybind: None, + } + } +} + +pub struct KeybindResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> KeybindResponseBuilder<'a, 'b> { + #[inline] + pub fn add_keybind(&mut self, keybind: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(KeybindResponse::VT_KEYBIND, keybind); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + KeybindResponseBuilder { + 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 KeybindResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("KeybindResponse"); + ds.field("keybind", &self.keybind()); + ds.finish() + } +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts new file mode 100644 index 00000000..951fa51d --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts @@ -0,0 +1,54 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class ChangeKeybindRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):ChangeKeybindRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsChangeKeybindRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeKeybindRequest):ChangeKeybindRequest { + return (obj || new ChangeKeybindRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsChangeKeybindRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeKeybindRequest):ChangeKeybindRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ChangeKeybindRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startChangeKeybindRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endChangeKeybindRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createChangeKeybindRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + ChangeKeybindRequest.startChangeKeybindRequest(builder); + return ChangeKeybindRequest.endChangeKeybindRequest(builder); +} + +unpack(): ChangeKeybindRequestT { + return new ChangeKeybindRequestT(); +} + + +unpackTo(_o: ChangeKeybindRequestT): void {} +} + +export class ChangeKeybindRequestT implements flatbuffers.IGeneratedObject { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ChangeKeybindRequest.createChangeKeybindRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts new file mode 100644 index 00000000..9cc8b8ac --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts @@ -0,0 +1,8 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +export enum KeybindName { + FULL_RESET = 0, + YAW_RESET = 1, + MOUNTING_RESET = 2, + PAUSE_TRACKING = 3 +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind-request.ts new file mode 100644 index 00000000..39bd64ba --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind-request.ts @@ -0,0 +1,73 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { KeybindName } from '../../solarxr-protocol/rpc/keybind-name.js'; + + +export class KeybindRequest implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):KeybindRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsKeybindRequest(bb:flatbuffers.ByteBuffer, obj?:KeybindRequest):KeybindRequest { + return (obj || new KeybindRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsKeybindRequest(bb:flatbuffers.ByteBuffer, obj?:KeybindRequest):KeybindRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new KeybindRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +keybindName():KeybindName { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : KeybindName.FULL_RESET; +} + +static startKeybindRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addKeybindName(builder:flatbuffers.Builder, keybindName:KeybindName) { + builder.addFieldInt8(0, keybindName, KeybindName.FULL_RESET); +} + +static endKeybindRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createKeybindRequest(builder:flatbuffers.Builder, keybindName:KeybindName):flatbuffers.Offset { + KeybindRequest.startKeybindRequest(builder); + KeybindRequest.addKeybindName(builder, keybindName); + return KeybindRequest.endKeybindRequest(builder); +} + +unpack(): KeybindRequestT { + return new KeybindRequestT( + this.keybindName() + ); +} + + +unpackTo(_o: KeybindRequestT): void { + _o.keybindName = this.keybindName(); +} +} + +export class KeybindRequestT implements flatbuffers.IGeneratedObject { +constructor( + public keybindName: KeybindName = KeybindName.FULL_RESET +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return KeybindRequest.createKeybindRequest(builder, + this.keybindName + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind-response.ts new file mode 100644 index 00000000..3e7c43d9 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind-response.ts @@ -0,0 +1,92 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Keybind, KeybindT } from '../../solarxr-protocol/rpc/keybind.js'; + + +export class KeybindResponse implements flatbuffers.IUnpackableObject { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; + __init(i:number, bb:flatbuffers.ByteBuffer):KeybindResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsKeybindResponse(bb:flatbuffers.ByteBuffer, obj?:KeybindResponse):KeybindResponse { + return (obj || new KeybindResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsKeybindResponse(bb:flatbuffers.ByteBuffer, obj?:KeybindResponse):KeybindResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new KeybindResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +keybind(index: number, obj?:Keybind):Keybind|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new Keybind()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +keybindLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startKeybindResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addKeybind(builder:flatbuffers.Builder, keybindOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, keybindOffset, 0); +} + +static createKeybindVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]!); + } + return builder.endVector(); +} + +static startKeybindVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endKeybindResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createKeybindResponse(builder:flatbuffers.Builder, keybindOffset:flatbuffers.Offset):flatbuffers.Offset { + KeybindResponse.startKeybindResponse(builder); + KeybindResponse.addKeybind(builder, keybindOffset); + return KeybindResponse.endKeybindResponse(builder); +} + +unpack(): KeybindResponseT { + return new KeybindResponseT( + this.bb!.createObjList(this.keybind.bind(this), this.keybindLength()) + ); +} + + +unpackTo(_o: KeybindResponseT): void { + _o.keybind = this.bb!.createObjList(this.keybind.bind(this), this.keybindLength()); +} +} + +export class KeybindResponseT implements flatbuffers.IGeneratedObject { +constructor( + public keybind: (KeybindT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const keybind = KeybindResponse.createKeybindVector(builder, builder.createObjectOffsetList(this.keybind)); + + return KeybindResponse.createKeybindResponse(builder, + keybind + ); +} +} From 008bc6d2104417b167da0cca8c984dcbf4839ab4 Mon Sep 17 00:00:00 2001 From: Hannah Lynn Lindrob Date: Wed, 21 Jan 2026 14:29:51 +0100 Subject: [PATCH 6/8] Update ChangeKeybindRequest --- .../generated/all_generated.h | 25 +++++++++- .../rpc/ChangeKeybindRequest.java | 32 ++++++++++-- .../rpc/ChangeKeybindRequestT.java | 6 +++ .../rpc/ChangeKeybindRequest.kt | 33 +++++++++++- .../rpc/change_keybind_request_generated.rs | 24 +++++++-- .../rpc/change-keybind-request.ts | 50 ++++++++++++++++--- schema/rpc.fbs | 1 + 7 files changed, 157 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 ffb4e192..d531a9c7 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -6049,8 +6049,17 @@ inline flatbuffers::Offset CreateKeybindResponseDirect( struct ChangeKeybindRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef ChangeKeybindRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEYBIND = 4 + }; + const flatbuffers::Vector> *keybind() const { + return GetPointer> *>(VT_KEYBIND); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_KEYBIND) && + verifier.VerifyVector(keybind()) && + verifier.VerifyVectorOfTables(keybind()) && verifier.EndTable(); } }; @@ -6059,6 +6068,9 @@ struct ChangeKeybindRequestBuilder { typedef ChangeKeybindRequest Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; + void add_keybind(flatbuffers::Offset>> keybind) { + fbb_.AddOffset(ChangeKeybindRequest::VT_KEYBIND, keybind); + } explicit ChangeKeybindRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -6071,11 +6083,22 @@ struct ChangeKeybindRequestBuilder { }; inline flatbuffers::Offset CreateChangeKeybindRequest( - flatbuffers::FlatBufferBuilder &_fbb) { + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> keybind = 0) { ChangeKeybindRequestBuilder builder_(_fbb); + builder_.add_keybind(keybind); return builder_.Finish(); } +inline flatbuffers::Offset CreateChangeKeybindRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *keybind = nullptr) { + auto keybind__ = keybind ? _fbb.CreateVector>(*keybind) : 0; + return solarxr_protocol::rpc::CreateChangeKeybindRequest( + _fbb, + keybind__); +} + struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef RpcMessageHeaderBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java index ee512f95..c2053b9a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequest.java @@ -15,8 +15,23 @@ public final class ChangeKeybindRequest extends Table { public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } public ChangeKeybindRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + public solarxr_protocol.rpc.Keybind keybind(int j) { return keybind(new solarxr_protocol.rpc.Keybind(), j); } + public solarxr_protocol.rpc.Keybind keybind(solarxr_protocol.rpc.Keybind obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int keybindLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.Keybind.Vector keybindVector() { return keybindVector(new solarxr_protocol.rpc.Keybind.Vector()); } + public solarxr_protocol.rpc.Keybind.Vector keybindVector(solarxr_protocol.rpc.Keybind.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - public static void startChangeKeybindRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int createChangeKeybindRequest(FlatBufferBuilder builder, + int keybindOffset) { + builder.startTable(1); + ChangeKeybindRequest.addKeybind(builder, keybindOffset); + return ChangeKeybindRequest.endChangeKeybindRequest(builder); + } + + public static void startChangeKeybindRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addKeybind(FlatBufferBuilder builder, int keybindOffset) { builder.addOffset(0, keybindOffset, 0); } + public static int createKeybindVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startKeybindVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } public static int endChangeKeybindRequest(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -34,11 +49,22 @@ public ChangeKeybindRequestT unpack() { return _o; } public void unpackTo(ChangeKeybindRequestT _o) { + solarxr_protocol.rpc.KeybindT[] _oKeybind = new solarxr_protocol.rpc.KeybindT[keybindLength()]; + for (int _j = 0; _j < keybindLength(); ++_j) {_oKeybind[_j] = (keybind(_j) != null ? keybind(_j).unpack() : null);} + _o.setKeybind(_oKeybind); } public static int pack(FlatBufferBuilder builder, ChangeKeybindRequestT _o) { if (_o == null) return 0; - startChangeKeybindRequest(builder); - return endChangeKeybindRequest(builder); + int _keybind = 0; + if (_o.getKeybind() != null) { + int[] __keybind = new int[_o.getKeybind().length]; + int _j = 0; + for (solarxr_protocol.rpc.KeybindT _e : _o.getKeybind()) { __keybind[_j] = solarxr_protocol.rpc.Keybind.pack(builder, _e); _j++;} + _keybind = createKeybindVector(builder, __keybind); + } + return createChangeKeybindRequest( + builder, + _keybind); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java index 12540cf5..094c5edc 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeKeybindRequestT.java @@ -8,9 +8,15 @@ import com.google.flatbuffers.*; public class ChangeKeybindRequestT { + private solarxr_protocol.rpc.KeybindT[] keybind; + + public solarxr_protocol.rpc.KeybindT[] getKeybind() { return keybind; } + + public void setKeybind(solarxr_protocol.rpc.KeybindT[] keybind) { this.keybind = keybind; } public ChangeKeybindRequestT() { + this.keybind = null; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt index 0d4a1929..e612ba50 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/ChangeKeybindRequest.kt @@ -16,6 +16,19 @@ class ChangeKeybindRequest : Table() { __init(_i, _bb) return this } + fun keybind(j: Int) : solarxr_protocol.rpc.Keybind? = keybind(solarxr_protocol.rpc.Keybind(), j) + fun keybind(obj: solarxr_protocol.rpc.Keybind, j: Int) : solarxr_protocol.rpc.Keybind? { + val o = __offset(4) + return if (o != 0) { + obj.__assign(__indirect(__vector(o) + j * 4), bb) + } else { + null + } + } + val keybindLength : Int + get() { + val o = __offset(4); return if (o != 0) __vector_len(o) else 0 + } companion object { @JvmStatic fun validateVersion() = Constants.FLATBUFFERS_22_10_26() @@ -27,7 +40,25 @@ class ChangeKeybindRequest : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun startChangeKeybindRequest(builder: FlatBufferBuilder) = builder.startTable(0) + fun createChangeKeybindRequest(builder: FlatBufferBuilder, keybindOffset: Int) : Int { + builder.startTable(1) + addKeybind(builder, keybindOffset) + return endChangeKeybindRequest(builder) + } + @JvmStatic + fun startChangeKeybindRequest(builder: FlatBufferBuilder) = builder.startTable(1) + @JvmStatic + fun addKeybind(builder: FlatBufferBuilder, keybind: Int) = builder.addOffset(0, keybind, 0) + @JvmStatic + fun createKeybindVector(builder: FlatBufferBuilder, data: IntArray) : Int { + builder.startVector(4, data.size, 4) + for (i in data.size - 1 downTo 0) { + builder.addOffset(data[i]) + } + return builder.endVector() + } + @JvmStatic + fun startKeybindVector(builder: FlatBufferBuilder, numElems: Int) = builder.startVector(4, numElems, 4) @JvmStatic fun endChangeKeybindRequest(builder: FlatBufferBuilder) : Int { val o = builder.endTable() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs index e793ebd5..7f0b77d9 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_keybind_request_generated.rs @@ -25,6 +25,7 @@ impl<'a> flatbuffers::Follow<'a> for ChangeKeybindRequest<'a> { } impl<'a> ChangeKeybindRequest<'a> { + pub const VT_KEYBIND: flatbuffers::VOffsetT = 4; #[inline] pub unsafe fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -33,12 +34,21 @@ impl<'a> ChangeKeybindRequest<'a> { #[allow(unused_mut)] pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args ChangeKeybindRequestArgs + args: &'args ChangeKeybindRequestArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = ChangeKeybindRequestBuilder::new(_fbb); + if let Some(x) = args.keybind { builder.add_keybind(x); } builder.finish() } + + #[inline] + pub fn keybind(&self) -> Option>>> { + // Safety: + // Created from valid Table for this object + // which contains a valid value in this slot + unsafe { self._tab.get::>>>(ChangeKeybindRequest::VT_KEYBIND, None)} + } } impl flatbuffers::Verifiable for ChangeKeybindRequest<'_> { @@ -48,16 +58,19 @@ impl flatbuffers::Verifiable for ChangeKeybindRequest<'_> { ) -> Result<(), flatbuffers::InvalidFlatbuffer> { use self::flatbuffers::Verifiable; v.visit_table(pos)? + .visit_field::>>>("keybind", Self::VT_KEYBIND, false)? .finish(); Ok(()) } } -pub struct ChangeKeybindRequestArgs { +pub struct ChangeKeybindRequestArgs<'a> { + pub keybind: Option>>>>, } -impl<'a> Default for ChangeKeybindRequestArgs { +impl<'a> Default for ChangeKeybindRequestArgs<'a> { #[inline] fn default() -> Self { ChangeKeybindRequestArgs { + keybind: None, } } } @@ -67,6 +80,10 @@ pub struct ChangeKeybindRequestBuilder<'a: 'b, 'b> { start_: flatbuffers::WIPOffset, } impl<'a: 'b, 'b> ChangeKeybindRequestBuilder<'a, 'b> { + #[inline] + pub fn add_keybind(&mut self, keybind: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(ChangeKeybindRequest::VT_KEYBIND, keybind); + } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeKeybindRequestBuilder<'a, 'b> { let start = _fbb.start_table(); @@ -85,6 +102,7 @@ impl<'a: 'b, 'b> ChangeKeybindRequestBuilder<'a, 'b> { impl core::fmt::Debug for ChangeKeybindRequest<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ChangeKeybindRequest"); + ds.field("keybind", &self.keybind()); ds.finish() } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts index 951fa51d..97540faf 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-keybind-request.ts @@ -2,6 +2,7 @@ import * as flatbuffers from 'flatbuffers'; +import { Keybind, KeybindT } from '../../solarxr-protocol/rpc/keybind.js'; export class ChangeKeybindRequest implements flatbuffers.IUnpackableObject { @@ -22,8 +23,34 @@ static getSizePrefixedRootAsChangeKeybindRequest(bb:flatbuffers.ByteBuffer, obj? return (obj || new ChangeKeybindRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } +keybind(index: number, obj?:Keybind):Keybind|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new Keybind()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +keybindLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + static startChangeKeybindRequest(builder:flatbuffers.Builder) { - builder.startObject(0); + builder.startObject(1); +} + +static addKeybind(builder:flatbuffers.Builder, keybindOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, keybindOffset, 0); +} + +static createKeybindVector(builder:flatbuffers.Builder, data:flatbuffers.Offset[]):flatbuffers.Offset { + builder.startVector(4, data.length, 4); + for (let i = data.length - 1; i >= 0; i--) { + builder.addOffset(data[i]!); + } + return builder.endVector(); +} + +static startKeybindVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); } static endChangeKeybindRequest(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -31,24 +58,35 @@ static endChangeKeybindRequest(builder:flatbuffers.Builder):flatbuffers.Offset { return offset; } -static createChangeKeybindRequest(builder:flatbuffers.Builder):flatbuffers.Offset { +static createChangeKeybindRequest(builder:flatbuffers.Builder, keybindOffset:flatbuffers.Offset):flatbuffers.Offset { ChangeKeybindRequest.startChangeKeybindRequest(builder); + ChangeKeybindRequest.addKeybind(builder, keybindOffset); return ChangeKeybindRequest.endChangeKeybindRequest(builder); } unpack(): ChangeKeybindRequestT { - return new ChangeKeybindRequestT(); + return new ChangeKeybindRequestT( + this.bb!.createObjList(this.keybind.bind(this), this.keybindLength()) + ); } -unpackTo(_o: ChangeKeybindRequestT): void {} +unpackTo(_o: ChangeKeybindRequestT): void { + _o.keybind = this.bb!.createObjList(this.keybind.bind(this), this.keybindLength()); +} } export class ChangeKeybindRequestT implements flatbuffers.IGeneratedObject { -constructor(){} +constructor( + public keybind: (KeybindT)[] = [] +){} pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ChangeKeybindRequest.createChangeKeybindRequest(builder); + const keybind = ChangeKeybindRequest.createKeybindVector(builder, builder.createObjectOffsetList(this.keybind)); + + return ChangeKeybindRequest.createChangeKeybindRequest(builder, + keybind + ); } } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index add4da94..1e4f3a69 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -125,6 +125,7 @@ table KeybindResponse { } table ChangeKeybindRequest { + keybind: [Keybind]; } From 540dd821fe2d16d60f9a2a812773fce89ff421ad Mon Sep 17 00:00:00 2001 From: Hannah Lindrob Date: Mon, 26 Jan 2026 15:40:42 +0100 Subject: [PATCH 7/8] Added feet --- .../solarxr_protocol/generated/all_generated.h | 13 ++++++++----- .../java/src/solarxr_protocol/rpc/KeybindName.java | 3 ++- .../kotlin/src/solarxr_protocol/rpc/KeybindName.kt | 3 ++- .../solarxr_protocol/rpc/keybind_name_generated.rs | 10 +++++++--- .../src/solarxr-protocol/rpc/keybind-name.ts | 3 ++- schema/rpc.fbs | 3 ++- 6 files changed, 23 insertions(+), 12 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 5226ee12..91dc28c7 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -1912,33 +1912,36 @@ enum class KeybindName : uint8_t { YAW_RESET = 1, MOUNTING_RESET = 2, PAUSE_TRACKING = 3, + FEET_MOUNTING_RESET = 4, MIN = FULL_RESET, - MAX = PAUSE_TRACKING + MAX = FEET_MOUNTING_RESET }; -inline const KeybindName (&EnumValuesKeybindName())[4] { +inline const KeybindName (&EnumValuesKeybindName())[5] { static const KeybindName values[] = { KeybindName::FULL_RESET, KeybindName::YAW_RESET, KeybindName::MOUNTING_RESET, - KeybindName::PAUSE_TRACKING + KeybindName::PAUSE_TRACKING, + KeybindName::FEET_MOUNTING_RESET }; return values; } inline const char * const *EnumNamesKeybindName() { - static const char * const names[5] = { + static const char * const names[6] = { "FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING", + "FEET_MOUNTING_RESET", nullptr }; return names; } inline const char *EnumNameKeybindName(KeybindName e) { - if (flatbuffers::IsOutRange(e, KeybindName::FULL_RESET, KeybindName::PAUSE_TRACKING)) return ""; + if (flatbuffers::IsOutRange(e, KeybindName::FULL_RESET, KeybindName::FEET_MOUNTING_RESET)) return ""; const size_t index = static_cast(e); return EnumNamesKeybindName()[index]; } diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindName.java b/protocol/java/src/solarxr_protocol/rpc/KeybindName.java index be151e41..f8b1c6a8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/KeybindName.java +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindName.java @@ -9,8 +9,9 @@ private KeybindName() { } public static final int YAW_RESET = 1; public static final int MOUNTING_RESET = 2; public static final int PAUSE_TRACKING = 3; + public static final int FEET_MOUNTING_RESET = 4; - public static final String[] names = { "FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING", }; + public static final String[] names = { "FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING", "FEET_MOUNTING_RESET", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt index bd45b90f..4bd6159e 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/KeybindName.kt @@ -9,7 +9,8 @@ class KeybindName private constructor() { const val YAWRESET: UByte = 1u const val MOUNTINGRESET: UByte = 2u const val PAUSETRACKING: UByte = 3u - val names : Array = arrayOf("FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING") + const val FEETMOUNTINGRESET: UByte = 4u + val names : Array = arrayOf("FULL_RESET", "YAW_RESET", "MOUNTING_RESET", "PAUSE_TRACKING", "FEET_MOUNTING_RESET") @JvmStatic fun name(e: Int) : String = names[e] } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs index bb0ca9fb..340f4b33 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_name_generated.rs @@ -12,14 +12,15 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_KEYBIND_NAME: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_KEYBIND_NAME: u8 = 3; +pub const ENUM_MAX_KEYBIND_NAME: u8 = 4; #[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_KEYBIND_NAME: [KeybindName; 4] = [ +pub const ENUM_VALUES_KEYBIND_NAME: [KeybindName; 5] = [ KeybindName::FULL_RESET, KeybindName::YAW_RESET, KeybindName::MOUNTING_RESET, KeybindName::PAUSE_TRACKING, + KeybindName::FEET_MOUNTING_RESET, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -31,14 +32,16 @@ impl KeybindName { pub const YAW_RESET: Self = Self(1); pub const MOUNTING_RESET: Self = Self(2); pub const PAUSE_TRACKING: Self = Self(3); + pub const FEET_MOUNTING_RESET: Self = Self(4); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 3; + pub const ENUM_MAX: u8 = 4; pub const ENUM_VALUES: &'static [Self] = &[ Self::FULL_RESET, Self::YAW_RESET, Self::MOUNTING_RESET, Self::PAUSE_TRACKING, + Self::FEET_MOUNTING_RESET, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -47,6 +50,7 @@ impl KeybindName { Self::YAW_RESET => Some("YAW_RESET"), Self::MOUNTING_RESET => Some("MOUNTING_RESET"), Self::PAUSE_TRACKING => Some("PAUSE_TRACKING"), + Self::FEET_MOUNTING_RESET => Some("FEET_MOUNTING_RESET"), _ => None, } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts index 9cc8b8ac..912531ce 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind-name.ts @@ -4,5 +4,6 @@ export enum KeybindName { FULL_RESET = 0, YAW_RESET = 1, MOUNTING_RESET = 2, - PAUSE_TRACKING = 3 + PAUSE_TRACKING = 3, + FEET_MOUNTING_RESET = 4 } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 02eaa870..99d7edab 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -105,7 +105,8 @@ enum KeybindName: uint8 { FULL_RESET = 0, YAW_RESET = 1, MOUNTING_RESET = 2, - PAUSE_TRACKING = 3 + PAUSE_TRACKING = 3, + FEET_MOUNTING_RESET = 4 } table Keybind { From c67e4614898ebd7542ffd6cb273d983dc06098b2 Mon Sep 17 00:00:00 2001 From: Hannah Lindrob Date: Tue, 27 Jan 2026 16:00:36 +0100 Subject: [PATCH 8/8] Change from long to float in keyinbd schema --- .../solarxr_protocol/generated/all_generated.h | 14 +++++++------- .../java/src/solarxr_protocol/rpc/Keybind.java | 8 ++++---- .../java/src/solarxr_protocol/rpc/KeybindT.java | 8 ++++---- .../kotlin/src/solarxr_protocol/rpc/Keybind.kt | 8 ++++---- .../solarxr_protocol/rpc/keybind_generated.rs | 14 +++++++------- .../typescript/src/solarxr-protocol/rpc/keybind.ts | 12 ++++++------ schema/rpc.fbs | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 91dc28c7..f04855a9 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -5895,15 +5895,15 @@ struct Keybind FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const flatbuffers::String *keybind_value() const { return GetPointer(VT_KEYBIND_VALUE); } - int64_t keybind_delay() const { - return GetField(VT_KEYBIND_DELAY, 0); + float keybind_delay() const { + return GetField(VT_KEYBIND_DELAY, 0.0f); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_KEYBIND_NAME, 1) && VerifyOffset(verifier, VT_KEYBIND_VALUE) && verifier.VerifyString(keybind_value()) && - VerifyField(verifier, VT_KEYBIND_DELAY, 8) && + VerifyField(verifier, VT_KEYBIND_DELAY, 4) && verifier.EndTable(); } }; @@ -5918,8 +5918,8 @@ struct KeybindBuilder { void add_keybind_value(flatbuffers::Offset keybind_value) { fbb_.AddOffset(Keybind::VT_KEYBIND_VALUE, keybind_value); } - void add_keybind_delay(int64_t keybind_delay) { - fbb_.AddElement(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0); + void add_keybind_delay(float keybind_delay) { + fbb_.AddElement(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0.0f); } explicit KeybindBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { @@ -5936,7 +5936,7 @@ inline flatbuffers::Offset CreateKeybind( flatbuffers::FlatBufferBuilder &_fbb, solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET, flatbuffers::Offset keybind_value = 0, - int64_t keybind_delay = 0) { + float keybind_delay = 0.0f) { KeybindBuilder builder_(_fbb); builder_.add_keybind_delay(keybind_delay); builder_.add_keybind_value(keybind_value); @@ -5948,7 +5948,7 @@ inline flatbuffers::Offset CreateKeybindDirect( flatbuffers::FlatBufferBuilder &_fbb, solarxr_protocol::rpc::KeybindName keybind_name = solarxr_protocol::rpc::KeybindName::FULL_RESET, const char *keybind_value = nullptr, - int64_t keybind_delay = 0) { + float keybind_delay = 0.0f) { auto keybind_value__ = keybind_value ? _fbb.CreateString(keybind_value) : 0; return solarxr_protocol::rpc::CreateKeybind( _fbb, diff --git a/protocol/java/src/solarxr_protocol/rpc/Keybind.java b/protocol/java/src/solarxr_protocol/rpc/Keybind.java index 3ef9aefd..302f25e3 100644 --- a/protocol/java/src/solarxr_protocol/rpc/Keybind.java +++ b/protocol/java/src/solarxr_protocol/rpc/Keybind.java @@ -19,12 +19,12 @@ public final class Keybind extends Table { public String keybindValue() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } public ByteBuffer keybindValueAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } public ByteBuffer keybindValueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - public long keybindDelay() { int o = __offset(8); return o != 0 ? bb.getLong(o + bb_pos) : 0L; } + public float keybindDelay() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } public static int createKeybind(FlatBufferBuilder builder, int keybindName, int keybindValueOffset, - long keybindDelay) { + float keybindDelay) { builder.startTable(3); Keybind.addKeybindDelay(builder, keybindDelay); Keybind.addKeybindValue(builder, keybindValueOffset); @@ -35,7 +35,7 @@ public static int createKeybind(FlatBufferBuilder builder, public static void startKeybind(FlatBufferBuilder builder) { builder.startTable(3); } public static void addKeybindName(FlatBufferBuilder builder, int keybindName) { builder.addByte(0, (byte) keybindName, (byte) 0); } public static void addKeybindValue(FlatBufferBuilder builder, int keybindValueOffset) { builder.addOffset(1, keybindValueOffset, 0); } - public static void addKeybindDelay(FlatBufferBuilder builder, long keybindDelay) { builder.addLong(2, keybindDelay, 0L); } + public static void addKeybindDelay(FlatBufferBuilder builder, float keybindDelay) { builder.addFloat(2, keybindDelay, 0.0f); } public static int endKeybind(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -57,7 +57,7 @@ public void unpackTo(KeybindT _o) { _o.setKeybindName(_oKeybindName); String _oKeybindValue = keybindValue(); _o.setKeybindValue(_oKeybindValue); - long _oKeybindDelay = keybindDelay(); + float _oKeybindDelay = keybindDelay(); _o.setKeybindDelay(_oKeybindDelay); } public static int pack(FlatBufferBuilder builder, KeybindT _o) { diff --git a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java index 36d3ffe2..2fa89f62 100644 --- a/protocol/java/src/solarxr_protocol/rpc/KeybindT.java +++ b/protocol/java/src/solarxr_protocol/rpc/KeybindT.java @@ -10,7 +10,7 @@ public class KeybindT { private int keybindName; private String keybindValue; - private long keybindDelay; + private float keybindDelay; public int getKeybindName() { return keybindName; } @@ -20,15 +20,15 @@ public class KeybindT { public void setKeybindValue(String keybindValue) { this.keybindValue = keybindValue; } - public long getKeybindDelay() { return keybindDelay; } + public float getKeybindDelay() { return keybindDelay; } - public void setKeybindDelay(long keybindDelay) { this.keybindDelay = keybindDelay; } + public void setKeybindDelay(float keybindDelay) { this.keybindDelay = keybindDelay; } public KeybindT() { this.keybindName = 0; this.keybindValue = null; - this.keybindDelay = 0L; + this.keybindDelay = 0.0f; } } diff --git a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt index 3538a586..9d1b17c0 100644 --- a/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt +++ b/protocol/kotlin/src/solarxr_protocol/rpc/Keybind.kt @@ -28,10 +28,10 @@ class Keybind : Table() { } val keybindValueAsByteBuffer : ByteBuffer get() = __vector_as_bytebuffer(6, 1) fun keybindValueInByteBuffer(_bb: ByteBuffer) : ByteBuffer = __vector_in_bytebuffer(_bb, 6, 1) - val keybindDelay : Long + val keybindDelay : Float get() { val o = __offset(8) - return if(o != 0) bb.getLong(o + bb_pos) else 0L + return if(o != 0) bb.getFloat(o + bb_pos) else 0.0f } companion object { @JvmStatic @@ -44,7 +44,7 @@ class Keybind : Table() { return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)) } @JvmStatic - fun createKeybind(builder: FlatBufferBuilder, keybindName: UByte, keybindValueOffset: Int, keybindDelay: Long) : Int { + fun createKeybind(builder: FlatBufferBuilder, keybindName: UByte, keybindValueOffset: Int, keybindDelay: Float) : Int { builder.startTable(3) addKeybindDelay(builder, keybindDelay) addKeybindValue(builder, keybindValueOffset) @@ -58,7 +58,7 @@ class Keybind : Table() { @JvmStatic fun addKeybindValue(builder: FlatBufferBuilder, keybindValue: Int) = builder.addOffset(1, keybindValue, 0) @JvmStatic - fun addKeybindDelay(builder: FlatBufferBuilder, keybindDelay: Long) = builder.addLong(2, keybindDelay, 0L) + fun addKeybindDelay(builder: FlatBufferBuilder, keybindDelay: Float) = builder.addFloat(2, keybindDelay, 0.0) @JvmStatic fun endKeybind(builder: FlatBufferBuilder) : Int { val o = builder.endTable() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs index 169aaa27..271ab010 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/keybind_generated.rs @@ -61,11 +61,11 @@ impl<'a> Keybind<'a> { unsafe { self._tab.get::>(Keybind::VT_KEYBIND_VALUE, None)} } #[inline] - pub fn keybind_delay(&self) -> i64 { + pub fn keybind_delay(&self) -> f32 { // Safety: // Created from valid Table for this object // which contains a valid value in this slot - unsafe { self._tab.get::(Keybind::VT_KEYBIND_DELAY, Some(0)).unwrap()} + unsafe { self._tab.get::(Keybind::VT_KEYBIND_DELAY, Some(0.0)).unwrap()} } } @@ -78,7 +78,7 @@ impl flatbuffers::Verifiable for Keybind<'_> { v.visit_table(pos)? .visit_field::("keybind_name", Self::VT_KEYBIND_NAME, false)? .visit_field::>("keybind_value", Self::VT_KEYBIND_VALUE, false)? - .visit_field::("keybind_delay", Self::VT_KEYBIND_DELAY, false)? + .visit_field::("keybind_delay", Self::VT_KEYBIND_DELAY, false)? .finish(); Ok(()) } @@ -86,7 +86,7 @@ impl flatbuffers::Verifiable for Keybind<'_> { pub struct KeybindArgs<'a> { pub keybind_name: KeybindName, pub keybind_value: Option>, - pub keybind_delay: i64, + pub keybind_delay: f32, } impl<'a> Default for KeybindArgs<'a> { #[inline] @@ -94,7 +94,7 @@ impl<'a> Default for KeybindArgs<'a> { KeybindArgs { keybind_name: KeybindName::FULL_RESET, keybind_value: None, - keybind_delay: 0, + keybind_delay: 0.0, } } } @@ -113,8 +113,8 @@ impl<'a: 'b, 'b> KeybindBuilder<'a, 'b> { self.fbb_.push_slot_always::>(Keybind::VT_KEYBIND_VALUE, keybind_value); } #[inline] - pub fn add_keybind_delay(&mut self, keybind_delay: i64) { - self.fbb_.push_slot::(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0); + pub fn add_keybind_delay(&mut self, keybind_delay: f32) { + self.fbb_.push_slot::(Keybind::VT_KEYBIND_DELAY, keybind_delay, 0.0); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeybindBuilder<'a, 'b> { diff --git a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts index 6007732b..688aa766 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/keybind.ts @@ -35,9 +35,9 @@ keybindValue(optionalEncoding?:any):string|Uint8Array|null { return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } -keybindDelay():bigint { +keybindDelay():number { const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readInt64(this.bb_pos + offset) : BigInt('0'); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; } static startKeybind(builder:flatbuffers.Builder) { @@ -52,8 +52,8 @@ static addKeybindValue(builder:flatbuffers.Builder, keybindValueOffset:flatbuffe builder.addFieldOffset(1, keybindValueOffset, 0); } -static addKeybindDelay(builder:flatbuffers.Builder, keybindDelay:bigint) { - builder.addFieldInt64(2, keybindDelay, BigInt('0')); +static addKeybindDelay(builder:flatbuffers.Builder, keybindDelay:number) { + builder.addFieldFloat32(2, keybindDelay, 0.0); } static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -61,7 +61,7 @@ static endKeybind(builder:flatbuffers.Builder):flatbuffers.Offset { return offset; } -static createKeybind(builder:flatbuffers.Builder, keybindName:KeybindName, keybindValueOffset:flatbuffers.Offset, keybindDelay:bigint):flatbuffers.Offset { +static createKeybind(builder:flatbuffers.Builder, keybindName:KeybindName, keybindValueOffset:flatbuffers.Offset, keybindDelay:number):flatbuffers.Offset { Keybind.startKeybind(builder); Keybind.addKeybindName(builder, keybindName); Keybind.addKeybindValue(builder, keybindValueOffset); @@ -89,7 +89,7 @@ export class KeybindT implements flatbuffers.IGeneratedObject { constructor( public keybindName: KeybindName = KeybindName.FULL_RESET, public keybindValue: string|Uint8Array|null = null, - public keybindDelay: bigint = BigInt('0') + public keybindDelay: number = 0.0 ){} diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 99d7edab..eaefd89a 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -112,7 +112,7 @@ enum KeybindName: uint8 { table Keybind { keybind_name: KeybindName; keybind_value: string; - keybind_delay: long; + keybind_delay: float; } // Requests specified keybind eg. FULL_RESET -> KeybindResponse sends the keybind back to gui