From 8d1424b511f97611cd0e83b96bb8e40c09f53889 Mon Sep 17 00:00:00 2001 From: unlogisch04 <98281608+unlogisch04@users.noreply.github.com> Date: Sun, 2 Oct 2022 20:02:27 +0200 Subject: [PATCH 1/9] More Serial Features (#41) * Added SerialSetCtrlRequest Allow the RTS and DTR to set over the WebUI. DIY Tracker fix for some D1 mini with CH340 chipsets that use different control pins. Adding SerialRestartTrackerRequest This is to Invoke a Try to Restart the Tracker over the Serial Port via RTS / DTR. This helps to see the full log in the WiFi window. This does not work with the SlimeVR Tracker * Serial * Changes for Serial * Update rpc.fbs * Added Descriptions Co-Authored-By: Ryan Butler * Update schema/rpc.fbs Co-authored-by: Ryan Butler * Update schema/rpc.fbs Co-authored-by: Ryan Butler * Updated Comments Co-Authored-By: Ryan Butler Co-authored-by: Ryan Butler --- .../generated/all_generated.h | 163 +++++++++++++++++- .../rpc/OpenSerialRequest.java | 88 +++++----- .../rpc/OpenSerialRequestT.java | 32 ++-- .../src/solarxr_protocol/rpc/RpcMessage.java | 5 +- .../rpc/RpcMessageHeader.java | 12 ++ .../solarxr_protocol/rpc/RpcMessageUnion.java | 6 + .../rpc/SerialTrackerFactoryResetRequest.java | 47 +++++ .../SerialTrackerFactoryResetRequestT.java | 16 ++ .../rpc/SerialTrackerGetInfoRequest.java | 47 +++++ .../rpc/SerialTrackerGetInfoRequestT.java | 16 ++ .../rpc/SerialTrackerRebootRequest.java | 47 +++++ .../rpc/SerialTrackerRebootRequestT.java | 16 ++ protocol/rust/src/generated/mod.rs | 6 + .../rpc/rpc_message_generated.rs | 18 +- .../rpc/rpc_message_header_generated.rs | 54 ++++++ ...tracker_factory_reset_request_generated.rs | 90 ++++++++++ ...rial_tracker_get_info_request_generated.rs | 90 ++++++++++ ...serial_tracker_reboot_request_generated.rs | 90 ++++++++++ protocol/typescript/src/all.ts | 3 + .../rpc/rpc-message-header.ts | 5 +- .../src/solarxr-protocol/rpc/rpc-message.ts | 22 ++- .../serial-tracker-factory-reset-request.ts | 57 ++++++ .../rpc/serial-tracker-get-info-request.ts | 57 ++++++ .../rpc/serial-tracker-reboot-request.ts | 57 ++++++ schema/rpc.fbs | 14 +- 25 files changed, 982 insertions(+), 76 deletions(-) create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java create mode 100644 protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequestT.java create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts create mode 100644 protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index bfdcbb81..54903fb0 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -178,6 +178,15 @@ struct SetWifiRequestBuilder; struct SerialUpdateResponse; struct SerialUpdateResponseBuilder; +struct SerialTrackerRebootRequest; +struct SerialTrackerRebootRequestBuilder; + +struct SerialTrackerGetInfoRequest; +struct SerialTrackerGetInfoRequestBuilder; + +struct SerialTrackerFactoryResetRequest; +struct SerialTrackerFactoryResetRequestBuilder; + struct AutoBoneProcessRequest; struct AutoBoneProcessRequestBuilder; @@ -681,11 +690,14 @@ enum class RpcMessage : uint8_t { OverlayDisplayModeRequest = 21, OverlayDisplayModeChangeRequest = 22, OverlayDisplayModeResponse = 23, + SerialTrackerRebootRequest = 24, + SerialTrackerGetInfoRequest = 25, + SerialTrackerFactoryResetRequest = 26, MIN = NONE, - MAX = OverlayDisplayModeResponse + MAX = SerialTrackerFactoryResetRequest }; -inline const RpcMessage (&EnumValuesRpcMessage())[24] { +inline const RpcMessage (&EnumValuesRpcMessage())[27] { static const RpcMessage values[] = { RpcMessage::NONE, RpcMessage::HeartbeatRequest, @@ -710,13 +722,16 @@ inline const RpcMessage (&EnumValuesRpcMessage())[24] { RpcMessage::AutoBoneEpochResponse, RpcMessage::OverlayDisplayModeRequest, RpcMessage::OverlayDisplayModeChangeRequest, - RpcMessage::OverlayDisplayModeResponse + RpcMessage::OverlayDisplayModeResponse, + RpcMessage::SerialTrackerRebootRequest, + RpcMessage::SerialTrackerGetInfoRequest, + RpcMessage::SerialTrackerFactoryResetRequest }; return values; } inline const char * const *EnumNamesRpcMessage() { - static const char * const names[25] = { + static const char * const names[28] = { "NONE", "HeartbeatRequest", "HeartbeatResponse", @@ -741,13 +756,16 @@ inline const char * const *EnumNamesRpcMessage() { "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", + "SerialTrackerRebootRequest", + "SerialTrackerGetInfoRequest", + "SerialTrackerFactoryResetRequest", nullptr }; return names; } inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::OverlayDisplayModeResponse)) return ""; + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::SerialTrackerFactoryResetRequest)) return ""; const size_t index = static_cast(e); return EnumNamesRpcMessage()[index]; } @@ -848,6 +866,18 @@ template<> struct RpcMessageTraits struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerRebootRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerGetInfoRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerFactoryResetRequest; +}; + bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type); bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); @@ -2970,6 +3000,15 @@ struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::rpc::OverlayDisplayModeResponse *message_as_OverlayDisplayModeResponse() const { return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeResponse ? static_cast(message()) : nullptr; } + const solarxr_protocol::rpc::SerialTrackerRebootRequest *message_as_SerialTrackerRebootRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerRebootRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialTrackerGetInfoRequest *message_as_SerialTrackerGetInfoRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetInfoRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialTrackerFactoryResetRequest *message_as_SerialTrackerFactoryResetRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerFactoryResetRequest ? static_cast(message()) : nullptr; + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TX_ID, 4) && @@ -3072,6 +3111,18 @@ template<> inline const solarxr_protocol::rpc::OverlayDisplayModeResponse *RpcMe return message_as_OverlayDisplayModeResponse(); } +template<> inline const solarxr_protocol::rpc::SerialTrackerRebootRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerRebootRequest(); +} + +template<> inline const solarxr_protocol::rpc::SerialTrackerGetInfoRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerGetInfoRequest(); +} + +template<> inline const solarxr_protocol::rpc::SerialTrackerFactoryResetRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerFactoryResetRequest(); +} + struct RpcMessageHeaderBuilder { typedef RpcMessageHeader Table; flatbuffers::FlatBufferBuilder &fbb_; @@ -4103,6 +4154,96 @@ inline flatbuffers::Offset CreateSerialUpdateResponseDirec closed); } +/// Reboots the tracker connected to the serial monitor +struct SerialTrackerRebootRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerRebootRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerRebootRequestBuilder { + typedef SerialTrackerRebootRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerRebootRequestBuilder(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 CreateSerialTrackerRebootRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerRebootRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Sends the GET INFO cmd to the current tracker on the serial monitor +struct SerialTrackerGetInfoRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerGetInfoRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerGetInfoRequestBuilder { + typedef SerialTrackerGetInfoRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerGetInfoRequestBuilder(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 CreateSerialTrackerGetInfoRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerGetInfoRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Sends the FRST cmd to the currently over the Serial Montior connected Tracker +struct SerialTrackerFactoryResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerFactoryResetRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerFactoryResetRequestBuilder { + typedef SerialTrackerFactoryResetRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerFactoryResetRequestBuilder(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 CreateSerialTrackerFactoryResetRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerFactoryResetRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + struct AutoBoneProcessRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef AutoBoneProcessRequestBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { @@ -4713,6 +4854,18 @@ inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, R auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } + case RpcMessage::SerialTrackerRebootRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialTrackerGetInfoRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialTrackerFactoryResetRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } default: return true; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java index 9f362487..7507cb66 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequest.java @@ -1,44 +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 OpenSerialRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static OpenSerialRequest getRootAsOpenSerialRequest(ByteBuffer _bb) { return getRootAsOpenSerialRequest(_bb, new OpenSerialRequest()); } - public static OpenSerialRequest getRootAsOpenSerialRequest(ByteBuffer _bb, OpenSerialRequest 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 OpenSerialRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startOpenSerialRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endOpenSerialRequest(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 OpenSerialRequest get(int j) { return get(new OpenSerialRequest(), j); } - public OpenSerialRequest get(OpenSerialRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OpenSerialRequestT unpack() { - OpenSerialRequestT _o = new OpenSerialRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OpenSerialRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, OpenSerialRequestT _o) { - if (_o == null) return 0; - startOpenSerialRequest(builder); - return endOpenSerialRequest(builder); - } -} - +// 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 OpenSerialRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static OpenSerialRequest getRootAsOpenSerialRequest(ByteBuffer _bb) { return getRootAsOpenSerialRequest(_bb, new OpenSerialRequest()); } + public static OpenSerialRequest getRootAsOpenSerialRequest(ByteBuffer _bb, OpenSerialRequest 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 OpenSerialRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startOpenSerialRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endOpenSerialRequest(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 OpenSerialRequest get(int j) { return get(new OpenSerialRequest(), j); } + public OpenSerialRequest get(OpenSerialRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OpenSerialRequestT unpack() { + OpenSerialRequestT _o = new OpenSerialRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OpenSerialRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, OpenSerialRequestT _o) { + if (_o == null) return 0; + startOpenSerialRequest(builder); + return endOpenSerialRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java index da39a109..3155c9d3 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OpenSerialRequestT.java @@ -1,16 +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 OpenSerialRequestT { - - - public OpenSerialRequestT() { - } -} - +// 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 OpenSerialRequestT { + + + public OpenSerialRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index 829cac82..808818f8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -29,8 +29,11 @@ private RpcMessage() { } public static final byte OverlayDisplayModeRequest = 21; public static final byte OverlayDisplayModeChangeRequest = 22; public static final byte OverlayDisplayModeResponse = 23; + public static final byte SerialTrackerRebootRequest = 24; + public static final byte SerialTrackerGetInfoRequest = 25; + public static final byte SerialTrackerFactoryResetRequest = 26; - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", }; + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", }; 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 91adb959..6acd0e84 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -144,6 +144,18 @@ public void unpackTo(RpcMessageHeaderT _o) { _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeResponse()); _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeResponse) _oMessageValue).unpack() : null); break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerRebootRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerRebootRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerRebootRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetInfoRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetInfoRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetInfoRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerFactoryResetRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerFactoryResetRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerFactoryResetRequest) _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 519bc50b..c0941e60 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -44,6 +44,9 @@ public RpcMessageUnion() { public solarxr_protocol.rpc.OverlayDisplayModeRequestT asOverlayDisplayModeRequest() { return (solarxr_protocol.rpc.OverlayDisplayModeRequestT) value; } public solarxr_protocol.rpc.OverlayDisplayModeChangeRequestT asOverlayDisplayModeChangeRequest() { return (solarxr_protocol.rpc.OverlayDisplayModeChangeRequestT) value; } public solarxr_protocol.rpc.OverlayDisplayModeResponseT asOverlayDisplayModeResponse() { return (solarxr_protocol.rpc.OverlayDisplayModeResponseT) value; } + public solarxr_protocol.rpc.SerialTrackerRebootRequestT asSerialTrackerRebootRequest() { return (solarxr_protocol.rpc.SerialTrackerRebootRequestT) value; } + public solarxr_protocol.rpc.SerialTrackerGetInfoRequestT asSerialTrackerGetInfoRequest() { return (solarxr_protocol.rpc.SerialTrackerGetInfoRequestT) value; } + public solarxr_protocol.rpc.SerialTrackerFactoryResetRequestT asSerialTrackerFactoryResetRequest() { return (solarxr_protocol.rpc.SerialTrackerFactoryResetRequestT) value; } public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { switch (_o.type) { @@ -70,6 +73,9 @@ public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { case RpcMessage.OverlayDisplayModeRequest: return solarxr_protocol.rpc.OverlayDisplayModeRequest.pack(builder, _o.asOverlayDisplayModeRequest()); case RpcMessage.OverlayDisplayModeChangeRequest: return solarxr_protocol.rpc.OverlayDisplayModeChangeRequest.pack(builder, _o.asOverlayDisplayModeChangeRequest()); case RpcMessage.OverlayDisplayModeResponse: return solarxr_protocol.rpc.OverlayDisplayModeResponse.pack(builder, _o.asOverlayDisplayModeResponse()); + case RpcMessage.SerialTrackerRebootRequest: return solarxr_protocol.rpc.SerialTrackerRebootRequest.pack(builder, _o.asSerialTrackerRebootRequest()); + case RpcMessage.SerialTrackerGetInfoRequest: return solarxr_protocol.rpc.SerialTrackerGetInfoRequest.pack(builder, _o.asSerialTrackerGetInfoRequest()); + case RpcMessage.SerialTrackerFactoryResetRequest: return solarxr_protocol.rpc.SerialTrackerFactoryResetRequest.pack(builder, _o.asSerialTrackerFactoryResetRequest()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java new file mode 100644 index 00000000..948d2783 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequest.java @@ -0,0 +1,47 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Sends the FRST cmd to the currently over the Serial Montior connected Tracker + */ +@SuppressWarnings("unused") +public final class SerialTrackerFactoryResetRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SerialTrackerFactoryResetRequest getRootAsSerialTrackerFactoryResetRequest(ByteBuffer _bb) { return getRootAsSerialTrackerFactoryResetRequest(_bb, new SerialTrackerFactoryResetRequest()); } + public static SerialTrackerFactoryResetRequest getRootAsSerialTrackerFactoryResetRequest(ByteBuffer _bb, SerialTrackerFactoryResetRequest 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 SerialTrackerFactoryResetRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSerialTrackerFactoryResetRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSerialTrackerFactoryResetRequest(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 SerialTrackerFactoryResetRequest get(int j) { return get(new SerialTrackerFactoryResetRequest(), j); } + public SerialTrackerFactoryResetRequest get(SerialTrackerFactoryResetRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialTrackerFactoryResetRequestT unpack() { + SerialTrackerFactoryResetRequestT _o = new SerialTrackerFactoryResetRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialTrackerFactoryResetRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SerialTrackerFactoryResetRequestT _o) { + if (_o == null) return 0; + startSerialTrackerFactoryResetRequest(builder); + return endSerialTrackerFactoryResetRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequestT.java new file mode 100644 index 00000000..8600f7b3 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerFactoryResetRequestT.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 SerialTrackerFactoryResetRequestT { + + + public SerialTrackerFactoryResetRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.java new file mode 100644 index 00000000..2f5f1a0a --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequest.java @@ -0,0 +1,47 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Sends the GET INFO cmd to the current tracker on the serial monitor + */ +@SuppressWarnings("unused") +public final class SerialTrackerGetInfoRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SerialTrackerGetInfoRequest getRootAsSerialTrackerGetInfoRequest(ByteBuffer _bb) { return getRootAsSerialTrackerGetInfoRequest(_bb, new SerialTrackerGetInfoRequest()); } + public static SerialTrackerGetInfoRequest getRootAsSerialTrackerGetInfoRequest(ByteBuffer _bb, SerialTrackerGetInfoRequest 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 SerialTrackerGetInfoRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSerialTrackerGetInfoRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSerialTrackerGetInfoRequest(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 SerialTrackerGetInfoRequest get(int j) { return get(new SerialTrackerGetInfoRequest(), j); } + public SerialTrackerGetInfoRequest get(SerialTrackerGetInfoRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialTrackerGetInfoRequestT unpack() { + SerialTrackerGetInfoRequestT _o = new SerialTrackerGetInfoRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialTrackerGetInfoRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SerialTrackerGetInfoRequestT _o) { + if (_o == null) return 0; + startSerialTrackerGetInfoRequest(builder); + return endSerialTrackerGetInfoRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequestT.java new file mode 100644 index 00000000..47178ba1 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerGetInfoRequestT.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 SerialTrackerGetInfoRequestT { + + + public SerialTrackerGetInfoRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java new file mode 100644 index 00000000..703d378b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequest.java @@ -0,0 +1,47 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Reboots the tracker connected to the serial monitor + */ +@SuppressWarnings("unused") +public final class SerialTrackerRebootRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SerialTrackerRebootRequest getRootAsSerialTrackerRebootRequest(ByteBuffer _bb) { return getRootAsSerialTrackerRebootRequest(_bb, new SerialTrackerRebootRequest()); } + public static SerialTrackerRebootRequest getRootAsSerialTrackerRebootRequest(ByteBuffer _bb, SerialTrackerRebootRequest 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 SerialTrackerRebootRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSerialTrackerRebootRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSerialTrackerRebootRequest(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 SerialTrackerRebootRequest get(int j) { return get(new SerialTrackerRebootRequest(), j); } + public SerialTrackerRebootRequest get(SerialTrackerRebootRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialTrackerRebootRequestT unpack() { + SerialTrackerRebootRequestT _o = new SerialTrackerRebootRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialTrackerRebootRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SerialTrackerRebootRequestT _o) { + if (_o == null) return 0; + startSerialTrackerRebootRequest(builder); + return endSerialTrackerRebootRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequestT.java new file mode 100644 index 00000000..f0350379 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/rpc/SerialTrackerRebootRequestT.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 SerialTrackerRebootRequestT { + + + public SerialTrackerRebootRequestT() { + } +} + diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index d27de16e..2a8be35a 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -144,6 +144,12 @@ pub mod solarxr_protocol { pub use self::set_wifi_request_generated::*; mod serial_update_response_generated; pub use self::serial_update_response_generated::*; + mod serial_tracker_reboot_request_generated; + pub use self::serial_tracker_reboot_request_generated::*; + mod serial_tracker_get_info_request_generated; + pub use self::serial_tracker_get_info_request_generated::*; + mod serial_tracker_factory_reset_request_generated; + pub use self::serial_tracker_factory_reset_request_generated::*; mod auto_bone_process_request_generated; pub use self::auto_bone_process_request_generated::*; mod auto_bone_process_status_response_generated; diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/rpc_message_generated.rs index 44113fdb..d2b6b231 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 @@ -11,10 +11,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 = 23; +pub const ENUM_MAX_RPC_MESSAGE: u8 = 26; #[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; 24] = [ +pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 27] = [ RpcMessage::NONE, RpcMessage::HeartbeatRequest, RpcMessage::HeartbeatResponse, @@ -39,6 +39,9 @@ pub const ENUM_VALUES_RPC_MESSAGE: [RpcMessage; 24] = [ RpcMessage::OverlayDisplayModeRequest, RpcMessage::OverlayDisplayModeChangeRequest, RpcMessage::OverlayDisplayModeResponse, + RpcMessage::SerialTrackerRebootRequest, + RpcMessage::SerialTrackerGetInfoRequest, + RpcMessage::SerialTrackerFactoryResetRequest, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -70,9 +73,12 @@ impl RpcMessage { pub const OverlayDisplayModeRequest: Self = Self(21); pub const OverlayDisplayModeChangeRequest: Self = Self(22); pub const OverlayDisplayModeResponse: Self = Self(23); + pub const SerialTrackerRebootRequest: Self = Self(24); + pub const SerialTrackerGetInfoRequest: Self = Self(25); + pub const SerialTrackerFactoryResetRequest: Self = Self(26); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 23; + pub const ENUM_MAX: u8 = 26; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, Self::HeartbeatRequest, @@ -98,6 +104,9 @@ impl RpcMessage { Self::OverlayDisplayModeRequest, Self::OverlayDisplayModeChangeRequest, Self::OverlayDisplayModeResponse, + Self::SerialTrackerRebootRequest, + Self::SerialTrackerGetInfoRequest, + Self::SerialTrackerFactoryResetRequest, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -126,6 +135,9 @@ impl RpcMessage { Self::OverlayDisplayModeRequest => Some("OverlayDisplayModeRequest"), Self::OverlayDisplayModeChangeRequest => Some("OverlayDisplayModeChangeRequest"), Self::OverlayDisplayModeResponse => Some("OverlayDisplayModeResponse"), + Self::SerialTrackerRebootRequest => Some("SerialTrackerRebootRequest"), + Self::SerialTrackerGetInfoRequest => Some("SerialTrackerGetInfoRequest"), + Self::SerialTrackerFactoryResetRequest => Some("SerialTrackerFactoryResetRequest"), _ => 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 2fb17409..bf3bc9d6 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 @@ -289,6 +289,36 @@ impl<'a> RpcMessageHeader<'a> { } } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_reboot_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerRebootRequest { + self.message().map(SerialTrackerRebootRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_get_info_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerGetInfoRequest { + self.message().map(SerialTrackerGetInfoRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_factory_reset_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerFactoryResetRequest { + self.message().map(SerialTrackerFactoryResetRequest::init_from_table) + } else { + None + } + } + } impl flatbuffers::Verifiable for RpcMessageHeader<'_> { @@ -324,6 +354,9 @@ impl flatbuffers::Verifiable for RpcMessageHeader<'_> { RpcMessage::OverlayDisplayModeRequest => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeRequest", pos), RpcMessage::OverlayDisplayModeChangeRequest => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeChangeRequest", pos), RpcMessage::OverlayDisplayModeResponse => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeResponse", pos), + RpcMessage::SerialTrackerRebootRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerRebootRequest", pos), + RpcMessage::SerialTrackerGetInfoRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetInfoRequest", pos), + RpcMessage::SerialTrackerFactoryResetRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerFactoryResetRequest", pos), _ => Ok(()), } })? @@ -546,6 +579,27 @@ impl core::fmt::Debug for RpcMessageHeader<'_> { ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, + RpcMessage::SerialTrackerRebootRequest => { + if let Some(x) = self.message_as_serial_tracker_reboot_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialTrackerGetInfoRequest => { + if let Some(x) = self.message_as_serial_tracker_get_info_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialTrackerFactoryResetRequest => { + if let Some(x) = self.message_as_serial_tracker_factory_reset_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, _ => { let x: Option<()> = None; ds.field("message", &x) diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs new file mode 100644 index 00000000..a88871db --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs @@ -0,0 +1,90 @@ +// automatically generated by the FlatBuffers compiler, do not modify +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 SerialTrackerFactoryResetRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Sends the FRST cmd to the currently over the Serial Montior connected Tracker +pub struct SerialTrackerFactoryResetRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialTrackerFactoryResetRequest<'a> { + type Inner = SerialTrackerFactoryResetRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SerialTrackerFactoryResetRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialTrackerFactoryResetRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SerialTrackerFactoryResetRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialTrackerFactoryResetRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SerialTrackerFactoryResetRequest<'_> { + #[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 SerialTrackerFactoryResetRequestArgs { +} +impl<'a> Default for SerialTrackerFactoryResetRequestArgs { + #[inline] + fn default() -> Self { + SerialTrackerFactoryResetRequestArgs { + } + } +} + +pub struct SerialTrackerFactoryResetRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialTrackerFactoryResetRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialTrackerFactoryResetRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialTrackerFactoryResetRequestBuilder { + 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 SerialTrackerFactoryResetRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialTrackerFactoryResetRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs new file mode 100644 index 00000000..8fff431b --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs @@ -0,0 +1,90 @@ +// automatically generated by the FlatBuffers compiler, do not modify +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 SerialTrackerGetInfoRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Sends the GET INFO cmd to the current tracker on the serial monitor +pub struct SerialTrackerGetInfoRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialTrackerGetInfoRequest<'a> { + type Inner = SerialTrackerGetInfoRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SerialTrackerGetInfoRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialTrackerGetInfoRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SerialTrackerGetInfoRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialTrackerGetInfoRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SerialTrackerGetInfoRequest<'_> { + #[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 SerialTrackerGetInfoRequestArgs { +} +impl<'a> Default for SerialTrackerGetInfoRequestArgs { + #[inline] + fn default() -> Self { + SerialTrackerGetInfoRequestArgs { + } + } +} + +pub struct SerialTrackerGetInfoRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialTrackerGetInfoRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialTrackerGetInfoRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialTrackerGetInfoRequestBuilder { + 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 SerialTrackerGetInfoRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialTrackerGetInfoRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs new file mode 100644 index 00000000..ed2e6ca9 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs @@ -0,0 +1,90 @@ +// automatically generated by the FlatBuffers compiler, do not modify +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 SerialTrackerRebootRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Reboots the tracker connected to the serial monitor +pub struct SerialTrackerRebootRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialTrackerRebootRequest<'a> { + type Inner = SerialTrackerRebootRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SerialTrackerRebootRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialTrackerRebootRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SerialTrackerRebootRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialTrackerRebootRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SerialTrackerRebootRequest<'_> { + #[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 SerialTrackerRebootRequestArgs { +} +impl<'a> Default for SerialTrackerRebootRequestArgs { + #[inline] + fn default() -> Self { + SerialTrackerRebootRequestArgs { + } + } +} + +pub struct SerialTrackerRebootRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialTrackerRebootRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialTrackerRebootRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialTrackerRebootRequestBuilder { + 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 SerialTrackerRebootRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("SerialTrackerRebootRequest"); + ds.finish() + } +} diff --git a/protocol/typescript/src/all.ts b/protocol/typescript/src/all.ts index 1dde29bd..156608cc 100644 --- a/protocol/typescript/src/all.ts +++ b/protocol/typescript/src/all.ts @@ -51,6 +51,9 @@ export { ResetResponse, ResetResponseT } from './solarxr-protocol/rpc/reset-resp export { ResetType } from './solarxr-protocol/rpc/reset-type'; export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr-protocol/rpc/rpc-message'; export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr-protocol/rpc/rpc-message-header'; +export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr-protocol/rpc/serial-tracker-factory-reset-request'; +export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr-protocol/rpc/serial-tracker-get-info-request'; +export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr-protocol/rpc/serial-tracker-reboot-request'; export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr-protocol/rpc/serial-update-response'; export { SetWifiRequest, SetWifiRequestT } from './solarxr-protocol/rpc/set-wifi-request'; export { SettingsRequest, SettingsRequestT } from './solarxr-protocol/rpc/settings-request'; 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 87b9c4aa..8057ed5e 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -20,6 +20,9 @@ import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/ import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus'; import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request'; import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr-protocol/rpc/rpc-message'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request'; import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response'; import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request'; import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request'; @@ -123,7 +126,7 @@ export class RpcMessageHeaderT { constructor( public txId: TransactionIdT|null = null, public messageType: RpcMessage = RpcMessage.NONE, - public message: AssignTrackerRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|SerialUpdateResponseT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|null = null + public message: AssignTrackerRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|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 ebc79006..cf4842b7 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -16,6 +16,9 @@ import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../s import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest'; import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus'; import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request'; import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response'; import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request'; import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request'; @@ -49,13 +52,16 @@ export enum RpcMessage{ AutoBoneEpochResponse = 20, OverlayDisplayModeRequest = 21, OverlayDisplayModeChangeRequest = 22, - OverlayDisplayModeResponse = 23 + OverlayDisplayModeResponse = 23, + SerialTrackerRebootRequest = 24, + SerialTrackerGetInfoRequest = 25, + SerialTrackerFactoryResetRequest = 26 } export function unionToRpcMessage( type: RpcMessage, - accessor: (obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null -): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { + accessor: (obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null +): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; @@ -81,15 +87,18 @@ export function unionToRpcMessage( case 'OverlayDisplayModeRequest': return accessor(new OverlayDisplayModeRequest())! as OverlayDisplayModeRequest; case 'OverlayDisplayModeChangeRequest': return accessor(new OverlayDisplayModeChangeRequest())! as OverlayDisplayModeChangeRequest; case 'OverlayDisplayModeResponse': return accessor(new OverlayDisplayModeResponse())! as OverlayDisplayModeResponse; + case 'SerialTrackerRebootRequest': return accessor(new SerialTrackerRebootRequest())! as SerialTrackerRebootRequest; + case 'SerialTrackerGetInfoRequest': return accessor(new SerialTrackerGetInfoRequest())! as SerialTrackerGetInfoRequest; + case 'SerialTrackerFactoryResetRequest': return accessor(new SerialTrackerFactoryResetRequest())! as SerialTrackerFactoryResetRequest; default: return null; } } export function unionListToRpcMessage( type: RpcMessage, - accessor: (index: number, obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null, + accessor: (index: number, obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null, index: number -): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { +): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { switch(RpcMessage[type]) { case 'NONE': return null; case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; @@ -115,6 +124,9 @@ export function unionListToRpcMessage( case 'OverlayDisplayModeRequest': return accessor(index, new OverlayDisplayModeRequest())! as OverlayDisplayModeRequest; case 'OverlayDisplayModeChangeRequest': return accessor(index, new OverlayDisplayModeChangeRequest())! as OverlayDisplayModeChangeRequest; case 'OverlayDisplayModeResponse': return accessor(index, new OverlayDisplayModeResponse())! as OverlayDisplayModeResponse; + case 'SerialTrackerRebootRequest': return accessor(index, new SerialTrackerRebootRequest())! as SerialTrackerRebootRequest; + case 'SerialTrackerGetInfoRequest': return accessor(index, new SerialTrackerGetInfoRequest())! as SerialTrackerGetInfoRequest; + case 'SerialTrackerFactoryResetRequest': return accessor(index, new SerialTrackerFactoryResetRequest())! as SerialTrackerFactoryResetRequest; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts new file mode 100644 index 00000000..c6b1063b --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Sends the FRST cmd to the currently over the Serial Montior connected Tracker + */ +export class SerialTrackerFactoryResetRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SerialTrackerFactoryResetRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialTrackerFactoryResetRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerFactoryResetRequest):SerialTrackerFactoryResetRequest { + return (obj || new SerialTrackerFactoryResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialTrackerFactoryResetRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerFactoryResetRequest):SerialTrackerFactoryResetRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialTrackerFactoryResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSerialTrackerFactoryResetRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSerialTrackerFactoryResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialTrackerFactoryResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SerialTrackerFactoryResetRequest.startSerialTrackerFactoryResetRequest(builder); + return SerialTrackerFactoryResetRequest.endSerialTrackerFactoryResetRequest(builder); +} + +unpack(): SerialTrackerFactoryResetRequestT { + return new SerialTrackerFactoryResetRequestT(); +} + + +unpackTo(_o: SerialTrackerFactoryResetRequestT): void {} +} + +export class SerialTrackerFactoryResetRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerFactoryResetRequest.createSerialTrackerFactoryResetRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts new file mode 100644 index 00000000..c5d35503 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Sends the GET INFO cmd to the current tracker on the serial monitor + */ +export class SerialTrackerGetInfoRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SerialTrackerGetInfoRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialTrackerGetInfoRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetInfoRequest):SerialTrackerGetInfoRequest { + return (obj || new SerialTrackerGetInfoRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialTrackerGetInfoRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerGetInfoRequest):SerialTrackerGetInfoRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialTrackerGetInfoRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSerialTrackerGetInfoRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSerialTrackerGetInfoRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialTrackerGetInfoRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SerialTrackerGetInfoRequest.startSerialTrackerGetInfoRequest(builder); + return SerialTrackerGetInfoRequest.endSerialTrackerGetInfoRequest(builder); +} + +unpack(): SerialTrackerGetInfoRequestT { + return new SerialTrackerGetInfoRequestT(); +} + + +unpackTo(_o: SerialTrackerGetInfoRequestT): void {} +} + +export class SerialTrackerGetInfoRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerGetInfoRequest.createSerialTrackerGetInfoRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts new file mode 100644 index 00000000..3f97754c --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts @@ -0,0 +1,57 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Reboots the tracker connected to the serial monitor + */ +export class SerialTrackerRebootRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SerialTrackerRebootRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialTrackerRebootRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerRebootRequest):SerialTrackerRebootRequest { + return (obj || new SerialTrackerRebootRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialTrackerRebootRequest(bb:flatbuffers.ByteBuffer, obj?:SerialTrackerRebootRequest):SerialTrackerRebootRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialTrackerRebootRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSerialTrackerRebootRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSerialTrackerRebootRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialTrackerRebootRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SerialTrackerRebootRequest.startSerialTrackerRebootRequest(builder); + return SerialTrackerRebootRequest.endSerialTrackerRebootRequest(builder); +} + +unpack(): SerialTrackerRebootRequestT { + return new SerialTrackerRebootRequestT(); +} + + +unpackTo(_o: SerialTrackerRebootRequestT): void {} +} + +export class SerialTrackerRebootRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SerialTrackerRebootRequest.createSerialTrackerRebootRequest(builder); +} +} diff --git a/schema/rpc.fbs b/schema/rpc.fbs index b26d3383..f7e8204e 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -34,7 +34,10 @@ union RpcMessage { AutoBoneEpochResponse, OverlayDisplayModeRequest, OverlayDisplayModeChangeRequest, - OverlayDisplayModeResponse + OverlayDisplayModeResponse, + SerialTrackerRebootRequest, + SerialTrackerGetInfoRequest, + SerialTrackerFactoryResetRequest } table RpcMessageHeader { @@ -161,6 +164,15 @@ table SerialUpdateResponse { closed: bool; } +/// Reboots the tracker connected to the serial monitor +table SerialTrackerRebootRequest {} + +/// Sends the GET INFO cmd to the current tracker on the serial monitor +table SerialTrackerGetInfoRequest {} + +/// Sends the FRST cmd to the currently over the Serial Montior connected Tracker +table SerialTrackerFactoryResetRequest {} + enum AutoBoneProcessType: uint8 { NONE = 0, RECORD = 1, From 116580c3443829bf07b5a0790f52d49a939850f9 Mon Sep 17 00:00:00 2001 From: Erimel Date: Tue, 11 Oct 2022 18:38:44 -0400 Subject: [PATCH 2/9] Better filtering (#40) * change filtering namings * make amount a float * rename types * remove filtering buffer * amount comment --- .../generated/all_generated.h | 43 ++++++++----------- .../datatypes/FilteringType.java | 6 +-- .../rpc/FilteringSettings.java | 28 ++++++------ .../rpc/FilteringSettingsT.java | 14 ++---- .../datatypes/filtering_type_generated.rs | 16 +++---- .../rpc/filtering_settings_generated.rs | 35 +++++---------- .../datatypes/filtering-type.ts | 4 +- .../rpc/filtering-settings.ts | 39 ++++++----------- schema/datatypes/datatypes.fbs | 4 +- schema/rpc.fbs | 4 +- 10 files changed, 75 insertions(+), 118 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 54903fb0..71af8169 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -252,17 +252,17 @@ inline const char *EnumNameFirmwareErrorCode(FirmwareErrorCode e) { /// Used for filtering tracker rotations in software enum class FilteringType : uint8_t { NONE = 0, - INTERPOLATION = 1, - EXTRAPOLATION = 2, + SMOOTHING = 1, + PREDICTION = 2, MIN = NONE, - MAX = EXTRAPOLATION + MAX = PREDICTION }; inline const FilteringType (&EnumValuesFilteringType())[3] { static const FilteringType values[] = { FilteringType::NONE, - FilteringType::INTERPOLATION, - FilteringType::EXTRAPOLATION + FilteringType::SMOOTHING, + FilteringType::PREDICTION }; return values; } @@ -270,15 +270,15 @@ inline const FilteringType (&EnumValuesFilteringType())[3] { inline const char * const *EnumNamesFilteringType() { static const char * const names[4] = { "NONE", - "INTERPOLATION", - "EXTRAPOLATION", + "SMOOTHING", + "PREDICTION", nullptr }; return names; } inline const char *EnumNameFilteringType(FilteringType e) { - if (flatbuffers::IsOutRange(e, FilteringType::NONE, FilteringType::EXTRAPOLATION)) return ""; + if (flatbuffers::IsOutRange(e, FilteringType::NONE, FilteringType::PREDICTION)) return ""; const size_t index = static_cast(e); return EnumNamesFilteringType()[index]; } @@ -3617,23 +3617,19 @@ struct FilteringSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef FilteringSettingsBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_TYPE = 4, - VT_INTENSITY = 6, - VT_TICKS = 8 + VT_AMOUNT = 6 }; solarxr_protocol::datatypes::FilteringType type() const { return static_cast(GetField(VT_TYPE, 0)); } - uint8_t intensity() const { - return GetField(VT_INTENSITY, 0); - } - uint8_t ticks() const { - return GetField(VT_TICKS, 0); + /// 0 to 1. A higher value results in more smoothing or prediction + float amount() const { + return GetField(VT_AMOUNT, 0.0f); } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_TYPE, 1) && - VerifyField(verifier, VT_INTENSITY, 1) && - VerifyField(verifier, VT_TICKS, 1) && + VerifyField(verifier, VT_AMOUNT, 4) && verifier.EndTable(); } }; @@ -3645,11 +3641,8 @@ struct FilteringSettingsBuilder { void add_type(solarxr_protocol::datatypes::FilteringType type) { fbb_.AddElement(FilteringSettings::VT_TYPE, static_cast(type), 0); } - void add_intensity(uint8_t intensity) { - fbb_.AddElement(FilteringSettings::VT_INTENSITY, intensity, 0); - } - void add_ticks(uint8_t ticks) { - fbb_.AddElement(FilteringSettings::VT_TICKS, ticks, 0); + void add_amount(float amount) { + fbb_.AddElement(FilteringSettings::VT_AMOUNT, amount, 0.0f); } explicit FilteringSettingsBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { @@ -3665,11 +3658,9 @@ struct FilteringSettingsBuilder { inline flatbuffers::Offset CreateFilteringSettings( flatbuffers::FlatBufferBuilder &_fbb, solarxr_protocol::datatypes::FilteringType type = solarxr_protocol::datatypes::FilteringType::NONE, - uint8_t intensity = 0, - uint8_t ticks = 0) { + float amount = 0.0f) { FilteringSettingsBuilder builder_(_fbb); - builder_.add_ticks(ticks); - builder_.add_intensity(intensity); + builder_.add_amount(amount); builder_.add_type(type); return builder_.Finish(); } diff --git a/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java b/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java index a048ea26..e267cf6e 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java @@ -9,10 +9,10 @@ public final class FilteringType { private FilteringType() { } public static final int NONE = 0; - public static final int INTERPOLATION = 1; - public static final int EXTRAPOLATION = 2; + public static final int SMOOTHING = 1; + public static final int PREDICTION = 2; - public static final String[] names = { "NONE", "INTERPOLATION", "EXTRAPOLATION", }; + public static final String[] names = { "NONE", "SMOOTHING", "PREDICTION", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java b/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java index b5834d7a..eddf0155 100644 --- a/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java @@ -16,24 +16,23 @@ public final class FilteringSettings extends Table { public FilteringSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public int type() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public int intensity() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public int ticks() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * 0 to 1. A higher value results in more smoothing or prediction + */ + public float amount() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } public static int createFilteringSettings(FlatBufferBuilder builder, int type, - int intensity, - int ticks) { - builder.startTable(3); - FilteringSettings.addTicks(builder, ticks); - FilteringSettings.addIntensity(builder, intensity); + float amount) { + builder.startTable(2); + FilteringSettings.addAmount(builder, amount); FilteringSettings.addType(builder, type); return FilteringSettings.endFilteringSettings(builder); } - public static void startFilteringSettings(FlatBufferBuilder builder) { builder.startTable(3); } + public static void startFilteringSettings(FlatBufferBuilder builder) { builder.startTable(2); } public static void addType(FlatBufferBuilder builder, int type) { builder.addByte(0, (byte) type, (byte) 0); } - public static void addIntensity(FlatBufferBuilder builder, int intensity) { builder.addByte(1, (byte) intensity, (byte) 0); } - public static void addTicks(FlatBufferBuilder builder, int ticks) { builder.addByte(2, (byte) ticks, (byte) 0); } + public static void addAmount(FlatBufferBuilder builder, float amount) { builder.addFloat(1, amount, 0.0f); } public static int endFilteringSettings(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -53,18 +52,15 @@ public FilteringSettingsT unpack() { public void unpackTo(FilteringSettingsT _o) { int _oType = type(); _o.setType(_oType); - int _oIntensity = intensity(); - _o.setIntensity(_oIntensity); - int _oTicks = ticks(); - _o.setTicks(_oTicks); + float _oAmount = amount(); + _o.setAmount(_oAmount); } public static int pack(FlatBufferBuilder builder, FilteringSettingsT _o) { if (_o == null) return 0; return createFilteringSettings( builder, _o.getType(), - _o.getIntensity(), - _o.getTicks()); + _o.getAmount()); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java index f8da0ef0..106ae155 100644 --- a/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java @@ -9,26 +9,20 @@ public class FilteringSettingsT { private int type; - private int intensity; - private int ticks; + private float amount; public int getType() { return type; } public void setType(int type) { this.type = type; } - public int getIntensity() { return intensity; } + public float getAmount() { return amount; } - public void setIntensity(int intensity) { this.intensity = intensity; } - - public int getTicks() { return ticks; } - - public void setTicks(int ticks) { this.ticks = ticks; } + public void setAmount(float amount) { this.amount = amount; } public FilteringSettingsT() { this.type = 0; - this.intensity = 0; - this.ticks = 0; + this.amount = 0.0f; } } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs index 0ade3cf0..60992db2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs @@ -16,8 +16,8 @@ pub const ENUM_MAX_FILTERING_TYPE: u8 = 2; #[allow(non_camel_case_types)] pub const ENUM_VALUES_FILTERING_TYPE: [FilteringType; 3] = [ FilteringType::NONE, - FilteringType::INTERPOLATION, - FilteringType::EXTRAPOLATION, + FilteringType::SMOOTHING, + FilteringType::PREDICTION, ]; /// Used for filtering tracker rotations in software @@ -27,22 +27,22 @@ pub struct FilteringType(pub u8); #[allow(non_upper_case_globals)] impl FilteringType { pub const NONE: Self = Self(0); - pub const INTERPOLATION: Self = Self(1); - pub const EXTRAPOLATION: Self = Self(2); + pub const SMOOTHING: Self = Self(1); + pub const PREDICTION: Self = Self(2); pub const ENUM_MIN: u8 = 0; pub const ENUM_MAX: u8 = 2; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, - Self::INTERPOLATION, - Self::EXTRAPOLATION, + Self::SMOOTHING, + Self::PREDICTION, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { match self { Self::NONE => Some("NONE"), - Self::INTERPOLATION => Some("INTERPOLATION"), - Self::EXTRAPOLATION => Some("EXTRAPOLATION"), + Self::SMOOTHING => Some("SMOOTHING"), + Self::PREDICTION => Some("PREDICTION"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs index fd833fac..c0440ec6 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs @@ -25,8 +25,7 @@ impl<'a> flatbuffers::Follow<'a> for FilteringSettings<'a> { impl<'a> FilteringSettings<'a> { pub const VT_TYPE_: flatbuffers::VOffsetT = 4; - pub const VT_INTENSITY: flatbuffers::VOffsetT = 6; - pub const VT_TICKS: flatbuffers::VOffsetT = 8; + pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; #[inline] pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -38,8 +37,7 @@ impl<'a> FilteringSettings<'a> { args: &'args FilteringSettingsArgs ) -> flatbuffers::WIPOffset> { let mut builder = FilteringSettingsBuilder::new(_fbb); - builder.add_ticks(args.ticks); - builder.add_intensity(args.intensity); + builder.add_amount(args.amount); builder.add_type_(args.type_); builder.finish() } @@ -49,13 +47,10 @@ impl<'a> FilteringSettings<'a> { pub fn type_(&self) -> super::datatypes::FilteringType { self._tab.get::(FilteringSettings::VT_TYPE_, Some(super::datatypes::FilteringType::NONE)).unwrap() } + /// 0 to 1. A higher value results in more smoothing or prediction #[inline] - pub fn intensity(&self) -> u8 { - self._tab.get::(FilteringSettings::VT_INTENSITY, Some(0)).unwrap() - } - #[inline] - pub fn ticks(&self) -> u8 { - self._tab.get::(FilteringSettings::VT_TICKS, Some(0)).unwrap() + pub fn amount(&self) -> f32 { + self._tab.get::(FilteringSettings::VT_AMOUNT, Some(0.0)).unwrap() } } @@ -67,24 +62,21 @@ impl flatbuffers::Verifiable for FilteringSettings<'_> { use self::flatbuffers::Verifiable; v.visit_table(pos)? .visit_field::("type_", Self::VT_TYPE_, false)? - .visit_field::("intensity", Self::VT_INTENSITY, false)? - .visit_field::("ticks", Self::VT_TICKS, false)? + .visit_field::("amount", Self::VT_AMOUNT, false)? .finish(); Ok(()) } } pub struct FilteringSettingsArgs { pub type_: super::datatypes::FilteringType, - pub intensity: u8, - pub ticks: u8, + pub amount: f32, } impl<'a> Default for FilteringSettingsArgs { #[inline] fn default() -> Self { FilteringSettingsArgs { type_: super::datatypes::FilteringType::NONE, - intensity: 0, - ticks: 0, + amount: 0.0, } } } @@ -99,12 +91,8 @@ impl<'a: 'b, 'b> FilteringSettingsBuilder<'a, 'b> { self.fbb_.push_slot::(FilteringSettings::VT_TYPE_, type_, super::datatypes::FilteringType::NONE); } #[inline] - pub fn add_intensity(&mut self, intensity: u8) { - self.fbb_.push_slot::(FilteringSettings::VT_INTENSITY, intensity, 0); - } - #[inline] - pub fn add_ticks(&mut self, ticks: u8) { - self.fbb_.push_slot::(FilteringSettings::VT_TICKS, ticks, 0); + pub fn add_amount(&mut self, amount: f32) { + self.fbb_.push_slot::(FilteringSettings::VT_AMOUNT, amount, 0.0); } #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FilteringSettingsBuilder<'a, 'b> { @@ -125,8 +113,7 @@ impl core::fmt::Debug for FilteringSettings<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("FilteringSettings"); ds.field("type_", &self.type_()); - ds.field("intensity", &self.intensity()); - ds.field("ticks", &self.ticks()); + ds.field("amount", &self.amount()); ds.finish() } } diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts index bc7c5b0b..41f82f67 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts @@ -5,7 +5,7 @@ */ export enum FilteringType{ NONE = 0, - INTERPOLATION = 1, - EXTRAPOLATION = 2 + SMOOTHING = 1, + PREDICTION = 2 } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts index 17b9b6ba..39547ed8 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts @@ -28,30 +28,24 @@ type():FilteringType { return offset ? this.bb!.readUint8(this.bb_pos + offset) : FilteringType.NONE; } -intensity():number { +/** + * 0 to 1. A higher value results in more smoothing or prediction + */ +amount():number { const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0; -} - -ticks():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0; + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; } static startFilteringSettings(builder:flatbuffers.Builder) { - builder.startObject(3); + builder.startObject(2); } static addType(builder:flatbuffers.Builder, type:FilteringType) { builder.addFieldInt8(0, type, FilteringType.NONE); } -static addIntensity(builder:flatbuffers.Builder, intensity:number) { - builder.addFieldInt8(1, intensity, 0); -} - -static addTicks(builder:flatbuffers.Builder, ticks:number) { - builder.addFieldInt8(2, ticks, 0); +static addAmount(builder:flatbuffers.Builder, amount:number) { + builder.addFieldFloat32(1, amount, 0.0); } static endFilteringSettings(builder:flatbuffers.Builder):flatbuffers.Offset { @@ -59,43 +53,38 @@ static endFilteringSettings(builder:flatbuffers.Builder):flatbuffers.Offset { return offset; } -static createFilteringSettings(builder:flatbuffers.Builder, type:FilteringType, intensity:number, ticks:number):flatbuffers.Offset { +static createFilteringSettings(builder:flatbuffers.Builder, type:FilteringType, amount:number):flatbuffers.Offset { FilteringSettings.startFilteringSettings(builder); FilteringSettings.addType(builder, type); - FilteringSettings.addIntensity(builder, intensity); - FilteringSettings.addTicks(builder, ticks); + FilteringSettings.addAmount(builder, amount); return FilteringSettings.endFilteringSettings(builder); } unpack(): FilteringSettingsT { return new FilteringSettingsT( this.type(), - this.intensity(), - this.ticks() + this.amount() ); } unpackTo(_o: FilteringSettingsT): void { _o.type = this.type(); - _o.intensity = this.intensity(); - _o.ticks = this.ticks(); + _o.amount = this.amount(); } } export class FilteringSettingsT { constructor( public type: FilteringType = FilteringType.NONE, - public intensity: number = 0, - public ticks: number = 0 + public amount: number = 0.0 ){} pack(builder:flatbuffers.Builder): flatbuffers.Offset { return FilteringSettings.createFilteringSettings(builder, this.type, - this.intensity, - this.ticks + this.amount ); } } diff --git a/schema/datatypes/datatypes.fbs b/schema/datatypes/datatypes.fbs index a9afcb6c..f305d908 100644 --- a/schema/datatypes/datatypes.fbs +++ b/schema/datatypes/datatypes.fbs @@ -55,8 +55,8 @@ enum FirmwareErrorCode: uint8 { /// Used for filtering tracker rotations in software enum FilteringType: uint8 { NONE = 0, - INTERPOLATION = 1, - EXTRAPOLATION = 2 + SMOOTHING = 1, + PREDICTION = 2 } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index f7e8204e..5ea72e88 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -99,8 +99,8 @@ table SteamVRTrackersSetting { table FilteringSettings { type: solarxr_protocol.datatypes.FilteringType; - intensity: uint8; - ticks: uint8; + /// 0 to 1. A higher value results in more smoothing or prediction + amount: float32; } From cdd320b50842b75ace18380ff2668edbc9387fc3 Mon Sep 17 00:00:00 2001 From: lucas lelievre Date: Mon, 17 Oct 2022 08:22:26 +0200 Subject: [PATCH 3/9] Change protocol hardware address to a table and handle different address types (#43) * Bring back device ip and add it to the protocol * Add dedicated ip field * Use a struct * Update schema/datatypes/datatypes.fbs Co-authored-by: Ryan Butler * smol fixes * Update schema/datatypes/datatypes.fbs Co-authored-by: Ryan Butler --- .../generated/all_generated.h | 41 ++++++- .../datatypes/Ipv4Address.java | 49 ++++++++ .../datatypes/Ipv4AddressT.java | 22 ++++ .../datatypes/hardware_info/HardwareInfo.java | 8 +- .../hardware_info/HardwareInfoT.java | 6 + protocol/rust/src/generated/mod.rs | 2 + .../hardware_info/hardware_info_generated.rs | 14 +++ .../datatypes/ipv_4address_generated.rs | 112 ++++++++++++++++++ protocol/typescript/src/all.ts | 1 + .../datatypes/hardware-info/hardware-info.ts | 20 +++- .../solarxr-protocol/datatypes/ipv4address.ts | 58 +++++++++ schema/datatypes/datatypes.fbs | 6 + schema/datatypes/hardware_info.fbs | 2 + 13 files changed, 333 insertions(+), 8 deletions(-) create mode 100644 protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.java create mode 100644 protocol/java/src/solarxr_protocol/datatypes/Ipv4AddressT.java create mode 100644 protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs create mode 100644 protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 71af8169..7c2c6240 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -30,6 +30,8 @@ struct LogDataBuilder; struct Temperature; +struct Ipv4Address; + namespace hardware_info { struct HardwareAddress; @@ -1114,6 +1116,25 @@ FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Temperature FLATBUFFERS_FINAL_CLASS { }; FLATBUFFERS_STRUCT_END(Temperature, 4); +/// The 4 bytes of an ip address are stored in 32 bits in big endian order. +/// We will switch over to fixed size arrays when they are supported better. +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ipv4Address FLATBUFFERS_FINAL_CLASS { + private: + uint32_t addr_; + + public: + Ipv4Address() + : addr_(0) { + } + Ipv4Address(uint32_t _addr) + : addr_(flatbuffers::EndianScalar(_addr)) { + } + uint32_t addr() const { + return flatbuffers::EndianScalar(addr_); + } +}; +FLATBUFFERS_STRUCT_END(Ipv4Address, 4); + namespace hardware_info { /// A MAC address or a bluetooth address, or some other uniquely identifying address @@ -1338,7 +1359,8 @@ struct HardwareInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VT_MANUFACTURER = 10, VT_HARDWARE_REVISION = 12, VT_FIRMWARE_VERSION = 14, - VT_HARDWARE_ADDRESS = 16 + VT_HARDWARE_ADDRESS = 16, + VT_IP_ADDRESS = 18 }; solarxr_protocol::datatypes::hardware_info::McuType mcu_id() const { return static_cast(GetField(VT_MCU_ID, 0)); @@ -1366,6 +1388,9 @@ struct HardwareInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address() const { return GetStruct(VT_HARDWARE_ADDRESS); } + const solarxr_protocol::datatypes::Ipv4Address *ip_address() const { + return GetStruct(VT_IP_ADDRESS); + } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && VerifyField(verifier, VT_MCU_ID, 2) && @@ -1380,6 +1405,7 @@ struct HardwareInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { VerifyOffset(verifier, VT_FIRMWARE_VERSION) && verifier.VerifyString(firmware_version()) && VerifyField(verifier, VT_HARDWARE_ADDRESS, 8) && + VerifyField(verifier, VT_IP_ADDRESS, 4) && verifier.EndTable(); } }; @@ -1409,6 +1435,9 @@ struct HardwareInfoBuilder { void add_hardware_address(const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address) { fbb_.AddStruct(HardwareInfo::VT_HARDWARE_ADDRESS, hardware_address); } + void add_ip_address(const solarxr_protocol::datatypes::Ipv4Address *ip_address) { + fbb_.AddStruct(HardwareInfo::VT_IP_ADDRESS, ip_address); + } explicit HardwareInfoBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); @@ -1428,8 +1457,10 @@ inline flatbuffers::Offset CreateHardwareInfo( flatbuffers::Offset manufacturer = 0, flatbuffers::Offset hardware_revision = 0, flatbuffers::Offset firmware_version = 0, - const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr) { + const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr, + const solarxr_protocol::datatypes::Ipv4Address *ip_address = nullptr) { HardwareInfoBuilder builder_(_fbb); + builder_.add_ip_address(ip_address); builder_.add_hardware_address(hardware_address); builder_.add_firmware_version(firmware_version); builder_.add_hardware_revision(hardware_revision); @@ -1448,7 +1479,8 @@ inline flatbuffers::Offset CreateHardwareInfoDirect( const char *manufacturer = nullptr, const char *hardware_revision = nullptr, const char *firmware_version = nullptr, - const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr) { + const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr, + const solarxr_protocol::datatypes::Ipv4Address *ip_address = nullptr) { auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; auto model__ = model ? _fbb.CreateString(model) : 0; auto manufacturer__ = manufacturer ? _fbb.CreateString(manufacturer) : 0; @@ -1462,7 +1494,8 @@ inline flatbuffers::Offset CreateHardwareInfoDirect( manufacturer__, hardware_revision__, firmware_version__, - hardware_address); + hardware_address, + ip_address); } /// Mostly-dynamic status info about a tracked device's firmware diff --git a/protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.java b/protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.java new file mode 100644 index 00000000..863329a9 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/Ipv4Address.java @@ -0,0 +1,49 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * The 4 bytes of an ip address are stored in 32 bits in big endian order. + * We will switch over to fixed size arrays when they are supported better. + */ +@SuppressWarnings("unused") +public final class Ipv4Address extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Ipv4Address __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long addr() { return (long)bb.getInt(bb_pos + 0) & 0xFFFFFFFFL; } + + public static int createIpv4Address(FlatBufferBuilder builder, long addr) { + builder.prep(4, 4); + builder.putInt((int) addr); + return builder.offset(); + } + + 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 Ipv4Address get(int j) { return get(new Ipv4Address(), j); } + public Ipv4Address get(Ipv4Address obj, int j) { return obj.__assign(__element(j), bb); } + } + public Ipv4AddressT unpack() { + Ipv4AddressT _o = new Ipv4AddressT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Ipv4AddressT _o) { + long _oAddr = addr(); + _o.setAddr(_oAddr); + } + public static int pack(FlatBufferBuilder builder, Ipv4AddressT _o) { + if (_o == null) return 0; + return createIpv4Address( + builder, + _o.getAddr()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/Ipv4AddressT.java b/protocol/java/src/solarxr_protocol/datatypes/Ipv4AddressT.java new file mode 100644 index 00000000..86ee8ad7 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/Ipv4AddressT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class Ipv4AddressT { + private long addr; + + public long getAddr() { return addr; } + + public void setAddr(long addr) { this.addr = addr; } + + + public Ipv4AddressT() { + this.addr = 0L; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java index 02b3d9eb..505e8a24 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java @@ -51,8 +51,10 @@ public final class HardwareInfo extends Table { public ByteBuffer firmwareVersionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } public solarxr_protocol.datatypes.hardware_info.HardwareAddress hardwareAddress() { return hardwareAddress(new solarxr_protocol.datatypes.hardware_info.HardwareAddress()); } public solarxr_protocol.datatypes.hardware_info.HardwareAddress hardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddress obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + public solarxr_protocol.datatypes.Ipv4Address ipAddress() { return ipAddress(new solarxr_protocol.datatypes.Ipv4Address()); } + public solarxr_protocol.datatypes.Ipv4Address ipAddress(solarxr_protocol.datatypes.Ipv4Address obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - public static void startHardwareInfo(FlatBufferBuilder builder) { builder.startTable(7); } + public static void startHardwareInfo(FlatBufferBuilder builder) { builder.startTable(8); } public static void addMcuId(FlatBufferBuilder builder, int mcuId) { builder.addShort(0, (short) mcuId, (short) 0); } public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(1, displayNameOffset, 0); } public static void addModel(FlatBufferBuilder builder, int modelOffset) { builder.addOffset(2, modelOffset, 0); } @@ -60,6 +62,7 @@ public final class HardwareInfo extends Table { public static void addHardwareRevision(FlatBufferBuilder builder, int hardwareRevisionOffset) { builder.addOffset(4, hardwareRevisionOffset, 0); } public static void addFirmwareVersion(FlatBufferBuilder builder, int firmwareVersionOffset) { builder.addOffset(5, firmwareVersionOffset, 0); } public static void addHardwareAddress(FlatBufferBuilder builder, int hardwareAddressOffset) { builder.addStruct(6, hardwareAddressOffset, 0); } + public static void addIpAddress(FlatBufferBuilder builder, int ipAddressOffset) { builder.addStruct(7, ipAddressOffset, 0); } public static int endHardwareInfo(FlatBufferBuilder builder) { int o = builder.endTable(); return o; @@ -91,6 +94,8 @@ public void unpackTo(HardwareInfoT _o) { _o.setFirmwareVersion(_oFirmwareVersion); if (hardwareAddress() != null) hardwareAddress().unpackTo(_o.getHardwareAddress()); else _o.setHardwareAddress(null); + if (ipAddress() != null) ipAddress().unpackTo(_o.getIpAddress()); + else _o.setIpAddress(null); } public static int pack(FlatBufferBuilder builder, HardwareInfoT _o) { if (_o == null) return 0; @@ -107,6 +112,7 @@ public static int pack(FlatBufferBuilder builder, HardwareInfoT _o) { addHardwareRevision(builder, _hardwareRevision); addFirmwareVersion(builder, _firmwareVersion); addHardwareAddress(builder, solarxr_protocol.datatypes.hardware_info.HardwareAddress.pack(builder, _o.getHardwareAddress())); + addIpAddress(builder, solarxr_protocol.datatypes.Ipv4Address.pack(builder, _o.getIpAddress())); return endHardwareInfo(builder); } } diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java index 4e8dc48e..a7db6f56 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java @@ -15,6 +15,7 @@ public class HardwareInfoT { private String hardwareRevision; private String firmwareVersion; private solarxr_protocol.datatypes.hardware_info.HardwareAddressT hardwareAddress; + private solarxr_protocol.datatypes.Ipv4AddressT ipAddress; public int getMcuId() { return mcuId; } @@ -44,6 +45,10 @@ public class HardwareInfoT { public void setHardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddressT hardwareAddress) { this.hardwareAddress = hardwareAddress; } + public solarxr_protocol.datatypes.Ipv4AddressT getIpAddress() { return ipAddress; } + + public void setIpAddress(solarxr_protocol.datatypes.Ipv4AddressT ipAddress) { this.ipAddress = ipAddress; } + public HardwareInfoT() { this.mcuId = 0; @@ -53,6 +58,7 @@ public HardwareInfoT() { this.hardwareRevision = null; this.firmwareVersion = null; this.hardwareAddress = new solarxr_protocol.datatypes.hardware_info.HardwareAddressT(); + this.ipAddress = new solarxr_protocol.datatypes.Ipv4AddressT(); } } diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 2a8be35a..794e640b 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -80,6 +80,8 @@ pub mod solarxr_protocol { pub use self::log_data_generated::*; mod temperature_generated; pub use self::temperature_generated::*; + mod ipv_4address_generated; + pub use self::ipv_4address_generated::*; } // datatypes pub mod rpc { use super::*; diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs index 2602236c..01544ca9 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs @@ -32,6 +32,7 @@ impl<'a> HardwareInfo<'a> { pub const VT_HARDWARE_REVISION: flatbuffers::VOffsetT = 12; pub const VT_FIRMWARE_VERSION: flatbuffers::VOffsetT = 14; pub const VT_HARDWARE_ADDRESS: flatbuffers::VOffsetT = 16; + pub const VT_IP_ADDRESS: flatbuffers::VOffsetT = 18; #[inline] pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { @@ -43,6 +44,7 @@ impl<'a> HardwareInfo<'a> { args: &'args HardwareInfoArgs<'args> ) -> flatbuffers::WIPOffset> { let mut builder = HardwareInfoBuilder::new(_fbb); + if let Some(x) = args.ip_address { builder.add_ip_address(x); } if let Some(x) = args.hardware_address { builder.add_hardware_address(x); } if let Some(x) = args.firmware_version { builder.add_firmware_version(x); } if let Some(x) = args.hardware_revision { builder.add_hardware_revision(x); } @@ -87,6 +89,10 @@ impl<'a> HardwareInfo<'a> { pub fn hardware_address(&self) -> Option<&'a HardwareAddress> { self._tab.get::(HardwareInfo::VT_HARDWARE_ADDRESS, None) } + #[inline] + pub fn ip_address(&self) -> Option<&'a super::Ipv4Address> { + self._tab.get::(HardwareInfo::VT_IP_ADDRESS, None) + } } impl flatbuffers::Verifiable for HardwareInfo<'_> { @@ -103,6 +109,7 @@ impl flatbuffers::Verifiable for HardwareInfo<'_> { .visit_field::>("hardware_revision", Self::VT_HARDWARE_REVISION, false)? .visit_field::>("firmware_version", Self::VT_FIRMWARE_VERSION, false)? .visit_field::("hardware_address", Self::VT_HARDWARE_ADDRESS, false)? + .visit_field::("ip_address", Self::VT_IP_ADDRESS, false)? .finish(); Ok(()) } @@ -115,6 +122,7 @@ pub struct HardwareInfoArgs<'a> { pub hardware_revision: Option>, pub firmware_version: Option>, pub hardware_address: Option<&'a HardwareAddress>, + pub ip_address: Option<&'a super::Ipv4Address>, } impl<'a> Default for HardwareInfoArgs<'a> { #[inline] @@ -127,6 +135,7 @@ impl<'a> Default for HardwareInfoArgs<'a> { hardware_revision: None, firmware_version: None, hardware_address: None, + ip_address: None, } } } @@ -165,6 +174,10 @@ impl<'a: 'b, 'b> HardwareInfoBuilder<'a, 'b> { self.fbb_.push_slot_always::<&HardwareAddress>(HardwareInfo::VT_HARDWARE_ADDRESS, hardware_address); } #[inline] + pub fn add_ip_address(&mut self, ip_address: &super::Ipv4Address) { + self.fbb_.push_slot_always::<&super::Ipv4Address>(HardwareInfo::VT_IP_ADDRESS, ip_address); + } + #[inline] pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HardwareInfoBuilder<'a, 'b> { let start = _fbb.start_table(); HardwareInfoBuilder { @@ -189,6 +202,7 @@ impl core::fmt::Debug for HardwareInfo<'_> { ds.field("hardware_revision", &self.hardware_revision()); ds.field("firmware_version", &self.firmware_version()); ds.field("hardware_address", &self.hardware_address()); + ds.field("ip_address", &self.ip_address()); ds.finish() } } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs new file mode 100644 index 00000000..9fca7bc4 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs @@ -0,0 +1,112 @@ +// automatically generated by the FlatBuffers compiler, do not modify +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::*; +/// The 4 bytes of an ip address are stored in 32 bits in big endian order. +/// We will switch over to fixed size arrays when they are supported better. +// struct Ipv4Address, aligned to 4 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct Ipv4Address(pub [u8; 4]); +impl Default for Ipv4Address { + fn default() -> Self { + Self([0; 4]) + } +} +impl core::fmt::Debug for Ipv4Address { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + f.debug_struct("Ipv4Address") + .field("addr", &self.addr()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for Ipv4Address {} +impl flatbuffers::SafeSliceAccess for Ipv4Address {} +impl<'a> flatbuffers::Follow<'a> for Ipv4Address { + type Inner = &'a Ipv4Address; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a Ipv4Address>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a Ipv4Address { + type Inner = &'a Ipv4Address; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for Ipv4Address { + type Output = Ipv4Address; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::core::slice::from_raw_parts(self as *const Ipv4Address as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b Ipv4Address { + type Output = Ipv4Address; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::core::slice::from_raw_parts(*self as *const Ipv4Address as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for Ipv4Address { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> Ipv4Address { + #[allow(clippy::too_many_arguments)] + pub fn new( + addr: u32, + ) -> Self { + let mut s = Self([0; 4]); + s.set_addr(addr); + s + } + + pub fn addr(&self) -> u32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_addr(&mut self, x: u32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const u32 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/typescript/src/all.ts b/protocol/typescript/src/all.ts index 156608cc..c5cda16f 100644 --- a/protocol/typescript/src/all.ts +++ b/protocol/typescript/src/all.ts @@ -16,6 +16,7 @@ export { DeviceId, DeviceIdT } from './solarxr-protocol/datatypes/device-id'; export { FilteringType } from './solarxr-protocol/datatypes/filtering-type'; export { FirmwareErrorCode } from './solarxr-protocol/datatypes/firmware-error-code'; export { HzF32, HzF32T } from './solarxr-protocol/datatypes/hz-f32'; +export { Ipv4Address, Ipv4AddressT } from './solarxr-protocol/datatypes/ipv4address'; export { LogData, LogDataT } from './solarxr-protocol/datatypes/log-data'; export { Temperature, TemperatureT } from './solarxr-protocol/datatypes/temperature'; export { TrackerId, TrackerIdT } from './solarxr-protocol/datatypes/tracker-id'; diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts index 46376cd7..435986dd 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts @@ -2,6 +2,7 @@ import * as flatbuffers from 'flatbuffers'; +import { Ipv4Address, Ipv4AddressT } from '../../../solarxr-protocol/datatypes/ipv4address'; import { HardwareAddress, HardwareAddressT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-address'; import { McuType } from '../../../solarxr-protocol/datatypes/hardware-info/mcu-type'; @@ -87,8 +88,13 @@ hardwareAddress(obj?:HardwareAddress):HardwareAddress|null { return offset ? (obj || new HardwareAddress()).__init(this.bb_pos + offset, this.bb!) : null; } +ipAddress(obj?:Ipv4Address):Ipv4Address|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? (obj || new Ipv4Address()).__init(this.bb_pos + offset, this.bb!) : null; +} + static startHardwareInfo(builder:flatbuffers.Builder) { - builder.startObject(7); + builder.startObject(8); } static addMcuId(builder:flatbuffers.Builder, mcuId:McuType) { @@ -119,6 +125,10 @@ static addHardwareAddress(builder:flatbuffers.Builder, hardwareAddressOffset:fla builder.addFieldStruct(6, hardwareAddressOffset, 0); } +static addIpAddress(builder:flatbuffers.Builder, ipAddressOffset:flatbuffers.Offset) { + builder.addFieldStruct(7, ipAddressOffset, 0); +} + static endHardwareInfo(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; @@ -133,7 +143,8 @@ unpack(): HardwareInfoT { this.manufacturer(), this.hardwareRevision(), this.firmwareVersion(), - (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null) + (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null), + (this.ipAddress() !== null ? this.ipAddress()!.unpack() : null) ); } @@ -146,6 +157,7 @@ unpackTo(_o: HardwareInfoT): void { _o.hardwareRevision = this.hardwareRevision(); _o.firmwareVersion = this.firmwareVersion(); _o.hardwareAddress = (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null); + _o.ipAddress = (this.ipAddress() !== null ? this.ipAddress()!.unpack() : null); } } @@ -157,7 +169,8 @@ constructor( public manufacturer: string|Uint8Array|null = null, public hardwareRevision: string|Uint8Array|null = null, public firmwareVersion: string|Uint8Array|null = null, - public hardwareAddress: HardwareAddressT|null = null + public hardwareAddress: HardwareAddressT|null = null, + public ipAddress: Ipv4AddressT|null = null ){} @@ -176,6 +189,7 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { HardwareInfo.addHardwareRevision(builder, hardwareRevision); HardwareInfo.addFirmwareVersion(builder, firmwareVersion); HardwareInfo.addHardwareAddress(builder, (this.hardwareAddress !== null ? this.hardwareAddress!.pack(builder) : 0)); + HardwareInfo.addIpAddress(builder, (this.ipAddress !== null ? this.ipAddress!.pack(builder) : 0)); return HardwareInfo.endHardwareInfo(builder); } diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts b/protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts new file mode 100644 index 00000000..e9bb0e48 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts @@ -0,0 +1,58 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * The 4 bytes of an ip address are stored in 32 bits in big endian order. + * We will switch over to fixed size arrays when they are supported better. + */ +export class Ipv4Address { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Ipv4Address { + this.bb_pos = i; + this.bb = bb; + return this; +} + +addr():number { + return this.bb!.readUint32(this.bb_pos); +} + +static sizeOf():number { + return 4; +} + +static createIpv4Address(builder:flatbuffers.Builder, addr: number):flatbuffers.Offset { + builder.prep(4, 4); + builder.writeInt32(addr); + return builder.offset(); +} + + +unpack(): Ipv4AddressT { + return new Ipv4AddressT( + this.addr() + ); +} + + +unpackTo(_o: Ipv4AddressT): void { + _o.addr = this.addr(); +} +} + +export class Ipv4AddressT { +constructor( + public addr: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return Ipv4Address.createIpv4Address(builder, + this.addr + ); +} +} diff --git a/schema/datatypes/datatypes.fbs b/schema/datatypes/datatypes.fbs index f305d908..16370636 100644 --- a/schema/datatypes/datatypes.fbs +++ b/schema/datatypes/datatypes.fbs @@ -130,3 +130,9 @@ enum TrackerStatus: uint8 { struct Temperature { temp: float32; } + +/// The 4 bytes of an ip address are stored in 32 bits in big endian order. +/// We will switch over to fixed size arrays when they are supported better. +struct Ipv4Address { + addr: uint32; +} diff --git a/schema/datatypes/hardware_info.fbs b/schema/datatypes/hardware_info.fbs index 2b9868a2..a2a71361 100644 --- a/schema/datatypes/hardware_info.fbs +++ b/schema/datatypes/hardware_info.fbs @@ -47,6 +47,8 @@ table HardwareInfo { /// The version of the slimevr firmware that the device is running. firmware_version: string; hardware_address: HardwareAddress; + + ip_address: solarxr_protocol.datatypes.Ipv4Address; } From f588c2e4adc70480d7dfe23f77621d1f2183ed47 Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Mon, 17 Oct 2022 02:24:02 -0400 Subject: [PATCH 4/9] Update issue templates (#42) --- .github/ISSUE_TEMPLATE/bug.md | 10 ++++++++++ .github/ISSUE_TEMPLATE/feature-request.md | 10 ++++++++++ .github/ISSUE_TEMPLATE/question-discussion.md | 10 ++++++++++ 3 files changed, 30 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/bug.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/question-discussion.md diff --git a/.github/ISSUE_TEMPLATE/bug.md b/.github/ISSUE_TEMPLATE/bug.md new file mode 100644 index 00000000..fdb8cc4d --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug.md @@ -0,0 +1,10 @@ +--- +name: Bug +about: 'Something isn''t working ' +title: '' +labels: 'Status: Unlabeled, Type: Bug' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md new file mode 100644 index 00000000..0f04b9e9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.md @@ -0,0 +1,10 @@ +--- +name: Feature Request +about: 'New feature or request ' +title: '' +labels: 'Status: Unlabeled, Type: Feature Request' +assignees: '' + +--- + + diff --git a/.github/ISSUE_TEMPLATE/question-discussion.md b/.github/ISSUE_TEMPLATE/question-discussion.md new file mode 100644 index 00000000..421ee902 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/question-discussion.md @@ -0,0 +1,10 @@ +--- +name: Question/Discussion +about: 'Further information is requested ' +title: '' +labels: 'Status: Unlabeled, Type: Discussion' +assignees: '' + +--- + + From c6db24ca7f99dea8c093106cd30e36a3451d9f7c Mon Sep 17 00:00:00 2001 From: Butterscotch! Date: Tue, 1 Nov 2022 06:20:20 -0400 Subject: [PATCH 5/9] Add mounting reset (#45) * Add mounting reset * Update generated types * Explain mounting rotation Co-authored-by: Ryan Butler * Update generated types Co-authored-by: Ryan Butler --- .../solarxr_protocol/generated/all_generated.h | 14 +++++++++----- .../java/src/solarxr_protocol/rpc/ResetType.java | 6 +++++- .../solarxr_protocol/rpc/reset_type_generated.rs | 11 ++++++++--- .../src/solarxr-protocol/rpc/reset-type.ts | 7 ++++++- schema/rpc.fbs | 2 ++ 5 files changed, 30 insertions(+), 10 deletions(-) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 7c2c6240..28430d9a 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -887,31 +887,35 @@ enum class ResetType : uint8_t { Quick = 0, Full = 1, Recalibrate = 2, + /// Second pose for calibrating mounting rotation + Mounting = 3, MIN = Quick, - MAX = Recalibrate + MAX = Mounting }; -inline const ResetType (&EnumValuesResetType())[3] { +inline const ResetType (&EnumValuesResetType())[4] { static const ResetType values[] = { ResetType::Quick, ResetType::Full, - ResetType::Recalibrate + ResetType::Recalibrate, + ResetType::Mounting }; return values; } inline const char * const *EnumNamesResetType() { - static const char * const names[4] = { + static const char * const names[5] = { "Quick", "Full", "Recalibrate", + "Mounting", nullptr }; return names; } inline const char *EnumNameResetType(ResetType e) { - if (flatbuffers::IsOutRange(e, ResetType::Quick, ResetType::Recalibrate)) return ""; + if (flatbuffers::IsOutRange(e, ResetType::Quick, ResetType::Mounting)) return ""; const size_t index = static_cast(e); return EnumNamesResetType()[index]; } diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetType.java b/protocol/java/src/solarxr_protocol/rpc/ResetType.java index 90bcb00d..870d48dc 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetType.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetType.java @@ -8,8 +8,12 @@ private ResetType() { } public static final int Quick = 0; public static final int Full = 1; public static final int Recalibrate = 2; + /** + * Second pose for calibrating mounting rotation + */ + public static final int Mounting = 3; - public static final String[] names = { "Quick", "Full", "Recalibrate", }; + public static final String[] names = { "Quick", "Full", "Recalibrate", "Mounting", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs index 2829881d..132cf99f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs @@ -11,13 +11,14 @@ use super::*; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] pub const ENUM_MIN_RESET_TYPE: u8 = 0; #[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_RESET_TYPE: u8 = 2; +pub const ENUM_MAX_RESET_TYPE: 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_RESET_TYPE: [ResetType; 3] = [ +pub const ENUM_VALUES_RESET_TYPE: [ResetType; 4] = [ ResetType::Quick, ResetType::Full, ResetType::Recalibrate, + ResetType::Mounting, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -28,13 +29,16 @@ impl ResetType { pub const Quick: Self = Self(0); pub const Full: Self = Self(1); pub const Recalibrate: Self = Self(2); + /// Second pose for calibrating mounting rotation + pub const Mounting: Self = Self(3); pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 2; + pub const ENUM_MAX: u8 = 3; pub const ENUM_VALUES: &'static [Self] = &[ Self::Quick, Self::Full, Self::Recalibrate, + Self::Mounting, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -42,6 +46,7 @@ impl ResetType { Self::Quick => Some("Quick"), Self::Full => Some("Full"), Self::Recalibrate => Some("Recalibrate"), + Self::Mounting => Some("Mounting"), _ => None, } } diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts index 0ce72d25..df8e5424 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts @@ -3,6 +3,11 @@ export enum ResetType{ Quick = 0, Full = 1, - Recalibrate = 2 + Recalibrate = 2, + + /** + * Second pose for calibrating mounting rotation + */ + Mounting = 3 } diff --git a/schema/rpc.fbs b/schema/rpc.fbs index 5ea72e88..8c96fad5 100644 --- a/schema/rpc.fbs +++ b/schema/rpc.fbs @@ -57,6 +57,8 @@ enum ResetType: uint8 { Quick, Full, Recalibrate, + /// Second pose for calibrating mounting rotation + Mounting, } From 38bebff0efcf6a1e420c64128a38a3258766eabd Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Tue, 1 Nov 2022 13:05:07 +0100 Subject: [PATCH 6/9] Update README.md (#46) --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 8d73edb4..c2e68ea0 100644 --- a/README.md +++ b/README.md @@ -26,7 +26,7 @@ dual licensed as above, without any additional terms or conditions. # Flatc -All the binaries bundled with this repository are using flatc [v2.0.6](https://github.com/google/flatbuffers/tree/v2.0.6) - -only windows is bundled right now, we need to add other platforms support: linux, macos (x64/ arm) +All the code generated in this repository is using flatc [v2.0.6](https://github.com/google/flatbuffers/tree/v2.0.6). +If you wish to generate code on windows, you may use the included flatc binary. Other platforms +should build v2.0.6 of flatc from source. From 0d90ea4161bae29ed4dd34bf2ce5af866ab029d3 Mon Sep 17 00:00:00 2001 From: Ryan Butler Date: Fri, 4 Nov 2022 11:01:31 +0100 Subject: [PATCH 7/9] Pub-sub protocol for applications (#44) * TMP * Changed everything to a pub-sub system * Generated code --- .../generated/all_generated.h | 10803 +++++++++------- .../src/solarxr_protocol/MessageBundle.java | 211 +- .../src/solarxr_protocol/MessageBundleT.java | 62 +- .../src/solarxr_protocol/data_feed/Bone.java | 156 +- .../src/solarxr_protocol/data_feed/BoneT.java | 80 +- .../data_feed/DataFeedConfig.java | 178 +- .../data_feed/DataFeedConfigT.java | 80 +- .../data_feed/DataFeedMessage.java | 36 +- .../data_feed/DataFeedMessageHeader.java | 170 +- .../data_feed/DataFeedMessageHeaderT.java | 44 +- .../data_feed/DataFeedMessageUnion.java | 78 +- .../data_feed/DataFeedUpdate.java | 248 +- .../data_feed/DataFeedUpdateT.java | 68 +- .../data_feed/PollDataFeed.java | 124 +- .../data_feed/PollDataFeedT.java | 44 +- .../data_feed/StartDataFeed.java | 160 +- .../data_feed/StartDataFeedT.java | 44 +- .../data_feed/device_data/DeviceData.java | 218 +- .../data_feed/device_data/DeviceDataMask.java | 158 +- .../device_data/DeviceDataMaskT.java | 56 +- .../data_feed/device_data/DeviceDataT.java | 92 +- .../data_feed/tracker/TrackerData.java | 224 +- .../data_feed/tracker/TrackerDataMask.java | 202 +- .../data_feed/tracker/TrackerDataMaskT.java | 116 +- .../data_feed/tracker/TrackerDataT.java | 128 +- .../data_feed/tracker/TrackerInfo.java | 220 +- .../data_feed/tracker/TrackerInfoT.java | 128 +- .../solarxr_protocol/datatypes/BodyPart.java | 78 +- .../src/solarxr_protocol/datatypes/Bytes.java | 72 + .../solarxr_protocol/datatypes/BytesT.java | 22 + .../solarxr_protocol/datatypes/DeviceId.java | 98 +- .../solarxr_protocol/datatypes/DeviceIdT.java | 44 +- .../datatypes/FilteringType.java | 38 +- .../datatypes/FirmwareErrorCode.java | 40 +- .../src/solarxr_protocol/datatypes/HzF32.java | 96 +- .../solarxr_protocol/datatypes/HzF32T.java | 44 +- .../solarxr_protocol/datatypes/LogData.java | 170 +- .../solarxr_protocol/datatypes/LogDataT.java | 56 +- .../solarxr_protocol/datatypes/String.java | 59 + .../solarxr_protocol/datatypes/StringT.java | 22 + .../datatypes/Temperature.java | 96 +- .../datatypes/TemperatureT.java | 44 +- .../solarxr_protocol/datatypes/TrackerId.java | 124 +- .../datatypes/TrackerIdT.java | 56 +- .../datatypes/TrackerRole.java | 82 +- .../datatypes/TrackerStatus.java | 38 +- .../datatypes/TransactionId.java | 96 +- .../datatypes/TransactionIdT.java | 44 +- .../hardware_info/FirmwareStatusMask.java | 202 +- .../hardware_info/FirmwareStatusMaskT.java | 116 +- .../hardware_info/HardwareAddress.java | 100 +- .../hardware_info/HardwareAddressT.java | 44 +- .../datatypes/hardware_info/HardwareInfo.java | 238 +- .../hardware_info/HardwareInfoT.java | 128 +- .../hardware_info/HardwareStatus.java | 246 +- .../hardware_info/HardwareStatusT.java | 128 +- .../datatypes/hardware_info/ImuType.java | 38 +- .../datatypes/hardware_info/McuType.java | 36 +- .../solarxr_protocol/datatypes/math/Quat.java | 120 +- .../datatypes/math/QuatT.java | 80 +- .../datatypes/math/Vec3f.java | 110 +- .../datatypes/math/Vec3fT.java | 68 +- .../solarxr_protocol/pub_sub/KeyValues.java | 89 + .../solarxr_protocol/pub_sub/KeyValuesT.java | 28 + .../src/solarxr_protocol/pub_sub/Message.java | 112 + .../solarxr_protocol/pub_sub/MessageT.java | 28 + .../src/solarxr_protocol/pub_sub/Payload.java | 17 + .../pub_sub/PayloadUnion.java | 37 + .../pub_sub/PubSubHeader.java | 85 + .../pub_sub/PubSubHeaderT.java | 22 + .../solarxr_protocol/pub_sub/PubSubUnion.java | 18 + .../pub_sub/PubSubUnionUnion.java | 39 + .../pub_sub/SubscriptionRequest.java | 80 + .../pub_sub/SubscriptionRequestT.java | 22 + .../src/solarxr_protocol/pub_sub/Topic.java | 16 + .../solarxr_protocol/pub_sub/TopicHandle.java | 60 + .../pub_sub/TopicHandleRequest.java | 62 + .../pub_sub/TopicHandleRequestT.java | 22 + .../pub_sub/TopicHandleResponse.java | 61 + .../pub_sub/TopicHandleResponseT.java | 22 + .../pub_sub/TopicHandleT.java | 22 + .../src/solarxr_protocol/pub_sub/TopicId.java | 98 + .../solarxr_protocol/pub_sub/TopicIdT.java | 34 + .../solarxr_protocol/pub_sub/TopicUnion.java | 35 + .../rpc/AssignTrackerRequest.java | 140 +- .../rpc/AssignTrackerRequestT.java | 80 +- .../rpc/AutoBoneEpochResponse.java | 182 +- .../rpc/AutoBoneEpochResponseT.java | 80 +- .../rpc/AutoBoneProcessRequest.java | 112 +- .../rpc/AutoBoneProcessRequestT.java | 44 +- .../rpc/AutoBoneProcessStatusResponse.java | 188 +- .../rpc/AutoBoneProcessStatusResponseT.java | 104 +- .../rpc/AutoBoneProcessType.java | 36 +- .../rpc/ChangeSettingsRequest.java | 152 +- .../rpc/ChangeSettingsRequestT.java | 68 +- .../rpc/ChangeSkeletonConfigRequest.java | 126 +- .../rpc/ChangeSkeletonConfigRequestT.java | 56 +- .../rpc/CloseSerialRequest.java | 88 +- .../rpc/CloseSerialRequestT.java | 32 +- .../rpc/FilteringSettings.java | 132 +- .../rpc/FilteringSettingsT.java | 56 +- .../rpc/HeartbeatRequest.java | 88 +- .../rpc/HeartbeatRequestT.java | 32 +- .../rpc/HeartbeatResponse.java | 88 +- .../rpc/HeartbeatResponseT.java | 32 +- .../rpc/OverlayDisplayModeChangeRequest.java | 136 +- .../rpc/OverlayDisplayModeChangeRequestT.java | 56 +- .../rpc/OverlayDisplayModeRequest.java | 94 +- .../rpc/OverlayDisplayModeRequestT.java | 32 +- .../rpc/OverlayDisplayModeResponse.java | 132 +- .../rpc/OverlayDisplayModeResponseT.java | 56 +- .../rpc/RecordBVHRequest.java | 112 +- .../rpc/RecordBVHRequestT.java | 44 +- .../solarxr_protocol/rpc/RecordBVHStatus.java | 112 +- .../rpc/RecordBVHStatusT.java | 44 +- .../solarxr_protocol/rpc/ResetRequest.java | 112 +- .../solarxr_protocol/rpc/ResetRequestT.java | 44 +- .../solarxr_protocol/rpc/ResetResponse.java | 88 +- .../solarxr_protocol/rpc/ResetResponseT.java | 32 +- .../src/solarxr_protocol/rpc/ResetType.java | 40 +- .../src/solarxr_protocol/rpc/RpcMessage.java | 80 +- .../rpc/RpcMessageHeader.java | 348 +- .../rpc/RpcMessageHeaderT.java | 56 +- .../solarxr_protocol/rpc/RpcMessageUnion.java | 166 +- .../rpc/SerialUpdateResponse.java | 132 +- .../rpc/SerialUpdateResponseT.java | 56 +- .../solarxr_protocol/rpc/SetWifiRequest.java | 138 +- .../solarxr_protocol/rpc/SetWifiRequestT.java | 56 +- .../solarxr_protocol/rpc/SettingsRequest.java | 88 +- .../rpc/SettingsRequestT.java | 32 +- .../rpc/SettingsResponse.java | 152 +- .../rpc/SettingsResponseT.java | 68 +- .../solarxr_protocol/rpc/SkeletonBone.java | 66 +- .../rpc/SkeletonConfigRequest.java | 88 +- .../rpc/SkeletonConfigRequestT.java | 32 +- .../rpc/SkeletonConfigResponse.java | 140 +- .../rpc/SkeletonConfigResponseT.java | 44 +- .../solarxr_protocol/rpc/SkeletonPart.java | 126 +- .../solarxr_protocol/rpc/SkeletonPartT.java | 56 +- .../rpc/SkeletonResetAllRequest.java | 88 +- .../rpc/SkeletonResetAllRequestT.java | 32 +- .../rpc/SteamVRTrackersSetting.java | 168 +- .../rpc/SteamVRTrackersSettingT.java | 92 +- .../rpc/settings/ModelRatios.java | 214 +- .../rpc/settings/ModelRatiosT.java | 104 +- .../rpc/settings/ModelSettings.java | 140 +- .../rpc/settings/ModelSettingsT.java | 56 +- .../rpc/settings/ModelToggles.java | 200 +- .../rpc/settings/ModelTogglesT.java | 104 +- protocol/rust/src/generated/mod.rs | 369 +- .../data_feed/bone_generated.rs | 304 +- .../data_feed/data_feed_config_generated.rs | 296 +- .../data_feed/data_feed_message_generated.rs | 218 +- .../data_feed_message_header_generated.rs | 392 +- .../data_feed/data_feed_update_generated.rs | 276 +- .../device_data/device_data_generated.rs | 332 +- .../device_data/device_data_mask_generated.rs | 248 +- .../data_feed/poll_data_feed_generated.rs | 208 +- .../data_feed/start_data_feed_generated.rs | 220 +- .../tracker/tracker_data_generated.rs | 418 +- .../tracker/tracker_data_mask_generated.rs | 374 +- .../tracker/tracker_info_generated.rs | 412 +- .../datatypes/body_part_generated.rs | 354 +- .../datatypes/bytes_generated.rs | 100 + .../datatypes/device_id_generated.rs | 220 +- .../datatypes/filtering_type_generated.rs | 200 +- .../firmware_error_code_generated.rs | 208 +- .../firmware_status_mask_generated.rs | 374 +- .../hardware_address_generated.rs | 222 +- .../hardware_info/hardware_info_generated.rs | 412 +- .../hardware_status_generated.rs | 406 +- .../hardware_info/imu_type_generated.rs | 222 +- .../hardware_info/mcu_type_generated.rs | 214 +- .../datatypes/hz_f32_generated.rs | 218 +- .../datatypes/ipv_4address_generated.rs | 16 +- .../datatypes/log_data_generated.rs | 234 +- .../datatypes/math/quat_generated.rs | 372 +- .../datatypes/math/vec_3f_generated.rs | 320 +- .../datatypes/string_generated.rs | 100 + .../datatypes/temperature_generated.rs | 218 +- .../datatypes/tracker_id_generated.rs | 238 +- .../datatypes/tracker_role_generated.rs | 358 +- .../datatypes/tracker_status_generated.rs | 222 +- .../datatypes/transaction_id_generated.rs | 218 +- .../message_bundle_generated.rs | 250 +- .../pub_sub/key_values_generated.rs | 114 + .../pub_sub/message_generated.rs | 249 + .../pub_sub/payload_generated.rs | 103 + .../pub_sub/pub_sub_header_generated.rs | 194 + .../pub_sub/pub_sub_union_generated.rs | 107 + .../pub_sub/subscription_request_generated.rs | 159 + .../pub_sub/topic_generated.rs | 99 + .../pub_sub/topic_handle_generated.rs | 102 + .../pub_sub/topic_handle_request_generated.rs | 102 + .../topic_handle_response_generated.rs | 101 + .../pub_sub/topic_id_generated.rs | 139 + .../rpc/assign_tracker_request_generated.rs | 288 +- .../rpc/auto_bone_epoch_response_generated.rs | 288 +- .../auto_bone_process_request_generated.rs | 204 +- ..._bone_process_status_response_generated.rs | 344 +- .../rpc/auto_bone_process_type_generated.rs | 214 +- .../rpc/change_settings_request_generated.rs | 260 +- ...hange_skeleton_config_request_generated.rs | 232 +- .../rpc/close_serial_request_generated.rs | 174 +- .../rpc/filtering_settings_generated.rs | 234 +- .../rpc/heartbeat_request_generated.rs | 174 +- .../rpc/heartbeat_response_generated.rs | 174 +- .../rpc/open_serial_request_generated.rs | 174 +- ...y_display_mode_change_request_generated.rs | 234 +- .../overlay_display_mode_request_generated.rs | 176 +- ...overlay_display_mode_response_generated.rs | 234 +- .../rpc/record_bvhrequest_generated.rs | 204 +- .../rpc/record_bvhstatus_generated.rs | 204 +- .../rpc/reset_request_generated.rs | 204 +- .../rpc/reset_response_generated.rs | 174 +- .../rpc/reset_type_generated.rs | 208 +- .../rpc/rpc_message_generated.rs | 394 +- .../rpc/rpc_message_header_generated.rs | 1216 +- ...tracker_factory_reset_request_generated.rs | 12 +- ...rial_tracker_get_info_request_generated.rs | 12 +- ...serial_tracker_reboot_request_generated.rs | 12 +- .../rpc/serial_update_response_generated.rs | 232 +- .../rpc/set_wifi_request_generated.rs | 232 +- .../rpc/settings/model_ratios_generated.rs | 352 +- .../rpc/settings/model_settings_generated.rs | 234 +- .../rpc/settings/model_toggles_generated.rs | 346 +- .../rpc/settings_request_generated.rs | 174 +- .../rpc/settings_response_generated.rs | 260 +- .../rpc/skeleton_bone_generated.rs | 334 +- .../rpc/skeleton_config_request_generated.rs | 174 +- .../rpc/skeleton_config_response_generated.rs | 204 +- .../rpc/skeleton_part_generated.rs | 232 +- .../skeleton_reset_all_request_generated.rs | 174 +- .../rpc/steam_vrtrackers_setting_generated.rs | 316 +- protocol/typescript/src/all.ts | 153 +- .../data_feed}/bone.ts | 244 +- .../data_feed}/data-feed-config.ts | 240 +- .../data_feed}/data-feed-message-header.ts | 202 +- .../data_feed}/data-feed-message.ts | 90 +- .../data_feed}/data-feed-update.ts | 340 +- .../device_data}/device-data-mask.ts | 206 +- .../data_feed/device_data}/device-data.ts | 332 +- .../data_feed}/poll-data-feed.ts | 158 +- .../data_feed}/start-data-feed.ts | 204 +- .../data_feed}/tracker/tracker-data-mask.ts | 318 +- .../data_feed}/tracker/tracker-data.ts | 374 +- .../data_feed}/tracker/tracker-info.ts | 376 +- .../datatypes/body-part.ts | 62 +- .../src/solarxr_protocol/datatypes/bytes.ts | 96 + .../datatypes/device-id.ts | 116 +- .../datatypes/filtering-type.ts | 22 +- .../datatypes/firmware-error-code.ts | 24 +- .../hardware_info}/firmware-status-mask.ts | 318 +- .../hardware_info}/hardware-address.ts | 118 +- .../datatypes/hardware_info}/hardware-info.ts | 392 +- .../hardware_info}/hardware-status.ts | 351 +- .../datatypes/hardware_info}/imu-type.ts | 22 +- .../datatypes/hardware_info}/mcu-type.ts | 20 +- .../datatypes/hz-f32.ts | 114 +- .../datatypes/ipv4-address.ts} | 0 .../datatypes/log-data.ts | 232 +- .../datatypes/math/quat.ts | 162 +- .../datatypes/math/vec3f.ts | 144 +- .../src/solarxr_protocol/datatypes/string.ts | 76 + .../datatypes/temperature.ts | 114 +- .../datatypes/tracker-id.ts | 188 +- .../datatypes/tracker-role.ts | 66 +- .../datatypes/tracker-status.ts | 22 +- .../datatypes/transaction-id.ts | 114 +- .../message-bundle.ts | 291 +- .../solarxr_protocol/pub_sub/key-values.ts | 127 + .../src/solarxr_protocol/pub_sub/message.ts | 143 + .../src/solarxr_protocol/pub_sub/payload.ts | 41 + .../pub_sub/pub-sub-header.ts | 101 + .../solarxr_protocol/pub_sub/pub-sub-union.ts | 45 + .../pub_sub/subscription-request.ts | 102 + .../pub_sub/topic-handle-request.ts | 79 + .../pub_sub/topic-handle-response.ts | 78 + .../solarxr_protocol/pub_sub/topic-handle.ts | 76 + .../src/solarxr_protocol/pub_sub/topic-id.ts | 129 + .../src/solarxr_protocol/pub_sub/topic.ts | 37 + .../rpc/assign-tracker-request.ts | 230 +- .../rpc/auto-bone-epoch-response.ts | 268 +- .../rpc/auto-bone-process-request.ts | 146 +- .../rpc/auto-bone-process-status-response.ts | 294 +- .../rpc/auto-bone-process-type.ts | 20 +- .../rpc/change-settings-request.ts | 202 +- .../rpc/change-skeleton-config-request.ts | 174 +- .../rpc/close-serial-request.ts | 108 +- .../rpc/filtering-settings.ts | 180 +- .../rpc/heartbeat-request.ts | 108 +- .../rpc/heartbeat-response.ts | 108 +- .../rpc/open-serial-request.ts | 108 +- .../overlay-display-mode-change-request.ts | 182 +- .../rpc/overlay-display-mode-request.ts | 114 +- .../rpc/overlay-display-mode-response.ts | 178 +- .../rpc/record-b-v-h-request.ts} | 144 +- .../rpc/record-b-v-h-status.ts} | 144 +- .../rpc/reset-request.ts | 146 +- .../rpc/reset-response.ts | 108 +- .../rpc/reset-type.ts | 26 +- .../rpc/rpc-message-header.ts | 284 +- .../rpc/rpc-message.ts | 266 +- .../serial-tracker-factory-reset-request.ts | 0 .../rpc/serial-tracker-get-info-request.ts | 0 .../rpc/serial-tracker-reboot-request.ts | 0 .../rpc/serial-update-response.ts | 180 +- .../rpc/set-wifi-request.ts | 186 +- .../rpc/settings-request.ts | 108 +- .../rpc/settings-response.ts | 202 +- .../rpc/settings/model-ratios.ts | 316 +- .../rpc/settings/model-settings.ts | 178 +- .../rpc/settings/model-toggles.ts | 302 +- .../rpc/skeleton-bone.ts | 50 +- .../rpc/skeleton-config-request.ts | 108 +- .../rpc/skeleton-config-response.ts | 184 +- .../rpc/skeleton-part.ts | 174 +- .../rpc/skeleton-reset-all-request.ts | 108 +- .../rpc/steam-v-r-trackers-setting.ts} | 256 +- schema/all.fbs | 2 + schema/datatypes/datatypes.fbs | 8 + schema/pub_sub/pub_sub.fbs | 59 + schema/pub_sub/topic.fbs | 40 + 323 files changed, 31534 insertions(+), 26646 deletions(-) create mode 100644 protocol/java/src/solarxr_protocol/datatypes/Bytes.java create mode 100644 protocol/java/src/solarxr_protocol/datatypes/BytesT.java create mode 100644 protocol/java/src/solarxr_protocol/datatypes/String.java create mode 100644 protocol/java/src/solarxr_protocol/datatypes/StringT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/KeyValues.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/KeyValuesT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/Message.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/MessageT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/Payload.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/PubSubHeaderT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/Topic.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandle.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequest.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequestT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicId.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicIdT.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java create mode 100644 protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs create mode 100644 protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/bone.ts (91%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/data-feed-config.ts (93%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/data-feed-message-header.ts (85%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/data-feed-message.ts (79%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/data-feed-update.ts (93%) rename protocol/typescript/src/{solarxr-protocol/data-feed/device-data => solarxr_protocol/data_feed/device_data}/device-data-mask.ts (95%) rename protocol/typescript/src/{solarxr-protocol/data-feed/device-data => solarxr_protocol/data_feed/device_data}/device-data.ts (92%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/poll-data-feed.ts (92%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/start-data-feed.ts (94%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/tracker/tracker-data-mask.ts (96%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/tracker/tracker-data.ts (91%) rename protocol/typescript/src/{solarxr-protocol/data-feed => solarxr_protocol/data_feed}/tracker/tracker-info.ts (92%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/body-part.ts (95%) create mode 100644 protocol/typescript/src/solarxr_protocol/datatypes/bytes.ts rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/device-id.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/filtering-type.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/firmware-error-code.ts (95%) rename protocol/typescript/src/{solarxr-protocol/datatypes/hardware-info => solarxr_protocol/datatypes/hardware_info}/firmware-status-mask.ts (96%) rename protocol/typescript/src/{solarxr-protocol/datatypes/hardware-info => solarxr_protocol/datatypes/hardware_info}/hardware-address.ts (95%) rename protocol/typescript/src/{solarxr-protocol/datatypes/hardware-info => solarxr_protocol/datatypes/hardware_info}/hardware-info.ts (94%) rename protocol/typescript/src/{solarxr-protocol/datatypes/hardware-info => solarxr_protocol/datatypes/hardware_info}/hardware-status.ts (83%) rename protocol/typescript/src/{solarxr-protocol/datatypes/hardware-info => solarxr_protocol/datatypes/hardware_info}/imu-type.ts (94%) rename protocol/typescript/src/{solarxr-protocol/datatypes/hardware-info => solarxr_protocol/datatypes/hardware_info}/mcu-type.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/hz-f32.ts (93%) rename protocol/typescript/src/{solarxr-protocol/datatypes/ipv4address.ts => solarxr_protocol/datatypes/ipv4-address.ts} (100%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/log-data.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/math/quat.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/math/vec3f.ts (94%) create mode 100644 protocol/typescript/src/solarxr_protocol/datatypes/string.ts rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/temperature.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/tracker-id.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/tracker-role.ts (95%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/tracker-status.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/datatypes/transaction-id.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/message-bundle.ts (70%) create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/key-values.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/message.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/topic-id.ts create mode 100644 protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/assign-tracker-request.ts (92%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/auto-bone-epoch-response.ts (95%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/auto-bone-process-request.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/auto-bone-process-status-response.ts (95%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/auto-bone-process-type.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/change-settings-request.ts (93%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/change-skeleton-config-request.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/close-serial-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/filtering-settings.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/heartbeat-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/heartbeat-response.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/open-serial-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/overlay-display-mode-change-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/overlay-display-mode-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/overlay-display-mode-response.ts (96%) rename protocol/typescript/src/{solarxr-protocol/rpc/record-bvhrequest.ts => solarxr_protocol/rpc/record-b-v-h-request.ts} (96%) rename protocol/typescript/src/{solarxr-protocol/rpc/record-bvhstatus.ts => solarxr_protocol/rpc/record-b-v-h-status.ts} (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/reset-request.ts (93%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/reset-response.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/reset-type.ts (94%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/rpc-message-header.ts (78%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/rpc-message.ts (89%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/serial-tracker-factory-reset-request.ts (100%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/serial-tracker-get-info-request.ts (100%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/serial-tracker-reboot-request.ts (100%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/serial-update-response.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/set-wifi-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/settings-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/settings-response.ts (93%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/settings/model-ratios.ts (97%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/settings/model-settings.ts (92%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/settings/model-toggles.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/skeleton-bone.ts (95%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/skeleton-config-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/skeleton-config-response.ts (95%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/skeleton-part.ts (93%) rename protocol/typescript/src/{solarxr-protocol => solarxr_protocol}/rpc/skeleton-reset-all-request.ts (96%) rename protocol/typescript/src/{solarxr-protocol/rpc/steam-vrtrackers-setting.ts => solarxr_protocol/rpc/steam-v-r-trackers-setting.ts} (96%) create mode 100644 schema/pub_sub/pub_sub.fbs create mode 100644 schema/pub_sub/topic.fbs diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 28430d9a..754f5d9a 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -1,4916 +1,5887 @@ -// automatically generated by the FlatBuffers compiler, do not modify - - -#ifndef FLATBUFFERS_GENERATED_ALL_SOLARXR_PROTOCOL_H_ -#define FLATBUFFERS_GENERATED_ALL_SOLARXR_PROTOCOL_H_ - -#include "flatbuffers/flatbuffers.h" - -// Ensure the included flatbuffers.h is the same version as when this file was -// generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && - FLATBUFFERS_VERSION_MINOR == 0 && - FLATBUFFERS_VERSION_REVISION == 6, - "Non-compatible flatbuffers version included"); - -namespace solarxr_protocol { -namespace datatypes { - -struct HzF32; - -struct TransactionId; - -struct DeviceId; - -struct TrackerId; -struct TrackerIdBuilder; - -struct LogData; -struct LogDataBuilder; - -struct Temperature; - -struct Ipv4Address; - -namespace hardware_info { - -struct HardwareAddress; - -struct HardwareInfo; -struct HardwareInfoBuilder; - -struct HardwareStatus; -struct HardwareStatusBuilder; - -struct FirmwareStatusMask; -struct FirmwareStatusMaskBuilder; - -} // namespace hardware_info - -namespace math { - -struct Quat; - -struct Vec3f; - -} // namespace math -} // namespace datatypes - -namespace data_feed { -namespace tracker { - -struct TrackerData; -struct TrackerDataBuilder; - -struct TrackerDataMask; -struct TrackerDataMaskBuilder; - -struct TrackerInfo; -struct TrackerInfoBuilder; - -} // namespace tracker - -namespace device_data { - -struct DeviceDataMask; -struct DeviceDataMaskBuilder; - -struct DeviceData; -struct DeviceDataBuilder; - -} // namespace device_data - -struct Bone; -struct BoneBuilder; - -struct DataFeedMessageHeader; -struct DataFeedMessageHeaderBuilder; - -struct PollDataFeed; -struct PollDataFeedBuilder; - -struct StartDataFeed; -struct StartDataFeedBuilder; - -struct DataFeedUpdate; -struct DataFeedUpdateBuilder; - -struct DataFeedConfig; -struct DataFeedConfigBuilder; - -} // namespace data_feed - -namespace rpc { -namespace settings { - -struct ModelToggles; -struct ModelTogglesBuilder; - -struct ModelRatios; -struct ModelRatiosBuilder; - -struct ModelSettings; -struct ModelSettingsBuilder; - -} // namespace settings - -struct RpcMessageHeader; -struct RpcMessageHeaderBuilder; - -struct HeartbeatRequest; -struct HeartbeatRequestBuilder; - -struct HeartbeatResponse; -struct HeartbeatResponseBuilder; - -struct ResetRequest; -struct ResetRequestBuilder; - -struct ResetResponse; -struct ResetResponseBuilder; - -struct AssignTrackerRequest; -struct AssignTrackerRequestBuilder; - -struct SettingsRequest; -struct SettingsRequestBuilder; - -struct SettingsResponse; -struct SettingsResponseBuilder; - -struct ChangeSettingsRequest; -struct ChangeSettingsRequestBuilder; - -struct SteamVRTrackersSetting; -struct SteamVRTrackersSettingBuilder; - -struct FilteringSettings; -struct FilteringSettingsBuilder; - -struct RecordBVHRequest; -struct RecordBVHRequestBuilder; - -struct RecordBVHStatus; -struct RecordBVHStatusBuilder; - -struct SkeletonPart; -struct SkeletonPartBuilder; - -struct SkeletonConfigRequest; -struct SkeletonConfigRequestBuilder; - -struct SkeletonConfigResponse; -struct SkeletonConfigResponseBuilder; - -struct SkeletonResetAllRequest; -struct SkeletonResetAllRequestBuilder; - -struct ChangeSkeletonConfigRequest; -struct ChangeSkeletonConfigRequestBuilder; - -struct OpenSerialRequest; -struct OpenSerialRequestBuilder; - -struct CloseSerialRequest; -struct CloseSerialRequestBuilder; - -struct SetWifiRequest; -struct SetWifiRequestBuilder; - -struct SerialUpdateResponse; -struct SerialUpdateResponseBuilder; - -struct SerialTrackerRebootRequest; -struct SerialTrackerRebootRequestBuilder; - -struct SerialTrackerGetInfoRequest; -struct SerialTrackerGetInfoRequestBuilder; - -struct SerialTrackerFactoryResetRequest; -struct SerialTrackerFactoryResetRequestBuilder; - -struct AutoBoneProcessRequest; -struct AutoBoneProcessRequestBuilder; - -struct AutoBoneProcessStatusResponse; -struct AutoBoneProcessStatusResponseBuilder; - -struct AutoBoneEpochResponse; -struct AutoBoneEpochResponseBuilder; - -struct OverlayDisplayModeRequest; -struct OverlayDisplayModeRequestBuilder; - -struct OverlayDisplayModeChangeRequest; -struct OverlayDisplayModeChangeRequestBuilder; - -struct OverlayDisplayModeResponse; -struct OverlayDisplayModeResponseBuilder; - -} // namespace rpc - -struct MessageBundle; -struct MessageBundleBuilder; - -namespace datatypes { - -/// A list of error codes for error conditions on the device -enum class FirmwareErrorCode : uint8_t { - Other = 0, - Disconnected = 1, - Occluded = 2, - ImuError = 3, - MIN = Other, - MAX = ImuError -}; - -inline const FirmwareErrorCode (&EnumValuesFirmwareErrorCode())[4] { - static const FirmwareErrorCode values[] = { - FirmwareErrorCode::Other, - FirmwareErrorCode::Disconnected, - FirmwareErrorCode::Occluded, - FirmwareErrorCode::ImuError - }; - return values; -} - -inline const char * const *EnumNamesFirmwareErrorCode() { - static const char * const names[5] = { - "Other", - "Disconnected", - "Occluded", - "ImuError", - nullptr - }; - return names; -} - -inline const char *EnumNameFirmwareErrorCode(FirmwareErrorCode e) { - if (flatbuffers::IsOutRange(e, FirmwareErrorCode::Other, FirmwareErrorCode::ImuError)) return ""; - const size_t index = static_cast(e); - return EnumNamesFirmwareErrorCode()[index]; -} - -/// Used for filtering tracker rotations in software -enum class FilteringType : uint8_t { - NONE = 0, - SMOOTHING = 1, - PREDICTION = 2, - MIN = NONE, - MAX = PREDICTION -}; - -inline const FilteringType (&EnumValuesFilteringType())[3] { - static const FilteringType values[] = { - FilteringType::NONE, - FilteringType::SMOOTHING, - FilteringType::PREDICTION - }; - return values; -} - -inline const char * const *EnumNamesFilteringType() { - static const char * const names[4] = { - "NONE", - "SMOOTHING", - "PREDICTION", - nullptr - }; - return names; -} - -inline const char *EnumNameFilteringType(FilteringType e) { - if (flatbuffers::IsOutRange(e, FilteringType::NONE, FilteringType::PREDICTION)) return ""; - const size_t index = static_cast(e); - return EnumNamesFilteringType()[index]; -} - -/// Possible tracker roles -/// They're not perfect match for SteamVR tracker roles, -/// because we support more possible roles. Host can -/// chose how to map it to their supported role. -enum class TrackerRole : uint8_t { - NONE = 0, - WAIST = 1, - LEFT_FOOT = 2, - RIGHT_FOOT = 3, - CHEST = 4, - LEFT_KNEE = 5, - RIGHT_KNEE = 6, - LEFT_ELBOW = 7, - RIGHT_ELBOW = 8, - LEFT_SHOULDER = 9, - RIGHT_SHOULDER = 10, - LEFT_HAND = 11, - RIGHT_HAND = 12, - LEFT_CONTROLLER = 13, - RIGHT_CONTROLLER = 14, - HEAD = 15, - NECK = 16, - CAMERA = 17, - KEYBOARD = 18, - HMD = 19, - BEACON = 20, - GENERIC_CONTROLLER = 21, - MIN = NONE, - MAX = GENERIC_CONTROLLER -}; - -inline const TrackerRole (&EnumValuesTrackerRole())[22] { - static const TrackerRole values[] = { - TrackerRole::NONE, - TrackerRole::WAIST, - TrackerRole::LEFT_FOOT, - TrackerRole::RIGHT_FOOT, - TrackerRole::CHEST, - TrackerRole::LEFT_KNEE, - TrackerRole::RIGHT_KNEE, - TrackerRole::LEFT_ELBOW, - TrackerRole::RIGHT_ELBOW, - TrackerRole::LEFT_SHOULDER, - TrackerRole::RIGHT_SHOULDER, - TrackerRole::LEFT_HAND, - TrackerRole::RIGHT_HAND, - TrackerRole::LEFT_CONTROLLER, - TrackerRole::RIGHT_CONTROLLER, - TrackerRole::HEAD, - TrackerRole::NECK, - TrackerRole::CAMERA, - TrackerRole::KEYBOARD, - TrackerRole::HMD, - TrackerRole::BEACON, - TrackerRole::GENERIC_CONTROLLER - }; - return values; -} - -inline const char * const *EnumNamesTrackerRole() { - static const char * const names[23] = { - "NONE", - "WAIST", - "LEFT_FOOT", - "RIGHT_FOOT", - "CHEST", - "LEFT_KNEE", - "RIGHT_KNEE", - "LEFT_ELBOW", - "RIGHT_ELBOW", - "LEFT_SHOULDER", - "RIGHT_SHOULDER", - "LEFT_HAND", - "RIGHT_HAND", - "LEFT_CONTROLLER", - "RIGHT_CONTROLLER", - "HEAD", - "NECK", - "CAMERA", - "KEYBOARD", - "HMD", - "BEACON", - "GENERIC_CONTROLLER", - nullptr - }; - return names; -} - -inline const char *EnumNameTrackerRole(TrackerRole e) { - if (flatbuffers::IsOutRange(e, TrackerRole::NONE, TrackerRole::GENERIC_CONTROLLER)) return ""; - const size_t index = static_cast(e); - return EnumNamesTrackerRole()[index]; -} - -/// Different parts of the body. Roughly maps to each possible bone in the skeleton. -/// These are *NOT* the trackers. -enum class BodyPart : uint8_t { - NONE = 0, - HEAD = 1, - NECK = 2, - CHEST = 3, - WAIST = 4, - HIP = 5, - LEFT_UPPER_LEG = 6, - RIGHT_UPPER_LEG = 7, - LEFT_LOWER_LEG = 8, - RIGHT_LOWER_LEG = 9, - LEFT_FOOT = 10, - RIGHT_FOOT = 11, - LEFT_CONTROLLER = 12, - RIGHT_CONTROLLER = 13, - LEFT_LOWER_ARM = 14, - RIGHT_LOWER_ARM = 15, - LEFT_UPPER_ARM = 16, - RIGHT_UPPER_ARM = 17, - LEFT_HAND = 18, - RIGHT_HAND = 19, - LEFT_SHOULDER = 20, - RIGHT_SHOULDER = 21, - MIN = NONE, - MAX = RIGHT_SHOULDER -}; - -inline const BodyPart (&EnumValuesBodyPart())[22] { - static const BodyPart values[] = { - BodyPart::NONE, - BodyPart::HEAD, - BodyPart::NECK, - BodyPart::CHEST, - BodyPart::WAIST, - BodyPart::HIP, - BodyPart::LEFT_UPPER_LEG, - BodyPart::RIGHT_UPPER_LEG, - BodyPart::LEFT_LOWER_LEG, - BodyPart::RIGHT_LOWER_LEG, - BodyPart::LEFT_FOOT, - BodyPart::RIGHT_FOOT, - BodyPart::LEFT_CONTROLLER, - BodyPart::RIGHT_CONTROLLER, - BodyPart::LEFT_LOWER_ARM, - BodyPart::RIGHT_LOWER_ARM, - BodyPart::LEFT_UPPER_ARM, - BodyPart::RIGHT_UPPER_ARM, - BodyPart::LEFT_HAND, - BodyPart::RIGHT_HAND, - BodyPart::LEFT_SHOULDER, - BodyPart::RIGHT_SHOULDER - }; - return values; -} - -inline const char * const *EnumNamesBodyPart() { - static const char * const names[23] = { - "NONE", - "HEAD", - "NECK", - "CHEST", - "WAIST", - "HIP", - "LEFT_UPPER_LEG", - "RIGHT_UPPER_LEG", - "LEFT_LOWER_LEG", - "RIGHT_LOWER_LEG", - "LEFT_FOOT", - "RIGHT_FOOT", - "LEFT_CONTROLLER", - "RIGHT_CONTROLLER", - "LEFT_LOWER_ARM", - "RIGHT_LOWER_ARM", - "LEFT_UPPER_ARM", - "RIGHT_UPPER_ARM", - "LEFT_HAND", - "RIGHT_HAND", - "LEFT_SHOULDER", - "RIGHT_SHOULDER", - nullptr - }; - return names; -} - -inline const char *EnumNameBodyPart(BodyPart e) { - if (flatbuffers::IsOutRange(e, BodyPart::NONE, BodyPart::RIGHT_SHOULDER)) return ""; - const size_t index = static_cast(e); - return EnumNamesBodyPart()[index]; -} - -enum class TrackerStatus : uint8_t { - NONE = 0, - DISCONNECTED = 1, - OK = 2, - BUSY = 3, - ERROR = 4, - OCCLUDED = 5, - MIN = NONE, - MAX = OCCLUDED -}; - -inline const TrackerStatus (&EnumValuesTrackerStatus())[6] { - static const TrackerStatus values[] = { - TrackerStatus::NONE, - TrackerStatus::DISCONNECTED, - TrackerStatus::OK, - TrackerStatus::BUSY, - TrackerStatus::ERROR, - TrackerStatus::OCCLUDED - }; - return values; -} - -inline const char * const *EnumNamesTrackerStatus() { - static const char * const names[7] = { - "NONE", - "DISCONNECTED", - "OK", - "BUSY", - "ERROR", - "OCCLUDED", - nullptr - }; - return names; -} - -inline const char *EnumNameTrackerStatus(TrackerStatus e) { - if (flatbuffers::IsOutRange(e, TrackerStatus::NONE, TrackerStatus::OCCLUDED)) return ""; - const size_t index = static_cast(e); - return EnumNamesTrackerStatus()[index]; -} - -namespace hardware_info { - -enum class McuType : uint16_t { - Other = 0, - ESP8266 = 1, - ESP32_S2 = 2, - ESP32_S3 = 3, - ESP32_C3 = 4, - MIN = Other, - MAX = ESP32_C3 -}; - -inline const McuType (&EnumValuesMcuType())[5] { - static const McuType values[] = { - McuType::Other, - McuType::ESP8266, - McuType::ESP32_S2, - McuType::ESP32_S3, - McuType::ESP32_C3 - }; - return values; -} - -inline const char * const *EnumNamesMcuType() { - static const char * const names[6] = { - "Other", - "ESP8266", - "ESP32_S2", - "ESP32_S3", - "ESP32_C3", - nullptr - }; - return names; -} - -inline const char *EnumNameMcuType(McuType e) { - if (flatbuffers::IsOutRange(e, McuType::Other, McuType::ESP32_C3)) return ""; - const size_t index = static_cast(e); - return EnumNamesMcuType()[index]; -} - -enum class ImuType : uint16_t { - Other = 0, - BNO085 = 1, - BNO080 = 2, - MPU6050 = 3, - MPU9250 = 4, - MPU6500 = 5, - MIN = Other, - MAX = MPU6500 -}; - -inline const ImuType (&EnumValuesImuType())[6] { - static const ImuType values[] = { - ImuType::Other, - ImuType::BNO085, - ImuType::BNO080, - ImuType::MPU6050, - ImuType::MPU9250, - ImuType::MPU6500 - }; - return values; -} - -inline const char * const *EnumNamesImuType() { - static const char * const names[7] = { - "Other", - "BNO085", - "BNO080", - "MPU6050", - "MPU9250", - "MPU6500", - nullptr - }; - return names; -} - -inline const char *EnumNameImuType(ImuType e) { - if (flatbuffers::IsOutRange(e, ImuType::Other, ImuType::MPU6500)) return ""; - const size_t index = static_cast(e); - return EnumNamesImuType()[index]; -} - -} // namespace hardware_info -} // namespace datatypes - -namespace data_feed { - -enum class DataFeedMessage : uint8_t { - NONE = 0, - PollDataFeed = 1, - StartDataFeed = 2, - DataFeedUpdate = 3, - DataFeedConfig = 4, - MIN = NONE, - MAX = DataFeedConfig -}; - -inline const DataFeedMessage (&EnumValuesDataFeedMessage())[5] { - static const DataFeedMessage values[] = { - DataFeedMessage::NONE, - DataFeedMessage::PollDataFeed, - DataFeedMessage::StartDataFeed, - DataFeedMessage::DataFeedUpdate, - DataFeedMessage::DataFeedConfig - }; - return values; -} - -inline const char * const *EnumNamesDataFeedMessage() { - static const char * const names[6] = { - "NONE", - "PollDataFeed", - "StartDataFeed", - "DataFeedUpdate", - "DataFeedConfig", - nullptr - }; - return names; -} - -inline const char *EnumNameDataFeedMessage(DataFeedMessage e) { - if (flatbuffers::IsOutRange(e, DataFeedMessage::NONE, DataFeedMessage::DataFeedConfig)) return ""; - const size_t index = static_cast(e); - return EnumNamesDataFeedMessage()[index]; -} - -template struct DataFeedMessageTraits { - static const DataFeedMessage enum_value = DataFeedMessage::NONE; -}; - -template<> struct DataFeedMessageTraits { - static const DataFeedMessage enum_value = DataFeedMessage::PollDataFeed; -}; - -template<> struct DataFeedMessageTraits { - static const DataFeedMessage enum_value = DataFeedMessage::StartDataFeed; -}; - -template<> struct DataFeedMessageTraits { - static const DataFeedMessage enum_value = DataFeedMessage::DataFeedUpdate; -}; - -template<> struct DataFeedMessageTraits { - static const DataFeedMessage enum_value = DataFeedMessage::DataFeedConfig; -}; - -bool VerifyDataFeedMessage(flatbuffers::Verifier &verifier, const void *obj, DataFeedMessage type); -bool VerifyDataFeedMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); - -} // namespace data_feed - -namespace rpc { - -enum class RpcMessage : uint8_t { - NONE = 0, - HeartbeatRequest = 1, - HeartbeatResponse = 2, - ResetRequest = 3, - AssignTrackerRequest = 4, - SettingsRequest = 5, - SettingsResponse = 6, - ChangeSettingsRequest = 7, - RecordBVHRequest = 8, - RecordBVHStatus = 9, - SkeletonConfigRequest = 10, - ChangeSkeletonConfigRequest = 11, - SkeletonResetAllRequest = 12, - SkeletonConfigResponse = 13, - OpenSerialRequest = 14, - CloseSerialRequest = 15, - SetWifiRequest = 16, - SerialUpdateResponse = 17, - AutoBoneProcessRequest = 18, - AutoBoneProcessStatusResponse = 19, - AutoBoneEpochResponse = 20, - OverlayDisplayModeRequest = 21, - OverlayDisplayModeChangeRequest = 22, - OverlayDisplayModeResponse = 23, - SerialTrackerRebootRequest = 24, - SerialTrackerGetInfoRequest = 25, - SerialTrackerFactoryResetRequest = 26, - MIN = NONE, - MAX = SerialTrackerFactoryResetRequest -}; - -inline const RpcMessage (&EnumValuesRpcMessage())[27] { - static const RpcMessage values[] = { - RpcMessage::NONE, - RpcMessage::HeartbeatRequest, - RpcMessage::HeartbeatResponse, - RpcMessage::ResetRequest, - RpcMessage::AssignTrackerRequest, - RpcMessage::SettingsRequest, - RpcMessage::SettingsResponse, - RpcMessage::ChangeSettingsRequest, - RpcMessage::RecordBVHRequest, - RpcMessage::RecordBVHStatus, - RpcMessage::SkeletonConfigRequest, - RpcMessage::ChangeSkeletonConfigRequest, - RpcMessage::SkeletonResetAllRequest, - RpcMessage::SkeletonConfigResponse, - RpcMessage::OpenSerialRequest, - RpcMessage::CloseSerialRequest, - RpcMessage::SetWifiRequest, - RpcMessage::SerialUpdateResponse, - RpcMessage::AutoBoneProcessRequest, - RpcMessage::AutoBoneProcessStatusResponse, - RpcMessage::AutoBoneEpochResponse, - RpcMessage::OverlayDisplayModeRequest, - RpcMessage::OverlayDisplayModeChangeRequest, - RpcMessage::OverlayDisplayModeResponse, - RpcMessage::SerialTrackerRebootRequest, - RpcMessage::SerialTrackerGetInfoRequest, - RpcMessage::SerialTrackerFactoryResetRequest - }; - return values; -} - -inline const char * const *EnumNamesRpcMessage() { - static const char * const names[28] = { - "NONE", - "HeartbeatRequest", - "HeartbeatResponse", - "ResetRequest", - "AssignTrackerRequest", - "SettingsRequest", - "SettingsResponse", - "ChangeSettingsRequest", - "RecordBVHRequest", - "RecordBVHStatus", - "SkeletonConfigRequest", - "ChangeSkeletonConfigRequest", - "SkeletonResetAllRequest", - "SkeletonConfigResponse", - "OpenSerialRequest", - "CloseSerialRequest", - "SetWifiRequest", - "SerialUpdateResponse", - "AutoBoneProcessRequest", - "AutoBoneProcessStatusResponse", - "AutoBoneEpochResponse", - "OverlayDisplayModeRequest", - "OverlayDisplayModeChangeRequest", - "OverlayDisplayModeResponse", - "SerialTrackerRebootRequest", - "SerialTrackerGetInfoRequest", - "SerialTrackerFactoryResetRequest", - nullptr - }; - return names; -} - -inline const char *EnumNameRpcMessage(RpcMessage e) { - if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::SerialTrackerFactoryResetRequest)) return ""; - const size_t index = static_cast(e); - return EnumNamesRpcMessage()[index]; -} - -template struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::NONE; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::HeartbeatRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::HeartbeatResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ResetRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AssignTrackerRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SettingsRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SettingsResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ChangeSettingsRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::RecordBVHRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::RecordBVHStatus; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SkeletonConfigRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::ChangeSkeletonConfigRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SkeletonResetAllRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SkeletonConfigResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::OpenSerialRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::CloseSerialRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SetWifiRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialUpdateResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AutoBoneProcessRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AutoBoneProcessStatusResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::AutoBoneEpochResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::OverlayDisplayModeRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::OverlayDisplayModeChangeRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::OverlayDisplayModeResponse; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialTrackerRebootRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialTrackerGetInfoRequest; -}; - -template<> struct RpcMessageTraits { - static const RpcMessage enum_value = RpcMessage::SerialTrackerFactoryResetRequest; -}; - -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 ResetType : uint8_t { - Quick = 0, - Full = 1, - Recalibrate = 2, - /// Second pose for calibrating mounting rotation - Mounting = 3, - MIN = Quick, - MAX = Mounting -}; - -inline const ResetType (&EnumValuesResetType())[4] { - static const ResetType values[] = { - ResetType::Quick, - ResetType::Full, - ResetType::Recalibrate, - ResetType::Mounting - }; - return values; -} - -inline const char * const *EnumNamesResetType() { - static const char * const names[5] = { - "Quick", - "Full", - "Recalibrate", - "Mounting", - nullptr - }; - return names; -} - -inline const char *EnumNameResetType(ResetType e) { - if (flatbuffers::IsOutRange(e, ResetType::Quick, ResetType::Mounting)) return ""; - const size_t index = static_cast(e); - return EnumNamesResetType()[index]; -} - -enum class SkeletonBone : uint8_t { - NONE = 0, - HEAD = 1, - NECK = 2, - TORSO = 3, - CHEST = 4, - WAIST = 5, - HIP_OFFSET = 6, - HIPS_WIDTH = 7, - LEGS_LENGTH = 8, - KNEE_HEIGHT = 9, - FOOT_LENGTH = 10, - FOOT_SHIFT = 11, - SKELETON_OFFSET = 12, - CONTROLLER_DISTANCE_Z = 13, - CONTROLLER_DISTANCE_Y = 14, - FOREARM_LENGTH = 15, - SHOULDERS_DISTANCE = 16, - SHOULDERS_WIDTH = 17, - UPPER_ARM_LENGTH = 18, - ELBOW_OFFSET = 19, - MIN = NONE, - MAX = ELBOW_OFFSET -}; - -inline const SkeletonBone (&EnumValuesSkeletonBone())[20] { - static const SkeletonBone values[] = { - SkeletonBone::NONE, - SkeletonBone::HEAD, - SkeletonBone::NECK, - SkeletonBone::TORSO, - SkeletonBone::CHEST, - SkeletonBone::WAIST, - SkeletonBone::HIP_OFFSET, - SkeletonBone::HIPS_WIDTH, - SkeletonBone::LEGS_LENGTH, - SkeletonBone::KNEE_HEIGHT, - SkeletonBone::FOOT_LENGTH, - SkeletonBone::FOOT_SHIFT, - SkeletonBone::SKELETON_OFFSET, - SkeletonBone::CONTROLLER_DISTANCE_Z, - SkeletonBone::CONTROLLER_DISTANCE_Y, - SkeletonBone::FOREARM_LENGTH, - SkeletonBone::SHOULDERS_DISTANCE, - SkeletonBone::SHOULDERS_WIDTH, - SkeletonBone::UPPER_ARM_LENGTH, - SkeletonBone::ELBOW_OFFSET - }; - return values; -} - -inline const char * const *EnumNamesSkeletonBone() { - static const char * const names[21] = { - "NONE", - "HEAD", - "NECK", - "TORSO", - "CHEST", - "WAIST", - "HIP_OFFSET", - "HIPS_WIDTH", - "LEGS_LENGTH", - "KNEE_HEIGHT", - "FOOT_LENGTH", - "FOOT_SHIFT", - "SKELETON_OFFSET", - "CONTROLLER_DISTANCE_Z", - "CONTROLLER_DISTANCE_Y", - "FOREARM_LENGTH", - "SHOULDERS_DISTANCE", - "SHOULDERS_WIDTH", - "UPPER_ARM_LENGTH", - "ELBOW_OFFSET", - nullptr - }; - return names; -} - -inline const char *EnumNameSkeletonBone(SkeletonBone e) { - if (flatbuffers::IsOutRange(e, SkeletonBone::NONE, SkeletonBone::ELBOW_OFFSET)) return ""; - const size_t index = static_cast(e); - return EnumNamesSkeletonBone()[index]; -} - -enum class AutoBoneProcessType : uint8_t { - NONE = 0, - RECORD = 1, - SAVE = 2, - PROCESS = 3, - APPLY = 4, - MIN = NONE, - MAX = APPLY -}; - -inline const AutoBoneProcessType (&EnumValuesAutoBoneProcessType())[5] { - static const AutoBoneProcessType values[] = { - AutoBoneProcessType::NONE, - AutoBoneProcessType::RECORD, - AutoBoneProcessType::SAVE, - AutoBoneProcessType::PROCESS, - AutoBoneProcessType::APPLY - }; - return values; -} - -inline const char * const *EnumNamesAutoBoneProcessType() { - static const char * const names[6] = { - "NONE", - "RECORD", - "SAVE", - "PROCESS", - "APPLY", - nullptr - }; - return names; -} - -inline const char *EnumNameAutoBoneProcessType(AutoBoneProcessType e) { - if (flatbuffers::IsOutRange(e, AutoBoneProcessType::NONE, AutoBoneProcessType::APPLY)) return ""; - const size_t index = static_cast(e); - return EnumNamesAutoBoneProcessType()[index]; -} - -} // namespace rpc - -namespace datatypes { - -/// Frequency as 32 bit float -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) HzF32 FLATBUFFERS_FINAL_CLASS { - private: - float f_; - - public: - HzF32() - : f_(0) { - } - HzF32(float _f) - : f_(flatbuffers::EndianScalar(_f)) { - } - float f() const { - return flatbuffers::EndianScalar(f_); - } -}; -FLATBUFFERS_STRUCT_END(HzF32, 4); - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) TransactionId FLATBUFFERS_FINAL_CLASS { - private: - uint32_t id_; - - public: - TransactionId() - : id_(0) { - } - TransactionId(uint32_t _id) - : id_(flatbuffers::EndianScalar(_id)) { - } - /// This is expected to overflow, networking logic should handle this case. - uint32_t id() const { - return flatbuffers::EndianScalar(id_); - } -}; -FLATBUFFERS_STRUCT_END(TransactionId, 4); - -/// A unique ID for the device. IDs are not guaranteed to be the same after -/// the connection is terminated. -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) DeviceId FLATBUFFERS_FINAL_CLASS { - private: - uint8_t id_; - - public: - DeviceId() - : id_(0) { - } - DeviceId(uint8_t _id) - : id_(flatbuffers::EndianScalar(_id)) { - } - uint8_t id() const { - return flatbuffers::EndianScalar(id_); - } -}; -FLATBUFFERS_STRUCT_END(DeviceId, 1); - -/// Temperature in degrees celsius -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Temperature FLATBUFFERS_FINAL_CLASS { - private: - float temp_; - - public: - Temperature() - : temp_(0) { - } - Temperature(float _temp) - : temp_(flatbuffers::EndianScalar(_temp)) { - } - float temp() const { - return flatbuffers::EndianScalar(temp_); - } -}; -FLATBUFFERS_STRUCT_END(Temperature, 4); - -/// The 4 bytes of an ip address are stored in 32 bits in big endian order. -/// We will switch over to fixed size arrays when they are supported better. -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ipv4Address FLATBUFFERS_FINAL_CLASS { - private: - uint32_t addr_; - - public: - Ipv4Address() - : addr_(0) { - } - Ipv4Address(uint32_t _addr) - : addr_(flatbuffers::EndianScalar(_addr)) { - } - uint32_t addr() const { - return flatbuffers::EndianScalar(addr_); - } -}; -FLATBUFFERS_STRUCT_END(Ipv4Address, 4); - -namespace hardware_info { - -/// A MAC address or a bluetooth address, or some other uniquely identifying address -/// associated with the endpoint that we are communicating with. If it doesn't take -/// up the full set of bytes, it is aligned towards the least significant bits. -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) HardwareAddress FLATBUFFERS_FINAL_CLASS { - private: - uint64_t addr_; - - public: - HardwareAddress() - : addr_(0) { - } - HardwareAddress(uint64_t _addr) - : addr_(flatbuffers::EndianScalar(_addr)) { - } - uint64_t addr() const { - return flatbuffers::EndianScalar(addr_); - } -}; -FLATBUFFERS_STRUCT_END(HardwareAddress, 8); - -} // namespace hardware_info - -namespace math { - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Quat FLATBUFFERS_FINAL_CLASS { - private: - float x_; - float y_; - float z_; - float w_; - - public: - Quat() - : x_(0), - y_(0), - z_(0), - w_(0) { - } - Quat(float _x, float _y, float _z, float _w) - : x_(flatbuffers::EndianScalar(_x)), - y_(flatbuffers::EndianScalar(_y)), - z_(flatbuffers::EndianScalar(_z)), - w_(flatbuffers::EndianScalar(_w)) { - } - float x() const { - return flatbuffers::EndianScalar(x_); - } - float y() const { - return flatbuffers::EndianScalar(y_); - } - float z() const { - return flatbuffers::EndianScalar(z_); - } - float w() const { - return flatbuffers::EndianScalar(w_); - } -}; -FLATBUFFERS_STRUCT_END(Quat, 16); - -FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vec3f FLATBUFFERS_FINAL_CLASS { - private: - float x_; - float y_; - float z_; - - public: - Vec3f() - : x_(0), - y_(0), - z_(0) { - } - Vec3f(float _x, float _y, float _z) - : x_(flatbuffers::EndianScalar(_x)), - y_(flatbuffers::EndianScalar(_y)), - z_(flatbuffers::EndianScalar(_z)) { - } - float x() const { - return flatbuffers::EndianScalar(x_); - } - float y() const { - return flatbuffers::EndianScalar(y_); - } - float z() const { - return flatbuffers::EndianScalar(z_); - } -}; -FLATBUFFERS_STRUCT_END(Vec3f, 12); - -} // namespace math - -struct TrackerId FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TrackerIdBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DEVICE_ID = 4, - VT_TRACKER_NUM = 6 - }; - /// The device the tracker is associated with. If there is no hardware device it is - /// associated with, this should be `null`. - const solarxr_protocol::datatypes::DeviceId *device_id() const { - return GetStruct(VT_DEVICE_ID); - } - /// There are possibly multiple trackers per device. This identifies which one. - uint8_t tracker_num() const { - return GetField(VT_TRACKER_NUM, 0); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_DEVICE_ID, 1) && - VerifyField(verifier, VT_TRACKER_NUM, 1) && - verifier.EndTable(); - } -}; - -struct TrackerIdBuilder { - typedef TrackerId Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_device_id(const solarxr_protocol::datatypes::DeviceId *device_id) { - fbb_.AddStruct(TrackerId::VT_DEVICE_ID, device_id); - } - void add_tracker_num(uint8_t tracker_num) { - fbb_.AddElement(TrackerId::VT_TRACKER_NUM, tracker_num, 0); - } - explicit TrackerIdBuilder(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 CreateTrackerId( - flatbuffers::FlatBufferBuilder &_fbb, - const solarxr_protocol::datatypes::DeviceId *device_id = nullptr, - uint8_t tracker_num = 0) { - TrackerIdBuilder builder_(_fbb); - builder_.add_device_id(device_id); - builder_.add_tracker_num(tracker_num); - return builder_.Finish(); -} - -/// General purpose logging datatype -struct LogData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef LogDataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MESSAGE = 4, - VT_DATA = 6 - }; - const flatbuffers::String *message() const { - return GetPointer(VT_MESSAGE); - } - const flatbuffers::Vector *data() const { - return GetPointer *>(VT_DATA); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_MESSAGE) && - verifier.VerifyString(message()) && - VerifyOffset(verifier, VT_DATA) && - verifier.VerifyVector(data()) && - verifier.EndTable(); - } -}; - -struct LogDataBuilder { - typedef LogData Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_message(flatbuffers::Offset message) { - fbb_.AddOffset(LogData::VT_MESSAGE, message); - } - void add_data(flatbuffers::Offset> data) { - fbb_.AddOffset(LogData::VT_DATA, data); - } - explicit LogDataBuilder(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 CreateLogData( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset message = 0, - flatbuffers::Offset> data = 0) { - LogDataBuilder builder_(_fbb); - builder_.add_data(data); - builder_.add_message(message); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateLogDataDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *message = nullptr, - const std::vector *data = nullptr) { - auto message__ = message ? _fbb.CreateString(message) : 0; - auto data__ = data ? _fbb.CreateVector(*data) : 0; - return solarxr_protocol::datatypes::CreateLogData( - _fbb, - message__, - data__); -} - -namespace hardware_info { - -/// Mostly static info about the device's hardware/firmware. -struct HardwareInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef HardwareInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MCU_ID = 4, - VT_DISPLAY_NAME = 6, - VT_MODEL = 8, - VT_MANUFACTURER = 10, - VT_HARDWARE_REVISION = 12, - VT_FIRMWARE_VERSION = 14, - VT_HARDWARE_ADDRESS = 16, - VT_IP_ADDRESS = 18 - }; - solarxr_protocol::datatypes::hardware_info::McuType mcu_id() const { - return static_cast(GetField(VT_MCU_ID, 0)); - } - /// A human-friendly name to display as the name of the device. - const flatbuffers::String *display_name() const { - return GetPointer(VT_DISPLAY_NAME); - } - /// A human-friendly string for the device model. - const flatbuffers::String *model() const { - return GetPointer(VT_MODEL); - } - /// A human-friendly string for the manufacturer of the device. - const flatbuffers::String *manufacturer() const { - return GetPointer(VT_MANUFACTURER); - } - /// The hardware version of the device. For example, pcb version. - const flatbuffers::String *hardware_revision() const { - return GetPointer(VT_HARDWARE_REVISION); - } - /// The version of the slimevr firmware that the device is running. - const flatbuffers::String *firmware_version() const { - return GetPointer(VT_FIRMWARE_VERSION); - } - const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address() const { - return GetStruct(VT_HARDWARE_ADDRESS); - } - const solarxr_protocol::datatypes::Ipv4Address *ip_address() const { - return GetStruct(VT_IP_ADDRESS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_MCU_ID, 2) && - VerifyOffset(verifier, VT_DISPLAY_NAME) && - verifier.VerifyString(display_name()) && - VerifyOffset(verifier, VT_MODEL) && - verifier.VerifyString(model()) && - VerifyOffset(verifier, VT_MANUFACTURER) && - verifier.VerifyString(manufacturer()) && - VerifyOffset(verifier, VT_HARDWARE_REVISION) && - verifier.VerifyString(hardware_revision()) && - VerifyOffset(verifier, VT_FIRMWARE_VERSION) && - verifier.VerifyString(firmware_version()) && - VerifyField(verifier, VT_HARDWARE_ADDRESS, 8) && - VerifyField(verifier, VT_IP_ADDRESS, 4) && - verifier.EndTable(); - } -}; - -struct HardwareInfoBuilder { - typedef HardwareInfo Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_mcu_id(solarxr_protocol::datatypes::hardware_info::McuType mcu_id) { - fbb_.AddElement(HardwareInfo::VT_MCU_ID, static_cast(mcu_id), 0); - } - void add_display_name(flatbuffers::Offset display_name) { - fbb_.AddOffset(HardwareInfo::VT_DISPLAY_NAME, display_name); - } - void add_model(flatbuffers::Offset model) { - fbb_.AddOffset(HardwareInfo::VT_MODEL, model); - } - void add_manufacturer(flatbuffers::Offset manufacturer) { - fbb_.AddOffset(HardwareInfo::VT_MANUFACTURER, manufacturer); - } - void add_hardware_revision(flatbuffers::Offset hardware_revision) { - fbb_.AddOffset(HardwareInfo::VT_HARDWARE_REVISION, hardware_revision); - } - void add_firmware_version(flatbuffers::Offset firmware_version) { - fbb_.AddOffset(HardwareInfo::VT_FIRMWARE_VERSION, firmware_version); - } - void add_hardware_address(const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address) { - fbb_.AddStruct(HardwareInfo::VT_HARDWARE_ADDRESS, hardware_address); - } - void add_ip_address(const solarxr_protocol::datatypes::Ipv4Address *ip_address) { - fbb_.AddStruct(HardwareInfo::VT_IP_ADDRESS, ip_address); - } - explicit HardwareInfoBuilder(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 CreateHardwareInfo( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::datatypes::hardware_info::McuType mcu_id = solarxr_protocol::datatypes::hardware_info::McuType::Other, - flatbuffers::Offset display_name = 0, - flatbuffers::Offset model = 0, - flatbuffers::Offset manufacturer = 0, - flatbuffers::Offset hardware_revision = 0, - flatbuffers::Offset firmware_version = 0, - const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr, - const solarxr_protocol::datatypes::Ipv4Address *ip_address = nullptr) { - HardwareInfoBuilder builder_(_fbb); - builder_.add_ip_address(ip_address); - builder_.add_hardware_address(hardware_address); - builder_.add_firmware_version(firmware_version); - builder_.add_hardware_revision(hardware_revision); - builder_.add_manufacturer(manufacturer); - builder_.add_model(model); - builder_.add_display_name(display_name); - builder_.add_mcu_id(mcu_id); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateHardwareInfoDirect( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::datatypes::hardware_info::McuType mcu_id = solarxr_protocol::datatypes::hardware_info::McuType::Other, - const char *display_name = nullptr, - const char *model = nullptr, - const char *manufacturer = nullptr, - const char *hardware_revision = nullptr, - const char *firmware_version = nullptr, - const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr, - const solarxr_protocol::datatypes::Ipv4Address *ip_address = nullptr) { - auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; - auto model__ = model ? _fbb.CreateString(model) : 0; - auto manufacturer__ = manufacturer ? _fbb.CreateString(manufacturer) : 0; - auto hardware_revision__ = hardware_revision ? _fbb.CreateString(hardware_revision) : 0; - auto firmware_version__ = firmware_version ? _fbb.CreateString(firmware_version) : 0; - return solarxr_protocol::datatypes::hardware_info::CreateHardwareInfo( - _fbb, - mcu_id, - display_name__, - model__, - manufacturer__, - hardware_revision__, - firmware_version__, - hardware_address, - ip_address); -} - -/// Mostly-dynamic status info about a tracked device's firmware -struct HardwareStatus FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef HardwareStatusBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ERROR_STATUS = 4, - VT_TPS = 6, - VT_PING = 8, - VT_RSSI = 10, - VT_MCU_TEMP = 12, - VT_BATTERY_VOLTAGE = 14, - VT_BATTERY_PCT_ESTIMATE = 16, - VT_LOG_DATA = 18 - }; - flatbuffers::Optional error_status() const { - return GetOptional(VT_ERROR_STATUS); - } - flatbuffers::Optional tps() const { - return GetOptional(VT_TPS); - } - flatbuffers::Optional ping() const { - return GetOptional(VT_PING); - } - /// “Received Signal Strength Indicator" between device and wifi adapter in dBm - flatbuffers::Optional rssi() const { - return GetOptional(VT_RSSI); - } - /// Temperature in degrees celsius - flatbuffers::Optional mcu_temp() const { - return GetOptional(VT_MCU_TEMP); - } - flatbuffers::Optional battery_voltage() const { - return GetOptional(VT_BATTERY_VOLTAGE); - } - flatbuffers::Optional battery_pct_estimate() const { - return GetOptional(VT_BATTERY_PCT_ESTIMATE); - } - const solarxr_protocol::datatypes::LogData *log_data() const { - return GetPointer(VT_LOG_DATA); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ERROR_STATUS, 1) && - VerifyField(verifier, VT_TPS, 1) && - VerifyField(verifier, VT_PING, 2) && - VerifyField(verifier, VT_RSSI, 2) && - VerifyField(verifier, VT_MCU_TEMP, 4) && - VerifyField(verifier, VT_BATTERY_VOLTAGE, 4) && - VerifyField(verifier, VT_BATTERY_PCT_ESTIMATE, 1) && - VerifyOffset(verifier, VT_LOG_DATA) && - verifier.VerifyTable(log_data()) && - verifier.EndTable(); - } -}; - -struct HardwareStatusBuilder { - typedef HardwareStatus Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_error_status(solarxr_protocol::datatypes::FirmwareErrorCode error_status) { - fbb_.AddElement(HardwareStatus::VT_ERROR_STATUS, static_cast(error_status)); - } - void add_tps(uint8_t tps) { - fbb_.AddElement(HardwareStatus::VT_TPS, tps); - } - void add_ping(uint16_t ping) { - fbb_.AddElement(HardwareStatus::VT_PING, ping); - } - void add_rssi(int16_t rssi) { - fbb_.AddElement(HardwareStatus::VT_RSSI, rssi); - } - void add_mcu_temp(float mcu_temp) { - fbb_.AddElement(HardwareStatus::VT_MCU_TEMP, mcu_temp); - } - void add_battery_voltage(float battery_voltage) { - fbb_.AddElement(HardwareStatus::VT_BATTERY_VOLTAGE, battery_voltage); - } - void add_battery_pct_estimate(uint8_t battery_pct_estimate) { - fbb_.AddElement(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, battery_pct_estimate); - } - void add_log_data(flatbuffers::Offset log_data) { - fbb_.AddOffset(HardwareStatus::VT_LOG_DATA, log_data); - } - explicit HardwareStatusBuilder(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 CreateHardwareStatus( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional error_status = flatbuffers::nullopt, - flatbuffers::Optional tps = flatbuffers::nullopt, - flatbuffers::Optional ping = flatbuffers::nullopt, - flatbuffers::Optional rssi = flatbuffers::nullopt, - flatbuffers::Optional mcu_temp = flatbuffers::nullopt, - flatbuffers::Optional battery_voltage = flatbuffers::nullopt, - flatbuffers::Optional battery_pct_estimate = flatbuffers::nullopt, - flatbuffers::Offset log_data = 0) { - HardwareStatusBuilder builder_(_fbb); - builder_.add_log_data(log_data); - if(battery_voltage) { builder_.add_battery_voltage(*battery_voltage); } - if(mcu_temp) { builder_.add_mcu_temp(*mcu_temp); } - if(rssi) { builder_.add_rssi(*rssi); } - if(ping) { builder_.add_ping(*ping); } - if(battery_pct_estimate) { builder_.add_battery_pct_estimate(*battery_pct_estimate); } - if(tps) { builder_.add_tps(*tps); } - if(error_status) { builder_.add_error_status(*error_status); } - return builder_.Finish(); -} - -/// A mask of the data in `FirmwareStatus` -struct FirmwareStatusMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef FirmwareStatusMaskBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ERROR_STATUS = 4, - VT_TPS = 6, - VT_PING = 8, - VT_RSSI = 10, - VT_MCU_TEMP = 12, - VT_BATTERY_VOLTAGE = 14, - VT_BATTERY_PCT_ESTIMATE = 16 - }; - bool error_status() const { - return GetField(VT_ERROR_STATUS, 0) != 0; - } - bool tps() const { - return GetField(VT_TPS, 0) != 0; - } - bool ping() const { - return GetField(VT_PING, 0) != 0; - } - bool rssi() const { - return GetField(VT_RSSI, 0) != 0; - } - bool mcu_temp() const { - return GetField(VT_MCU_TEMP, 0) != 0; - } - bool battery_voltage() const { - return GetField(VT_BATTERY_VOLTAGE, 0) != 0; - } - bool battery_pct_estimate() const { - return GetField(VT_BATTERY_PCT_ESTIMATE, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ERROR_STATUS, 1) && - VerifyField(verifier, VT_TPS, 1) && - VerifyField(verifier, VT_PING, 1) && - VerifyField(verifier, VT_RSSI, 1) && - VerifyField(verifier, VT_MCU_TEMP, 1) && - VerifyField(verifier, VT_BATTERY_VOLTAGE, 1) && - VerifyField(verifier, VT_BATTERY_PCT_ESTIMATE, 1) && - verifier.EndTable(); - } -}; - -struct FirmwareStatusMaskBuilder { - typedef FirmwareStatusMask Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_error_status(bool error_status) { - fbb_.AddElement(FirmwareStatusMask::VT_ERROR_STATUS, static_cast(error_status), 0); - } - void add_tps(bool tps) { - fbb_.AddElement(FirmwareStatusMask::VT_TPS, static_cast(tps), 0); - } - void add_ping(bool ping) { - fbb_.AddElement(FirmwareStatusMask::VT_PING, static_cast(ping), 0); - } - void add_rssi(bool rssi) { - fbb_.AddElement(FirmwareStatusMask::VT_RSSI, static_cast(rssi), 0); - } - void add_mcu_temp(bool mcu_temp) { - fbb_.AddElement(FirmwareStatusMask::VT_MCU_TEMP, static_cast(mcu_temp), 0); - } - void add_battery_voltage(bool battery_voltage) { - fbb_.AddElement(FirmwareStatusMask::VT_BATTERY_VOLTAGE, static_cast(battery_voltage), 0); - } - void add_battery_pct_estimate(bool battery_pct_estimate) { - fbb_.AddElement(FirmwareStatusMask::VT_BATTERY_PCT_ESTIMATE, static_cast(battery_pct_estimate), 0); - } - explicit FirmwareStatusMaskBuilder(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 CreateFirmwareStatusMask( - flatbuffers::FlatBufferBuilder &_fbb, - bool error_status = false, - bool tps = false, - bool ping = false, - bool rssi = false, - bool mcu_temp = false, - bool battery_voltage = false, - bool battery_pct_estimate = false) { - FirmwareStatusMaskBuilder builder_(_fbb); - builder_.add_battery_pct_estimate(battery_pct_estimate); - builder_.add_battery_voltage(battery_voltage); - builder_.add_mcu_temp(mcu_temp); - builder_.add_rssi(rssi); - builder_.add_ping(ping); - builder_.add_tps(tps); - builder_.add_error_status(error_status); - return builder_.Finish(); -} - -} // namespace hardware_info -} // namespace datatypes - -namespace data_feed { -namespace tracker { - -/// Describes all possible information about a tracker. A tracker is anything that -/// provides kinematic data about a particular body part. -/// -/// Trackers may be synthetic/computed or instead part of an actual hardware device. -/// There can be multiple trackers per hardware device. -struct TrackerData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TrackerDataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_ID = 4, - VT_INFO = 6, - VT_STATUS = 8, - VT_ROTATION = 10, - VT_POSITION = 12, - VT_RAW_ROT_VEL = 14, - VT_RAW_TRANS_ACCEL = 16, - VT_TEMP = 18 - }; - const solarxr_protocol::datatypes::TrackerId *tracker_id() const { - return GetPointer(VT_TRACKER_ID); - } - const solarxr_protocol::data_feed::tracker::TrackerInfo *info() const { - return GetPointer(VT_INFO); - } - solarxr_protocol::datatypes::TrackerStatus status() const { - return static_cast(GetField(VT_STATUS, 0)); - } - const solarxr_protocol::datatypes::math::Quat *rotation() const { - return GetStruct(VT_ROTATION); - } - /// Position, in meters - const solarxr_protocol::datatypes::math::Vec3f *position() const { - return GetStruct(VT_POSITION); - } - /// Raw rotational velocity, in euler angles - const solarxr_protocol::datatypes::math::Vec3f *raw_rot_vel() const { - return GetStruct(VT_RAW_ROT_VEL); - } - /// Raw translational acceleration, in m/s^2 - const solarxr_protocol::datatypes::math::Vec3f *raw_trans_accel() const { - return GetStruct(VT_RAW_TRANS_ACCEL); - } - /// Temperature in degrees celsius - const solarxr_protocol::datatypes::Temperature *temp() const { - return GetStruct(VT_TEMP); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_ID) && - verifier.VerifyTable(tracker_id()) && - VerifyOffset(verifier, VT_INFO) && - verifier.VerifyTable(info()) && - VerifyField(verifier, VT_STATUS, 1) && - VerifyField(verifier, VT_ROTATION, 4) && - VerifyField(verifier, VT_POSITION, 4) && - VerifyField(verifier, VT_RAW_ROT_VEL, 4) && - VerifyField(verifier, VT_RAW_TRANS_ACCEL, 4) && - VerifyField(verifier, VT_TEMP, 4) && - verifier.EndTable(); - } -}; - -struct TrackerDataBuilder { - typedef TrackerData Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_id(flatbuffers::Offset tracker_id) { - fbb_.AddOffset(TrackerData::VT_TRACKER_ID, tracker_id); - } - void add_info(flatbuffers::Offset info) { - fbb_.AddOffset(TrackerData::VT_INFO, info); - } - void add_status(solarxr_protocol::datatypes::TrackerStatus status) { - fbb_.AddElement(TrackerData::VT_STATUS, static_cast(status), 0); - } - void add_rotation(const solarxr_protocol::datatypes::math::Quat *rotation) { - fbb_.AddStruct(TrackerData::VT_ROTATION, rotation); - } - void add_position(const solarxr_protocol::datatypes::math::Vec3f *position) { - fbb_.AddStruct(TrackerData::VT_POSITION, position); - } - void add_raw_rot_vel(const solarxr_protocol::datatypes::math::Vec3f *raw_rot_vel) { - fbb_.AddStruct(TrackerData::VT_RAW_ROT_VEL, raw_rot_vel); - } - void add_raw_trans_accel(const solarxr_protocol::datatypes::math::Vec3f *raw_trans_accel) { - fbb_.AddStruct(TrackerData::VT_RAW_TRANS_ACCEL, raw_trans_accel); - } - void add_temp(const solarxr_protocol::datatypes::Temperature *temp) { - fbb_.AddStruct(TrackerData::VT_TEMP, temp); - } - explicit TrackerDataBuilder(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 CreateTrackerData( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0, - flatbuffers::Offset info = 0, - solarxr_protocol::datatypes::TrackerStatus status = solarxr_protocol::datatypes::TrackerStatus::NONE, - const solarxr_protocol::datatypes::math::Quat *rotation = nullptr, - const solarxr_protocol::datatypes::math::Vec3f *position = nullptr, - const solarxr_protocol::datatypes::math::Vec3f *raw_rot_vel = nullptr, - const solarxr_protocol::datatypes::math::Vec3f *raw_trans_accel = nullptr, - const solarxr_protocol::datatypes::Temperature *temp = nullptr) { - TrackerDataBuilder builder_(_fbb); - builder_.add_temp(temp); - builder_.add_raw_trans_accel(raw_trans_accel); - builder_.add_raw_rot_vel(raw_rot_vel); - builder_.add_position(position); - builder_.add_rotation(rotation); - builder_.add_info(info); - builder_.add_tracker_id(tracker_id); - builder_.add_status(status); - return builder_.Finish(); -} - -/// A mask of the different components in `TrackerComponent` -struct TrackerDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TrackerDataMaskBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_INFO = 4, - VT_STATUS = 6, - VT_ROTATION = 8, - VT_POSITION = 10, - VT_RAW_ROT_VEL = 12, - VT_RAW_TRANS_ACCEL = 14, - VT_TEMP = 16 - }; - bool info() const { - return GetField(VT_INFO, 0) != 0; - } - bool status() const { - return GetField(VT_STATUS, 0) != 0; - } - bool rotation() const { - return GetField(VT_ROTATION, 0) != 0; - } - bool position() const { - return GetField(VT_POSITION, 0) != 0; - } - bool raw_rot_vel() const { - return GetField(VT_RAW_ROT_VEL, 0) != 0; - } - bool raw_trans_accel() const { - return GetField(VT_RAW_TRANS_ACCEL, 0) != 0; - } - bool temp() const { - return GetField(VT_TEMP, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_INFO, 1) && - VerifyField(verifier, VT_STATUS, 1) && - VerifyField(verifier, VT_ROTATION, 1) && - VerifyField(verifier, VT_POSITION, 1) && - VerifyField(verifier, VT_RAW_ROT_VEL, 1) && - VerifyField(verifier, VT_RAW_TRANS_ACCEL, 1) && - VerifyField(verifier, VT_TEMP, 1) && - verifier.EndTable(); - } -}; - -struct TrackerDataMaskBuilder { - typedef TrackerDataMask Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_info(bool info) { - fbb_.AddElement(TrackerDataMask::VT_INFO, static_cast(info), 0); - } - void add_status(bool status) { - fbb_.AddElement(TrackerDataMask::VT_STATUS, static_cast(status), 0); - } - void add_rotation(bool rotation) { - fbb_.AddElement(TrackerDataMask::VT_ROTATION, static_cast(rotation), 0); - } - void add_position(bool position) { - fbb_.AddElement(TrackerDataMask::VT_POSITION, static_cast(position), 0); - } - void add_raw_rot_vel(bool raw_rot_vel) { - fbb_.AddElement(TrackerDataMask::VT_RAW_ROT_VEL, static_cast(raw_rot_vel), 0); - } - void add_raw_trans_accel(bool raw_trans_accel) { - fbb_.AddElement(TrackerDataMask::VT_RAW_TRANS_ACCEL, static_cast(raw_trans_accel), 0); - } - void add_temp(bool temp) { - fbb_.AddElement(TrackerDataMask::VT_TEMP, static_cast(temp), 0); - } - explicit TrackerDataMaskBuilder(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 CreateTrackerDataMask( - flatbuffers::FlatBufferBuilder &_fbb, - bool info = false, - bool status = false, - bool rotation = false, - bool position = false, - bool raw_rot_vel = false, - bool raw_trans_accel = false, - bool temp = false) { - TrackerDataMaskBuilder builder_(_fbb); - builder_.add_temp(temp); - builder_.add_raw_trans_accel(raw_trans_accel); - builder_.add_raw_rot_vel(raw_rot_vel); - builder_.add_position(position); - builder_.add_rotation(rotation); - builder_.add_status(status); - builder_.add_info(info); - return builder_.Finish(); -} - -/// Static description of a tracker -struct TrackerInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TrackerInfoBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_IMU_TYPE = 4, - VT_BODY_PART = 6, - VT_POLL_RATE = 8, - VT_MOUNTING_ORIENTATION = 10, - VT_EDITABLE = 12, - VT_COMPUTED = 14, - VT_DISPLAY_NAME = 16, - VT_CUSTOM_NAME = 18 - }; - solarxr_protocol::datatypes::hardware_info::ImuType imu_type() const { - return static_cast(GetField(VT_IMU_TYPE, 0)); - } - /// The user-assigned role of the tracker. - solarxr_protocol::datatypes::BodyPart body_part() const { - return static_cast(GetField(VT_BODY_PART, 0)); - } - /// average samples per second - const solarxr_protocol::datatypes::HzF32 *poll_rate() const { - return GetStruct(VT_POLL_RATE); - } - /// The orientation of the tracker when mounted on the body - const solarxr_protocol::datatypes::math::Quat *mounting_orientation() const { - return GetStruct(VT_MOUNTING_ORIENTATION); - } - bool editable() const { - return GetField(VT_EDITABLE, 0) != 0; - } - bool computed() const { - return GetField(VT_COMPUTED, 0) != 0; - } - /// A human-friendly name to display as the name of the tracker. - const flatbuffers::String *display_name() const { - return GetPointer(VT_DISPLAY_NAME); - } - /// name to display as the name of the tracker set by the user - const flatbuffers::String *custom_name() const { - return GetPointer(VT_CUSTOM_NAME); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_IMU_TYPE, 2) && - VerifyField(verifier, VT_BODY_PART, 1) && - VerifyField(verifier, VT_POLL_RATE, 4) && - VerifyField(verifier, VT_MOUNTING_ORIENTATION, 4) && - VerifyField(verifier, VT_EDITABLE, 1) && - VerifyField(verifier, VT_COMPUTED, 1) && - VerifyOffset(verifier, VT_DISPLAY_NAME) && - verifier.VerifyString(display_name()) && - VerifyOffset(verifier, VT_CUSTOM_NAME) && - verifier.VerifyString(custom_name()) && - verifier.EndTable(); - } -}; - -struct TrackerInfoBuilder { - typedef TrackerInfo Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_imu_type(solarxr_protocol::datatypes::hardware_info::ImuType imu_type) { - fbb_.AddElement(TrackerInfo::VT_IMU_TYPE, static_cast(imu_type), 0); - } - void add_body_part(solarxr_protocol::datatypes::BodyPart body_part) { - fbb_.AddElement(TrackerInfo::VT_BODY_PART, static_cast(body_part), 0); - } - void add_poll_rate(const solarxr_protocol::datatypes::HzF32 *poll_rate) { - fbb_.AddStruct(TrackerInfo::VT_POLL_RATE, poll_rate); - } - void add_mounting_orientation(const solarxr_protocol::datatypes::math::Quat *mounting_orientation) { - fbb_.AddStruct(TrackerInfo::VT_MOUNTING_ORIENTATION, mounting_orientation); - } - void add_editable(bool editable) { - fbb_.AddElement(TrackerInfo::VT_EDITABLE, static_cast(editable), 0); - } - void add_computed(bool computed) { - fbb_.AddElement(TrackerInfo::VT_COMPUTED, static_cast(computed), 0); - } - void add_display_name(flatbuffers::Offset display_name) { - fbb_.AddOffset(TrackerInfo::VT_DISPLAY_NAME, display_name); - } - void add_custom_name(flatbuffers::Offset custom_name) { - fbb_.AddOffset(TrackerInfo::VT_CUSTOM_NAME, custom_name); - } - explicit TrackerInfoBuilder(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 CreateTrackerInfo( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::datatypes::hardware_info::ImuType imu_type = solarxr_protocol::datatypes::hardware_info::ImuType::Other, - solarxr_protocol::datatypes::BodyPart body_part = solarxr_protocol::datatypes::BodyPart::NONE, - const solarxr_protocol::datatypes::HzF32 *poll_rate = nullptr, - const solarxr_protocol::datatypes::math::Quat *mounting_orientation = nullptr, - bool editable = false, - bool computed = false, - flatbuffers::Offset display_name = 0, - flatbuffers::Offset custom_name = 0) { - TrackerInfoBuilder builder_(_fbb); - builder_.add_custom_name(custom_name); - builder_.add_display_name(display_name); - builder_.add_mounting_orientation(mounting_orientation); - builder_.add_poll_rate(poll_rate); - builder_.add_imu_type(imu_type); - builder_.add_computed(computed); - builder_.add_editable(editable); - builder_.add_body_part(body_part); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateTrackerInfoDirect( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::datatypes::hardware_info::ImuType imu_type = solarxr_protocol::datatypes::hardware_info::ImuType::Other, - solarxr_protocol::datatypes::BodyPart body_part = solarxr_protocol::datatypes::BodyPart::NONE, - const solarxr_protocol::datatypes::HzF32 *poll_rate = nullptr, - const solarxr_protocol::datatypes::math::Quat *mounting_orientation = nullptr, - bool editable = false, - bool computed = false, - const char *display_name = nullptr, - const char *custom_name = nullptr) { - auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; - auto custom_name__ = custom_name ? _fbb.CreateString(custom_name) : 0; - return solarxr_protocol::data_feed::tracker::CreateTrackerInfo( - _fbb, - imu_type, - body_part, - poll_rate, - mounting_orientation, - editable, - computed, - display_name__, - custom_name__); -} - -} // namespace tracker - -namespace device_data { - -/// A mask of values to be reported in subsequent DeviceStatus. Values set to `false` -/// or `null` will not reported. By default, all fields are false/null. -/// -/// If you set a value to `true`, it is not guaranteed that the sender actually has -/// such a value to send. In this case, they will probably send `null`, and the receiver -/// has the choice to disconnect due to missing data. -struct DeviceDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DeviceDataMaskBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_DATA = 4, - VT_DEVICE_DATA = 6 - }; - /// Which tracker data should be sent in this data feed - const solarxr_protocol::data_feed::tracker::TrackerDataMask *tracker_data() const { - return GetPointer(VT_TRACKER_DATA); - } - /// true if device data should be sent in this data feed - bool device_data() const { - return GetField(VT_DEVICE_DATA, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_DATA) && - verifier.VerifyTable(tracker_data()) && - VerifyField(verifier, VT_DEVICE_DATA, 1) && - verifier.EndTable(); - } -}; - -struct DeviceDataMaskBuilder { - typedef DeviceDataMask Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_data(flatbuffers::Offset tracker_data) { - fbb_.AddOffset(DeviceDataMask::VT_TRACKER_DATA, tracker_data); - } - void add_device_data(bool device_data) { - fbb_.AddElement(DeviceDataMask::VT_DEVICE_DATA, static_cast(device_data), 0); - } - explicit DeviceDataMaskBuilder(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 CreateDeviceDataMask( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_data = 0, - bool device_data = false) { - DeviceDataMaskBuilder builder_(_fbb); - builder_.add_tracker_data(tracker_data); - builder_.add_device_data(device_data); - return builder_.Finish(); -} - -/// Describes all possible information about a hardware device. For example, a -/// vive tracker is a single hardware device, and a slime tracker with two -/// extensions is a single hardware device but two trackers. -struct DeviceData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DeviceDataBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_ID = 4, - VT_CUSTOM_NAME = 6, - VT_HARDWARE_INFO = 8, - VT_HARDWARE_STATUS = 10, - VT_TRACKERS = 12 - }; - const solarxr_protocol::datatypes::DeviceId *id() const { - return GetStruct(VT_ID); - } - /// The dynamically changeable name of the device. This might be set by the - /// user to help them remember which tracker is which. - const flatbuffers::String *custom_name() const { - return GetPointer(VT_CUSTOM_NAME); - } - /// Mostly-static info about the device hardware - const solarxr_protocol::datatypes::hardware_info::HardwareInfo *hardware_info() const { - return GetPointer(VT_HARDWARE_INFO); - } - /// General info about the status of the device - const solarxr_protocol::datatypes::hardware_info::HardwareStatus *hardware_status() const { - return GetPointer(VT_HARDWARE_STATUS); - } - /// Info about all trackers attached to this device - const flatbuffers::Vector> *trackers() const { - return GetPointer> *>(VT_TRACKERS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_ID, 1) && - VerifyOffset(verifier, VT_CUSTOM_NAME) && - verifier.VerifyString(custom_name()) && - VerifyOffset(verifier, VT_HARDWARE_INFO) && - verifier.VerifyTable(hardware_info()) && - VerifyOffset(verifier, VT_HARDWARE_STATUS) && - verifier.VerifyTable(hardware_status()) && - VerifyOffset(verifier, VT_TRACKERS) && - verifier.VerifyVector(trackers()) && - verifier.VerifyVectorOfTables(trackers()) && - verifier.EndTable(); - } -}; - -struct DeviceDataBuilder { - typedef DeviceData Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_id(const solarxr_protocol::datatypes::DeviceId *id) { - fbb_.AddStruct(DeviceData::VT_ID, id); - } - void add_custom_name(flatbuffers::Offset custom_name) { - fbb_.AddOffset(DeviceData::VT_CUSTOM_NAME, custom_name); - } - void add_hardware_info(flatbuffers::Offset hardware_info) { - fbb_.AddOffset(DeviceData::VT_HARDWARE_INFO, hardware_info); - } - void add_hardware_status(flatbuffers::Offset hardware_status) { - fbb_.AddOffset(DeviceData::VT_HARDWARE_STATUS, hardware_status); - } - void add_trackers(flatbuffers::Offset>> trackers) { - fbb_.AddOffset(DeviceData::VT_TRACKERS, trackers); - } - explicit DeviceDataBuilder(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 CreateDeviceData( - flatbuffers::FlatBufferBuilder &_fbb, - const solarxr_protocol::datatypes::DeviceId *id = nullptr, - flatbuffers::Offset custom_name = 0, - flatbuffers::Offset hardware_info = 0, - flatbuffers::Offset hardware_status = 0, - flatbuffers::Offset>> trackers = 0) { - DeviceDataBuilder builder_(_fbb); - builder_.add_trackers(trackers); - builder_.add_hardware_status(hardware_status); - builder_.add_hardware_info(hardware_info); - builder_.add_custom_name(custom_name); - builder_.add_id(id); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateDeviceDataDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const solarxr_protocol::datatypes::DeviceId *id = nullptr, - const char *custom_name = nullptr, - flatbuffers::Offset hardware_info = 0, - flatbuffers::Offset hardware_status = 0, - const std::vector> *trackers = nullptr) { - auto custom_name__ = custom_name ? _fbb.CreateString(custom_name) : 0; - auto trackers__ = trackers ? _fbb.CreateVector>(*trackers) : 0; - return solarxr_protocol::data_feed::device_data::CreateDeviceData( - _fbb, - id, - custom_name__, - hardware_info, - hardware_status, - trackers__); -} - -} // namespace device_data - -struct Bone FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef BoneBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BODY_PART = 4, - VT_ROTATION_G = 6, - VT_BONE_LENGTH = 8, - VT_HEAD_POSITION_G = 10 - }; - solarxr_protocol::datatypes::BodyPart body_part() const { - return static_cast(GetField(VT_BODY_PART, 0)); - } - /// The global rotation of the bone. - /// - /// Note that the identity rotation is where a bone's tail is towards -y (assuming - /// the head of the bone is the origin) - const solarxr_protocol::datatypes::math::Quat *rotation_g() const { - return GetStruct(VT_ROTATION_G); - } - float bone_length() const { - return GetField(VT_BONE_LENGTH, 0.0f); - } - /// The global position of the head of this bone. - /// - /// The head of a bone is joint/node of the bone touching the parent bone. The - /// parent is defined as the bone closer to the HMD. - const solarxr_protocol::datatypes::math::Vec3f *head_position_g() const { - return GetStruct(VT_HEAD_POSITION_G); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BODY_PART, 1) && - VerifyField(verifier, VT_ROTATION_G, 4) && - VerifyField(verifier, VT_BONE_LENGTH, 4) && - VerifyField(verifier, VT_HEAD_POSITION_G, 4) && - verifier.EndTable(); - } -}; - -struct BoneBuilder { - typedef Bone Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_body_part(solarxr_protocol::datatypes::BodyPart body_part) { - fbb_.AddElement(Bone::VT_BODY_PART, static_cast(body_part), 0); - } - void add_rotation_g(const solarxr_protocol::datatypes::math::Quat *rotation_g) { - fbb_.AddStruct(Bone::VT_ROTATION_G, rotation_g); - } - void add_bone_length(float bone_length) { - fbb_.AddElement(Bone::VT_BONE_LENGTH, bone_length, 0.0f); - } - void add_head_position_g(const solarxr_protocol::datatypes::math::Vec3f *head_position_g) { - fbb_.AddStruct(Bone::VT_HEAD_POSITION_G, head_position_g); - } - explicit BoneBuilder(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 CreateBone( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::datatypes::BodyPart body_part = solarxr_protocol::datatypes::BodyPart::NONE, - const solarxr_protocol::datatypes::math::Quat *rotation_g = nullptr, - float bone_length = 0.0f, - const solarxr_protocol::datatypes::math::Vec3f *head_position_g = nullptr) { - BoneBuilder builder_(_fbb); - builder_.add_head_position_g(head_position_g); - builder_.add_bone_length(bone_length); - builder_.add_rotation_g(rotation_g); - builder_.add_body_part(body_part); - return builder_.Finish(); -} - -struct DataFeedMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DataFeedMessageHeaderBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MESSAGE_TYPE = 4, - VT_MESSAGE = 6 - }; - solarxr_protocol::data_feed::DataFeedMessage message_type() const { - return static_cast(GetField(VT_MESSAGE_TYPE, 0)); - } - const void *message() const { - return GetPointer(VT_MESSAGE); - } - template const T *message_as() const; - const solarxr_protocol::data_feed::PollDataFeed *message_as_PollDataFeed() const { - return message_type() == solarxr_protocol::data_feed::DataFeedMessage::PollDataFeed ? static_cast(message()) : nullptr; - } - const solarxr_protocol::data_feed::StartDataFeed *message_as_StartDataFeed() const { - return message_type() == solarxr_protocol::data_feed::DataFeedMessage::StartDataFeed ? static_cast(message()) : nullptr; - } - const solarxr_protocol::data_feed::DataFeedUpdate *message_as_DataFeedUpdate() const { - return message_type() == solarxr_protocol::data_feed::DataFeedMessage::DataFeedUpdate ? static_cast(message()) : nullptr; - } - const solarxr_protocol::data_feed::DataFeedConfig *message_as_DataFeedConfig() const { - return message_type() == solarxr_protocol::data_feed::DataFeedMessage::DataFeedConfig ? static_cast(message()) : nullptr; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_MESSAGE_TYPE, 1) && - VerifyOffset(verifier, VT_MESSAGE) && - VerifyDataFeedMessage(verifier, message(), message_type()) && - verifier.EndTable(); - } -}; - -template<> inline const solarxr_protocol::data_feed::PollDataFeed *DataFeedMessageHeader::message_as() const { - return message_as_PollDataFeed(); -} - -template<> inline const solarxr_protocol::data_feed::StartDataFeed *DataFeedMessageHeader::message_as() const { - return message_as_StartDataFeed(); -} - -template<> inline const solarxr_protocol::data_feed::DataFeedUpdate *DataFeedMessageHeader::message_as() const { - return message_as_DataFeedUpdate(); -} - -template<> inline const solarxr_protocol::data_feed::DataFeedConfig *DataFeedMessageHeader::message_as() const { - return message_as_DataFeedConfig(); -} - -struct DataFeedMessageHeaderBuilder { - typedef DataFeedMessageHeader Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_message_type(solarxr_protocol::data_feed::DataFeedMessage message_type) { - fbb_.AddElement(DataFeedMessageHeader::VT_MESSAGE_TYPE, static_cast(message_type), 0); - } - void add_message(flatbuffers::Offset message) { - fbb_.AddOffset(DataFeedMessageHeader::VT_MESSAGE, message); - } - explicit DataFeedMessageHeaderBuilder(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 CreateDataFeedMessageHeader( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::data_feed::DataFeedMessage message_type = solarxr_protocol::data_feed::DataFeedMessage::NONE, - flatbuffers::Offset message = 0) { - DataFeedMessageHeaderBuilder builder_(_fbb); - builder_.add_message(message); - builder_.add_message_type(message_type); - return builder_.Finish(); -} - -/// Requests for a single `Update` to be sent. This is helpful when getting -/// initial info about the device. -struct PollDataFeed FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef PollDataFeedBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CONFIG = 4 - }; - const solarxr_protocol::data_feed::DataFeedConfig *config() const { - return GetPointer(VT_CONFIG); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_CONFIG) && - verifier.VerifyTable(config()) && - verifier.EndTable(); - } -}; - -struct PollDataFeedBuilder { - typedef PollDataFeed Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_config(flatbuffers::Offset config) { - fbb_.AddOffset(PollDataFeed::VT_CONFIG, config); - } - explicit PollDataFeedBuilder(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 CreatePollDataFeed( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset config = 0) { - PollDataFeedBuilder builder_(_fbb); - builder_.add_config(config); - return builder_.Finish(); -} - -/// Requests for the other party to send `data_feeds`. -/// For example, GUI requests for position data to be sent from server. -/// -/// When sending a new `StartFeed`, the old data feeds should stop being sent. -/// We still support multiple data feeds at the same time, because `data_feeds` -/// is a list. -/// -/// Multiple data feeds are useful to get data at different frequencies. -struct StartDataFeed FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StartDataFeedBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DATA_FEEDS = 4 - }; - const flatbuffers::Vector> *data_feeds() const { - return GetPointer> *>(VT_DATA_FEEDS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DATA_FEEDS) && - verifier.VerifyVector(data_feeds()) && - verifier.VerifyVectorOfTables(data_feeds()) && - verifier.EndTable(); - } -}; - -struct StartDataFeedBuilder { - typedef StartDataFeed Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_data_feeds(flatbuffers::Offset>> data_feeds) { - fbb_.AddOffset(StartDataFeed::VT_DATA_FEEDS, data_feeds); - } - explicit StartDataFeedBuilder(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 CreateStartDataFeed( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> data_feeds = 0) { - StartDataFeedBuilder builder_(_fbb); - builder_.add_data_feeds(data_feeds); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateStartDataFeedDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *data_feeds = nullptr) { - auto data_feeds__ = data_feeds ? _fbb.CreateVector>(*data_feeds) : 0; - return solarxr_protocol::data_feed::CreateStartDataFeed( - _fbb, - data_feeds__); -} - -/// All of the data components related to a single data feed. A data feed is comprised -/// of device data, and tracker data. -/// -/// A data feed might send data only when it changes/updates, and we should make no -/// assumptions that the data is actually delivered. If you want to guarantee -/// delivery and avoid dropped observations of data (such as a user-initiated -/// button press), it is better to use the RPC system. -struct DataFeedUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DataFeedUpdateBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DEVICES = 4, - VT_SYNTHETIC_TRACKERS = 6, - VT_BONES = 8 - }; - const flatbuffers::Vector> *devices() const { - return GetPointer> *>(VT_DEVICES); - } - const flatbuffers::Vector> *synthetic_trackers() const { - return GetPointer> *>(VT_SYNTHETIC_TRACKERS); - } - /// This must represent a set, where there is no more than one bone for a `BodyPart`. - const flatbuffers::Vector> *bones() const { - return GetPointer> *>(VT_BONES); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DEVICES) && - verifier.VerifyVector(devices()) && - verifier.VerifyVectorOfTables(devices()) && - VerifyOffset(verifier, VT_SYNTHETIC_TRACKERS) && - verifier.VerifyVector(synthetic_trackers()) && - verifier.VerifyVectorOfTables(synthetic_trackers()) && - VerifyOffset(verifier, VT_BONES) && - verifier.VerifyVector(bones()) && - verifier.VerifyVectorOfTables(bones()) && - verifier.EndTable(); - } -}; - -struct DataFeedUpdateBuilder { - typedef DataFeedUpdate Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_devices(flatbuffers::Offset>> devices) { - fbb_.AddOffset(DataFeedUpdate::VT_DEVICES, devices); - } - void add_synthetic_trackers(flatbuffers::Offset>> synthetic_trackers) { - fbb_.AddOffset(DataFeedUpdate::VT_SYNTHETIC_TRACKERS, synthetic_trackers); - } - void add_bones(flatbuffers::Offset>> bones) { - fbb_.AddOffset(DataFeedUpdate::VT_BONES, bones); - } - explicit DataFeedUpdateBuilder(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 CreateDataFeedUpdate( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> devices = 0, - flatbuffers::Offset>> synthetic_trackers = 0, - flatbuffers::Offset>> bones = 0) { - DataFeedUpdateBuilder builder_(_fbb); - builder_.add_bones(bones); - builder_.add_synthetic_trackers(synthetic_trackers); - builder_.add_devices(devices); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateDataFeedUpdateDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *devices = nullptr, - const std::vector> *synthetic_trackers = nullptr, - const std::vector> *bones = nullptr) { - auto devices__ = devices ? _fbb.CreateVector>(*devices) : 0; - auto synthetic_trackers__ = synthetic_trackers ? _fbb.CreateVector>(*synthetic_trackers) : 0; - auto bones__ = bones ? _fbb.CreateVector>(*bones) : 0; - return solarxr_protocol::data_feed::CreateDataFeedUpdate( - _fbb, - devices__, - synthetic_trackers__, - bones__); -} - -/// All information related to the configuration of a data feed. This may be sent -/// as part of a `StartFeed`. -struct DataFeedConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef DataFeedConfigBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_MINIMUM_TIME_SINCE_LAST = 4, - VT_DATA_MASK = 6, - VT_SYNTHETIC_TRACKERS_MASK = 8, - VT_BONE_MASK = 10 - }; - /// Minimum delay in milliseconds between new data updates. This value will be - /// ignored when used for a `PollDataFeed`. - uint16_t minimum_time_since_last() const { - return GetField(VT_MINIMUM_TIME_SINCE_LAST, 0); - } - const solarxr_protocol::data_feed::device_data::DeviceDataMask *data_mask() const { - return GetPointer(VT_DATA_MASK); - } - const solarxr_protocol::data_feed::tracker::TrackerDataMask *synthetic_trackers_mask() const { - return GetPointer(VT_SYNTHETIC_TRACKERS_MASK); - } - bool bone_mask() const { - return GetField(VT_BONE_MASK, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_MINIMUM_TIME_SINCE_LAST, 2) && - VerifyOffset(verifier, VT_DATA_MASK) && - verifier.VerifyTable(data_mask()) && - VerifyOffset(verifier, VT_SYNTHETIC_TRACKERS_MASK) && - verifier.VerifyTable(synthetic_trackers_mask()) && - VerifyField(verifier, VT_BONE_MASK, 1) && - verifier.EndTable(); - } -}; - -struct DataFeedConfigBuilder { - typedef DataFeedConfig Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_minimum_time_since_last(uint16_t minimum_time_since_last) { - fbb_.AddElement(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, minimum_time_since_last, 0); - } - void add_data_mask(flatbuffers::Offset data_mask) { - fbb_.AddOffset(DataFeedConfig::VT_DATA_MASK, data_mask); - } - void add_synthetic_trackers_mask(flatbuffers::Offset synthetic_trackers_mask) { - fbb_.AddOffset(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, synthetic_trackers_mask); - } - void add_bone_mask(bool bone_mask) { - fbb_.AddElement(DataFeedConfig::VT_BONE_MASK, static_cast(bone_mask), 0); - } - explicit DataFeedConfigBuilder(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 CreateDataFeedConfig( - flatbuffers::FlatBufferBuilder &_fbb, - uint16_t minimum_time_since_last = 0, - flatbuffers::Offset data_mask = 0, - flatbuffers::Offset synthetic_trackers_mask = 0, - bool bone_mask = false) { - DataFeedConfigBuilder builder_(_fbb); - builder_.add_synthetic_trackers_mask(synthetic_trackers_mask); - builder_.add_data_mask(data_mask); - builder_.add_minimum_time_since_last(minimum_time_since_last); - builder_.add_bone_mask(bone_mask); - return builder_.Finish(); -} - -} // namespace data_feed - -namespace rpc { -namespace settings { - -/// Settings for the skeletal model that are toggles. -struct ModelToggles FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ModelTogglesBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_EXTENDED_SPINE = 4, - VT_EXTENDED_PELVIS = 6, - VT_EXTENDED_KNEE = 8, - VT_FORCE_ARMS_FROM_HMD = 10, - VT_FLOOR_CLIP = 12, - VT_SKATING_CORRECTION = 14 - }; - flatbuffers::Optional extended_spine() const { - return GetOptional(VT_EXTENDED_SPINE); - } - flatbuffers::Optional extended_pelvis() const { - return GetOptional(VT_EXTENDED_PELVIS); - } - flatbuffers::Optional extended_knee() const { - return GetOptional(VT_EXTENDED_KNEE); - } - flatbuffers::Optional force_arms_from_hmd() const { - return GetOptional(VT_FORCE_ARMS_FROM_HMD); - } - flatbuffers::Optional floor_clip() const { - return GetOptional(VT_FLOOR_CLIP); - } - flatbuffers::Optional skating_correction() const { - return GetOptional(VT_SKATING_CORRECTION); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_EXTENDED_SPINE, 1) && - VerifyField(verifier, VT_EXTENDED_PELVIS, 1) && - VerifyField(verifier, VT_EXTENDED_KNEE, 1) && - VerifyField(verifier, VT_FORCE_ARMS_FROM_HMD, 1) && - VerifyField(verifier, VT_FLOOR_CLIP, 1) && - VerifyField(verifier, VT_SKATING_CORRECTION, 1) && - verifier.EndTable(); - } -}; - -struct ModelTogglesBuilder { - typedef ModelToggles Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_extended_spine(bool extended_spine) { - fbb_.AddElement(ModelToggles::VT_EXTENDED_SPINE, static_cast(extended_spine)); - } - void add_extended_pelvis(bool extended_pelvis) { - fbb_.AddElement(ModelToggles::VT_EXTENDED_PELVIS, static_cast(extended_pelvis)); - } - void add_extended_knee(bool extended_knee) { - fbb_.AddElement(ModelToggles::VT_EXTENDED_KNEE, static_cast(extended_knee)); - } - void add_force_arms_from_hmd(bool force_arms_from_hmd) { - fbb_.AddElement(ModelToggles::VT_FORCE_ARMS_FROM_HMD, static_cast(force_arms_from_hmd)); - } - void add_floor_clip(bool floor_clip) { - fbb_.AddElement(ModelToggles::VT_FLOOR_CLIP, static_cast(floor_clip)); - } - void add_skating_correction(bool skating_correction) { - fbb_.AddElement(ModelToggles::VT_SKATING_CORRECTION, static_cast(skating_correction)); - } - explicit ModelTogglesBuilder(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 CreateModelToggles( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional extended_spine = flatbuffers::nullopt, - flatbuffers::Optional extended_pelvis = flatbuffers::nullopt, - flatbuffers::Optional extended_knee = flatbuffers::nullopt, - flatbuffers::Optional force_arms_from_hmd = flatbuffers::nullopt, - flatbuffers::Optional floor_clip = flatbuffers::nullopt, - flatbuffers::Optional skating_correction = flatbuffers::nullopt) { - ModelTogglesBuilder builder_(_fbb); - if(skating_correction) { builder_.add_skating_correction(*skating_correction); } - if(floor_clip) { builder_.add_floor_clip(*floor_clip); } - if(force_arms_from_hmd) { builder_.add_force_arms_from_hmd(*force_arms_from_hmd); } - if(extended_knee) { builder_.add_extended_knee(*extended_knee); } - if(extended_pelvis) { builder_.add_extended_pelvis(*extended_pelvis); } - if(extended_spine) { builder_.add_extended_spine(*extended_spine); } - return builder_.Finish(); -} - -/// Settings for the skeletal model that are ratios. -/// These values range from 0 to 1. -struct ModelRatios FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ModelRatiosBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_IMPUTE_WAIST_FROM_CHEST_HIP = 4, - VT_IMPUTE_WAIST_FROM_CHEST_LEGS = 6, - VT_IMPUTE_HIP_FROM_CHEST_LEGS = 8, - VT_IMPUTE_HIP_FROM_WAIST_LEGS = 10, - VT_INTERP_HIP_LEGS = 12, - VT_INTERP_KNEE_TRACKER_ANKLE = 14 - }; - flatbuffers::Optional impute_waist_from_chest_hip() const { - return GetOptional(VT_IMPUTE_WAIST_FROM_CHEST_HIP); - } - flatbuffers::Optional impute_waist_from_chest_legs() const { - return GetOptional(VT_IMPUTE_WAIST_FROM_CHEST_LEGS); - } - flatbuffers::Optional impute_hip_from_chest_legs() const { - return GetOptional(VT_IMPUTE_HIP_FROM_CHEST_LEGS); - } - flatbuffers::Optional impute_hip_from_waist_legs() const { - return GetOptional(VT_IMPUTE_HIP_FROM_WAIST_LEGS); - } - /// Hip's yaw and roll is set to the average of legs when 1.0 - flatbuffers::Optional interp_hip_legs() const { - return GetOptional(VT_INTERP_HIP_LEGS); - } - /// Knee trackers' yaw and roll is set to the ankle's when 1.0 - flatbuffers::Optional interp_knee_tracker_ankle() const { - return GetOptional(VT_INTERP_KNEE_TRACKER_ANKLE); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_IMPUTE_WAIST_FROM_CHEST_HIP, 4) && - VerifyField(verifier, VT_IMPUTE_WAIST_FROM_CHEST_LEGS, 4) && - VerifyField(verifier, VT_IMPUTE_HIP_FROM_CHEST_LEGS, 4) && - VerifyField(verifier, VT_IMPUTE_HIP_FROM_WAIST_LEGS, 4) && - VerifyField(verifier, VT_INTERP_HIP_LEGS, 4) && - VerifyField(verifier, VT_INTERP_KNEE_TRACKER_ANKLE, 4) && - verifier.EndTable(); - } -}; - -struct ModelRatiosBuilder { - typedef ModelRatios Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_impute_waist_from_chest_hip(float impute_waist_from_chest_hip) { - fbb_.AddElement(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, impute_waist_from_chest_hip); - } - void add_impute_waist_from_chest_legs(float impute_waist_from_chest_legs) { - fbb_.AddElement(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, impute_waist_from_chest_legs); - } - void add_impute_hip_from_chest_legs(float impute_hip_from_chest_legs) { - fbb_.AddElement(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, impute_hip_from_chest_legs); - } - void add_impute_hip_from_waist_legs(float impute_hip_from_waist_legs) { - fbb_.AddElement(ModelRatios::VT_IMPUTE_HIP_FROM_WAIST_LEGS, impute_hip_from_waist_legs); - } - void add_interp_hip_legs(float interp_hip_legs) { - fbb_.AddElement(ModelRatios::VT_INTERP_HIP_LEGS, interp_hip_legs); - } - void add_interp_knee_tracker_ankle(float interp_knee_tracker_ankle) { - fbb_.AddElement(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, interp_knee_tracker_ankle); - } - explicit ModelRatiosBuilder(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 CreateModelRatios( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional impute_waist_from_chest_hip = flatbuffers::nullopt, - flatbuffers::Optional impute_waist_from_chest_legs = flatbuffers::nullopt, - flatbuffers::Optional impute_hip_from_chest_legs = flatbuffers::nullopt, - flatbuffers::Optional impute_hip_from_waist_legs = flatbuffers::nullopt, - flatbuffers::Optional interp_hip_legs = flatbuffers::nullopt, - flatbuffers::Optional interp_knee_tracker_ankle = flatbuffers::nullopt) { - ModelRatiosBuilder builder_(_fbb); - if(interp_knee_tracker_ankle) { builder_.add_interp_knee_tracker_ankle(*interp_knee_tracker_ankle); } - if(interp_hip_legs) { builder_.add_interp_hip_legs(*interp_hip_legs); } - if(impute_hip_from_waist_legs) { builder_.add_impute_hip_from_waist_legs(*impute_hip_from_waist_legs); } - if(impute_hip_from_chest_legs) { builder_.add_impute_hip_from_chest_legs(*impute_hip_from_chest_legs); } - if(impute_waist_from_chest_legs) { builder_.add_impute_waist_from_chest_legs(*impute_waist_from_chest_legs); } - if(impute_waist_from_chest_hip) { builder_.add_impute_waist_from_chest_hip(*impute_waist_from_chest_hip); } - return builder_.Finish(); -} - -/// Settings for the skeletal model. -struct ModelSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ModelSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TOGGLES = 4, - VT_RATIOS = 6 - }; - const solarxr_protocol::rpc::settings::ModelToggles *toggles() const { - return GetPointer(VT_TOGGLES); - } - const solarxr_protocol::rpc::settings::ModelRatios *ratios() const { - return GetPointer(VT_RATIOS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TOGGLES) && - verifier.VerifyTable(toggles()) && - VerifyOffset(verifier, VT_RATIOS) && - verifier.VerifyTable(ratios()) && - verifier.EndTable(); - } -}; - -struct ModelSettingsBuilder { - typedef ModelSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_toggles(flatbuffers::Offset toggles) { - fbb_.AddOffset(ModelSettings::VT_TOGGLES, toggles); - } - void add_ratios(flatbuffers::Offset ratios) { - fbb_.AddOffset(ModelSettings::VT_RATIOS, ratios); - } - explicit ModelSettingsBuilder(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 CreateModelSettings( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset toggles = 0, - flatbuffers::Offset ratios = 0) { - ModelSettingsBuilder builder_(_fbb); - builder_.add_ratios(ratios); - builder_.add_toggles(toggles); - return builder_.Finish(); -} - -} // namespace settings - -struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RpcMessageHeaderBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TX_ID = 4, - VT_MESSAGE_TYPE = 6, - VT_MESSAGE = 8 - }; - /// For a request, this identifies the request. For a response, this corresponds - /// to the request that it is responding to. - const solarxr_protocol::datatypes::TransactionId *tx_id() const { - return GetStruct(VT_TX_ID); - } - solarxr_protocol::rpc::RpcMessage message_type() const { - return static_cast(GetField(VT_MESSAGE_TYPE, 0)); - } - const void *message() const { - return GetPointer(VT_MESSAGE); - } - template const T *message_as() const; - const solarxr_protocol::rpc::HeartbeatRequest *message_as_HeartbeatRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::HeartbeatRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::HeartbeatResponse *message_as_HeartbeatResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::HeartbeatResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ResetRequest *message_as_ResetRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ResetRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AssignTrackerRequest *message_as_AssignTrackerRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AssignTrackerRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SettingsRequest *message_as_SettingsRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SettingsRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SettingsResponse *message_as_SettingsResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SettingsResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ChangeSettingsRequest *message_as_ChangeSettingsRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ChangeSettingsRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::RecordBVHRequest *message_as_RecordBVHRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::RecordBVHRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::RecordBVHStatus *message_as_RecordBVHStatus() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::RecordBVHStatus ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SkeletonConfigRequest *message_as_SkeletonConfigRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SkeletonConfigRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::ChangeSkeletonConfigRequest *message_as_ChangeSkeletonConfigRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::ChangeSkeletonConfigRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SkeletonResetAllRequest *message_as_SkeletonResetAllRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SkeletonResetAllRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SkeletonConfigResponse *message_as_SkeletonConfigResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SkeletonConfigResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::OpenSerialRequest *message_as_OpenSerialRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::OpenSerialRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::CloseSerialRequest *message_as_CloseSerialRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::CloseSerialRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SetWifiRequest *message_as_SetWifiRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SetWifiRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SerialUpdateResponse *message_as_SerialUpdateResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialUpdateResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AutoBoneProcessRequest *message_as_AutoBoneProcessRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneProcessRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AutoBoneProcessStatusResponse *message_as_AutoBoneProcessStatusResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneProcessStatusResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::AutoBoneEpochResponse *message_as_AutoBoneEpochResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneEpochResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::OverlayDisplayModeRequest *message_as_OverlayDisplayModeRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::OverlayDisplayModeChangeRequest *message_as_OverlayDisplayModeChangeRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeChangeRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::OverlayDisplayModeResponse *message_as_OverlayDisplayModeResponse() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeResponse ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SerialTrackerRebootRequest *message_as_SerialTrackerRebootRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerRebootRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SerialTrackerGetInfoRequest *message_as_SerialTrackerGetInfoRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetInfoRequest ? static_cast(message()) : nullptr; - } - const solarxr_protocol::rpc::SerialTrackerFactoryResetRequest *message_as_SerialTrackerFactoryResetRequest() const { - return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerFactoryResetRequest ? static_cast(message()) : nullptr; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TX_ID, 4) && - VerifyField(verifier, VT_MESSAGE_TYPE, 1) && - VerifyOffset(verifier, VT_MESSAGE) && - VerifyRpcMessage(verifier, message(), message_type()) && - verifier.EndTable(); - } -}; - -template<> inline const solarxr_protocol::rpc::HeartbeatRequest *RpcMessageHeader::message_as() const { - return message_as_HeartbeatRequest(); -} - -template<> inline const solarxr_protocol::rpc::HeartbeatResponse *RpcMessageHeader::message_as() const { - return message_as_HeartbeatResponse(); -} - -template<> inline const solarxr_protocol::rpc::ResetRequest *RpcMessageHeader::message_as() const { - return message_as_ResetRequest(); -} - -template<> inline const solarxr_protocol::rpc::AssignTrackerRequest *RpcMessageHeader::message_as() const { - return message_as_AssignTrackerRequest(); -} - -template<> inline const solarxr_protocol::rpc::SettingsRequest *RpcMessageHeader::message_as() const { - return message_as_SettingsRequest(); -} - -template<> inline const solarxr_protocol::rpc::SettingsResponse *RpcMessageHeader::message_as() const { - return message_as_SettingsResponse(); -} - -template<> inline const solarxr_protocol::rpc::ChangeSettingsRequest *RpcMessageHeader::message_as() const { - return message_as_ChangeSettingsRequest(); -} - -template<> inline const solarxr_protocol::rpc::RecordBVHRequest *RpcMessageHeader::message_as() const { - return message_as_RecordBVHRequest(); -} - -template<> inline const solarxr_protocol::rpc::RecordBVHStatus *RpcMessageHeader::message_as() const { - return message_as_RecordBVHStatus(); -} - -template<> inline const solarxr_protocol::rpc::SkeletonConfigRequest *RpcMessageHeader::message_as() const { - return message_as_SkeletonConfigRequest(); -} - -template<> inline const solarxr_protocol::rpc::ChangeSkeletonConfigRequest *RpcMessageHeader::message_as() const { - return message_as_ChangeSkeletonConfigRequest(); -} - -template<> inline const solarxr_protocol::rpc::SkeletonResetAllRequest *RpcMessageHeader::message_as() const { - return message_as_SkeletonResetAllRequest(); -} - -template<> inline const solarxr_protocol::rpc::SkeletonConfigResponse *RpcMessageHeader::message_as() const { - return message_as_SkeletonConfigResponse(); -} - -template<> inline const solarxr_protocol::rpc::OpenSerialRequest *RpcMessageHeader::message_as() const { - return message_as_OpenSerialRequest(); -} - -template<> inline const solarxr_protocol::rpc::CloseSerialRequest *RpcMessageHeader::message_as() const { - return message_as_CloseSerialRequest(); -} - -template<> inline const solarxr_protocol::rpc::SetWifiRequest *RpcMessageHeader::message_as() const { - return message_as_SetWifiRequest(); -} - -template<> inline const solarxr_protocol::rpc::SerialUpdateResponse *RpcMessageHeader::message_as() const { - return message_as_SerialUpdateResponse(); -} - -template<> inline const solarxr_protocol::rpc::AutoBoneProcessRequest *RpcMessageHeader::message_as() const { - return message_as_AutoBoneProcessRequest(); -} - -template<> inline const solarxr_protocol::rpc::AutoBoneProcessStatusResponse *RpcMessageHeader::message_as() const { - return message_as_AutoBoneProcessStatusResponse(); -} - -template<> inline const solarxr_protocol::rpc::AutoBoneEpochResponse *RpcMessageHeader::message_as() const { - return message_as_AutoBoneEpochResponse(); -} - -template<> inline const solarxr_protocol::rpc::OverlayDisplayModeRequest *RpcMessageHeader::message_as() const { - return message_as_OverlayDisplayModeRequest(); -} - -template<> inline const solarxr_protocol::rpc::OverlayDisplayModeChangeRequest *RpcMessageHeader::message_as() const { - return message_as_OverlayDisplayModeChangeRequest(); -} - -template<> inline const solarxr_protocol::rpc::OverlayDisplayModeResponse *RpcMessageHeader::message_as() const { - return message_as_OverlayDisplayModeResponse(); -} - -template<> inline const solarxr_protocol::rpc::SerialTrackerRebootRequest *RpcMessageHeader::message_as() const { - return message_as_SerialTrackerRebootRequest(); -} - -template<> inline const solarxr_protocol::rpc::SerialTrackerGetInfoRequest *RpcMessageHeader::message_as() const { - return message_as_SerialTrackerGetInfoRequest(); -} - -template<> inline const solarxr_protocol::rpc::SerialTrackerFactoryResetRequest *RpcMessageHeader::message_as() const { - return message_as_SerialTrackerFactoryResetRequest(); -} - -struct RpcMessageHeaderBuilder { - typedef RpcMessageHeader Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tx_id(const solarxr_protocol::datatypes::TransactionId *tx_id) { - fbb_.AddStruct(RpcMessageHeader::VT_TX_ID, tx_id); - } - void add_message_type(solarxr_protocol::rpc::RpcMessage message_type) { - fbb_.AddElement(RpcMessageHeader::VT_MESSAGE_TYPE, static_cast(message_type), 0); - } - void add_message(flatbuffers::Offset message) { - fbb_.AddOffset(RpcMessageHeader::VT_MESSAGE, message); - } - explicit RpcMessageHeaderBuilder(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 CreateRpcMessageHeader( - flatbuffers::FlatBufferBuilder &_fbb, - const solarxr_protocol::datatypes::TransactionId *tx_id = nullptr, - solarxr_protocol::rpc::RpcMessage message_type = solarxr_protocol::rpc::RpcMessage::NONE, - flatbuffers::Offset message = 0) { - RpcMessageHeaderBuilder builder_(_fbb); - builder_.add_message(message); - builder_.add_tx_id(tx_id); - builder_.add_message_type(message_type); - return builder_.Finish(); -} - -struct HeartbeatRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef HeartbeatRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct HeartbeatRequestBuilder { - typedef HeartbeatRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit HeartbeatRequestBuilder(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 CreateHeartbeatRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - HeartbeatRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct HeartbeatResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef HeartbeatResponseBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct HeartbeatResponseBuilder { - typedef HeartbeatResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit HeartbeatResponseBuilder(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 CreateHeartbeatResponse( - flatbuffers::FlatBufferBuilder &_fbb) { - HeartbeatResponseBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct ResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ResetRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RESET_TYPE = 4 - }; - solarxr_protocol::rpc::ResetType reset_type() const { - return static_cast(GetField(VT_RESET_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_RESET_TYPE, 1) && - verifier.EndTable(); - } -}; - -struct ResetRequestBuilder { - typedef ResetRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_reset_type(solarxr_protocol::rpc::ResetType reset_type) { - fbb_.AddElement(ResetRequest::VT_RESET_TYPE, static_cast(reset_type), 0); - } - explicit ResetRequestBuilder(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 CreateResetRequest( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::ResetType reset_type = solarxr_protocol::rpc::ResetType::Quick) { - ResetRequestBuilder builder_(_fbb); - builder_.add_reset_type(reset_type); - return builder_.Finish(); -} - -struct ResetResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ResetResponseBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct ResetResponseBuilder { - typedef ResetResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit ResetResponseBuilder(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 CreateResetResponse( - flatbuffers::FlatBufferBuilder &_fbb) { - ResetResponseBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct AssignTrackerRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AssignTrackerRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TRACKER_ID = 4, - VT_BODY_POSITION = 6, - VT_MOUNTING_ROTATION = 8, - VT_DISPLAY_NAME = 10 - }; - const solarxr_protocol::datatypes::TrackerId *tracker_id() const { - return GetPointer(VT_TRACKER_ID); - } - solarxr_protocol::datatypes::BodyPart body_position() const { - return static_cast(GetField(VT_BODY_POSITION, 0)); - } - const solarxr_protocol::datatypes::math::Quat *mounting_rotation() const { - return GetStruct(VT_MOUNTING_ROTATION); - } - const flatbuffers::String *display_name() const { - return GetPointer(VT_DISPLAY_NAME); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_TRACKER_ID) && - verifier.VerifyTable(tracker_id()) && - VerifyField(verifier, VT_BODY_POSITION, 1) && - VerifyField(verifier, VT_MOUNTING_ROTATION, 4) && - VerifyOffset(verifier, VT_DISPLAY_NAME) && - verifier.VerifyString(display_name()) && - verifier.EndTable(); - } -}; - -struct AssignTrackerRequestBuilder { - typedef AssignTrackerRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_tracker_id(flatbuffers::Offset tracker_id) { - fbb_.AddOffset(AssignTrackerRequest::VT_TRACKER_ID, tracker_id); - } - void add_body_position(solarxr_protocol::datatypes::BodyPart body_position) { - fbb_.AddElement(AssignTrackerRequest::VT_BODY_POSITION, static_cast(body_position), 0); - } - void add_mounting_rotation(const solarxr_protocol::datatypes::math::Quat *mounting_rotation) { - fbb_.AddStruct(AssignTrackerRequest::VT_MOUNTING_ROTATION, mounting_rotation); - } - void add_display_name(flatbuffers::Offset display_name) { - fbb_.AddOffset(AssignTrackerRequest::VT_DISPLAY_NAME, display_name); - } - explicit AssignTrackerRequestBuilder(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 CreateAssignTrackerRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0, - solarxr_protocol::datatypes::BodyPart body_position = solarxr_protocol::datatypes::BodyPart::NONE, - const solarxr_protocol::datatypes::math::Quat *mounting_rotation = nullptr, - flatbuffers::Offset display_name = 0) { - AssignTrackerRequestBuilder builder_(_fbb); - builder_.add_display_name(display_name); - builder_.add_mounting_rotation(mounting_rotation); - builder_.add_tracker_id(tracker_id); - builder_.add_body_position(body_position); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateAssignTrackerRequestDirect( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset tracker_id = 0, - solarxr_protocol::datatypes::BodyPart body_position = solarxr_protocol::datatypes::BodyPart::NONE, - const solarxr_protocol::datatypes::math::Quat *mounting_rotation = nullptr, - const char *display_name = nullptr) { - auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; - return solarxr_protocol::rpc::CreateAssignTrackerRequest( - _fbb, - tracker_id, - body_position, - mounting_rotation, - display_name__); -} - -struct SettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SettingsRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SettingsRequestBuilder { - typedef SettingsRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SettingsRequestBuilder(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 CreateSettingsRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SettingsRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SettingsResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STEAM_VR_TRACKERS = 4, - VT_FILTERING = 6, - VT_MODEL_SETTINGS = 8 - }; - const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { - return GetPointer(VT_STEAM_VR_TRACKERS); - } - const solarxr_protocol::rpc::FilteringSettings *filtering() const { - return GetPointer(VT_FILTERING); - } - const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { - return GetPointer(VT_MODEL_SETTINGS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && - verifier.VerifyTable(steam_vr_trackers()) && - VerifyOffset(verifier, VT_FILTERING) && - verifier.VerifyTable(filtering()) && - VerifyOffset(verifier, VT_MODEL_SETTINGS) && - verifier.VerifyTable(model_settings()) && - verifier.EndTable(); - } -}; - -struct SettingsResponseBuilder { - typedef SettingsResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_steam_vr_trackers(flatbuffers::Offset steam_vr_trackers) { - fbb_.AddOffset(SettingsResponse::VT_STEAM_VR_TRACKERS, steam_vr_trackers); - } - void add_filtering(flatbuffers::Offset filtering) { - fbb_.AddOffset(SettingsResponse::VT_FILTERING, filtering); - } - void add_model_settings(flatbuffers::Offset model_settings) { - fbb_.AddOffset(SettingsResponse::VT_MODEL_SETTINGS, model_settings); - } - explicit SettingsResponseBuilder(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 CreateSettingsResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset steam_vr_trackers = 0, - flatbuffers::Offset filtering = 0, - flatbuffers::Offset model_settings = 0) { - SettingsResponseBuilder builder_(_fbb); - builder_.add_model_settings(model_settings); - builder_.add_filtering(filtering); - builder_.add_steam_vr_trackers(steam_vr_trackers); - return builder_.Finish(); -} - -struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ChangeSettingsRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STEAM_VR_TRACKERS = 4, - VT_FILTERING = 6, - VT_MODEL_SETTINGS = 8 - }; - const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { - return GetPointer(VT_STEAM_VR_TRACKERS); - } - const solarxr_protocol::rpc::FilteringSettings *filtering() const { - return GetPointer(VT_FILTERING); - } - const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { - return GetPointer(VT_MODEL_SETTINGS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && - verifier.VerifyTable(steam_vr_trackers()) && - VerifyOffset(verifier, VT_FILTERING) && - verifier.VerifyTable(filtering()) && - VerifyOffset(verifier, VT_MODEL_SETTINGS) && - verifier.VerifyTable(model_settings()) && - verifier.EndTable(); - } -}; - -struct ChangeSettingsRequestBuilder { - typedef ChangeSettingsRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_steam_vr_trackers(flatbuffers::Offset steam_vr_trackers) { - fbb_.AddOffset(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, steam_vr_trackers); - } - void add_filtering(flatbuffers::Offset filtering) { - fbb_.AddOffset(ChangeSettingsRequest::VT_FILTERING, filtering); - } - void add_model_settings(flatbuffers::Offset model_settings) { - fbb_.AddOffset(ChangeSettingsRequest::VT_MODEL_SETTINGS, model_settings); - } - explicit ChangeSettingsRequestBuilder(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 CreateChangeSettingsRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset steam_vr_trackers = 0, - flatbuffers::Offset filtering = 0, - flatbuffers::Offset model_settings = 0) { - ChangeSettingsRequestBuilder builder_(_fbb); - builder_.add_model_settings(model_settings); - builder_.add_filtering(filtering); - builder_.add_steam_vr_trackers(steam_vr_trackers); - return builder_.Finish(); -} - -struct SteamVRTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SteamVRTrackersSettingBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_WAIST = 4, - VT_CHEST = 6, - VT_LEGS = 8, - VT_KNEES = 10, - VT_ELBOWS = 12 - }; - bool waist() const { - return GetField(VT_WAIST, 0) != 0; - } - bool chest() const { - return GetField(VT_CHEST, 0) != 0; - } - bool legs() const { - return GetField(VT_LEGS, 0) != 0; - } - bool knees() const { - return GetField(VT_KNEES, 0) != 0; - } - bool elbows() const { - return GetField(VT_ELBOWS, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_WAIST, 1) && - VerifyField(verifier, VT_CHEST, 1) && - VerifyField(verifier, VT_LEGS, 1) && - VerifyField(verifier, VT_KNEES, 1) && - VerifyField(verifier, VT_ELBOWS, 1) && - verifier.EndTable(); - } -}; - -struct SteamVRTrackersSettingBuilder { - typedef SteamVRTrackersSetting Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_waist(bool waist) { - fbb_.AddElement(SteamVRTrackersSetting::VT_WAIST, static_cast(waist), 0); - } - void add_chest(bool chest) { - fbb_.AddElement(SteamVRTrackersSetting::VT_CHEST, static_cast(chest), 0); - } - void add_legs(bool legs) { - fbb_.AddElement(SteamVRTrackersSetting::VT_LEGS, static_cast(legs), 0); - } - void add_knees(bool knees) { - fbb_.AddElement(SteamVRTrackersSetting::VT_KNEES, static_cast(knees), 0); - } - void add_elbows(bool elbows) { - fbb_.AddElement(SteamVRTrackersSetting::VT_ELBOWS, static_cast(elbows), 0); - } - explicit SteamVRTrackersSettingBuilder(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 CreateSteamVRTrackersSetting( - flatbuffers::FlatBufferBuilder &_fbb, - bool waist = false, - bool chest = false, - bool legs = false, - bool knees = false, - bool elbows = false) { - SteamVRTrackersSettingBuilder builder_(_fbb); - builder_.add_elbows(elbows); - builder_.add_knees(knees); - builder_.add_legs(legs); - builder_.add_chest(chest); - builder_.add_waist(waist); - return builder_.Finish(); -} - -struct FilteringSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef FilteringSettingsBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TYPE = 4, - VT_AMOUNT = 6 - }; - solarxr_protocol::datatypes::FilteringType type() const { - return static_cast(GetField(VT_TYPE, 0)); - } - /// 0 to 1. A higher value results in more smoothing or prediction - float amount() const { - return GetField(VT_AMOUNT, 0.0f); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TYPE, 1) && - VerifyField(verifier, VT_AMOUNT, 4) && - verifier.EndTable(); - } -}; - -struct FilteringSettingsBuilder { - typedef FilteringSettings Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_type(solarxr_protocol::datatypes::FilteringType type) { - fbb_.AddElement(FilteringSettings::VT_TYPE, static_cast(type), 0); - } - void add_amount(float amount) { - fbb_.AddElement(FilteringSettings::VT_AMOUNT, amount, 0.0f); - } - explicit FilteringSettingsBuilder(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 CreateFilteringSettings( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::datatypes::FilteringType type = solarxr_protocol::datatypes::FilteringType::NONE, - float amount = 0.0f) { - FilteringSettingsBuilder builder_(_fbb); - builder_.add_amount(amount); - builder_.add_type(type); - return builder_.Finish(); -} - -struct RecordBVHRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RecordBVHRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_STOP = 4 - }; - bool stop() const { - return GetField(VT_STOP, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_STOP, 1) && - verifier.EndTable(); - } -}; - -struct RecordBVHRequestBuilder { - typedef RecordBVHRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_stop(bool stop) { - fbb_.AddElement(RecordBVHRequest::VT_STOP, static_cast(stop), 0); - } - explicit RecordBVHRequestBuilder(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 CreateRecordBVHRequest( - flatbuffers::FlatBufferBuilder &_fbb, - bool stop = false) { - RecordBVHRequestBuilder builder_(_fbb); - builder_.add_stop(stop); - return builder_.Finish(); -} - -struct RecordBVHStatus FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef RecordBVHStatusBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_RECORDING = 4 - }; - bool recording() const { - return GetField(VT_RECORDING, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_RECORDING, 1) && - verifier.EndTable(); - } -}; - -struct RecordBVHStatusBuilder { - typedef RecordBVHStatus Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_recording(bool recording) { - fbb_.AddElement(RecordBVHStatus::VT_RECORDING, static_cast(recording), 0); - } - explicit RecordBVHStatusBuilder(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 CreateRecordBVHStatus( - flatbuffers::FlatBufferBuilder &_fbb, - bool recording = false) { - RecordBVHStatusBuilder builder_(_fbb); - builder_.add_recording(recording); - return builder_.Finish(); -} - -struct SkeletonPart FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SkeletonPartBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BONE = 4, - VT_VALUE = 6 - }; - solarxr_protocol::rpc::SkeletonBone bone() const { - return static_cast(GetField(VT_BONE, 0)); - } - float value() const { - return GetField(VT_VALUE, 0.0f); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BONE, 1) && - VerifyField(verifier, VT_VALUE, 4) && - verifier.EndTable(); - } -}; - -struct SkeletonPartBuilder { - typedef SkeletonPart Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_bone(solarxr_protocol::rpc::SkeletonBone bone) { - fbb_.AddElement(SkeletonPart::VT_BONE, static_cast(bone), 0); - } - void add_value(float value) { - fbb_.AddElement(SkeletonPart::VT_VALUE, value, 0.0f); - } - explicit SkeletonPartBuilder(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 CreateSkeletonPart( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::SkeletonBone bone = solarxr_protocol::rpc::SkeletonBone::NONE, - float value = 0.0f) { - SkeletonPartBuilder builder_(_fbb); - builder_.add_value(value); - builder_.add_bone(bone); - return builder_.Finish(); -} - -struct SkeletonConfigRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SkeletonConfigRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SkeletonConfigRequestBuilder { - typedef SkeletonConfigRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SkeletonConfigRequestBuilder(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 CreateSkeletonConfigRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SkeletonConfigRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct SkeletonConfigResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SkeletonConfigResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SKELETON_PARTS = 4 - }; - const flatbuffers::Vector> *skeleton_parts() const { - return GetPointer> *>(VT_SKELETON_PARTS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_SKELETON_PARTS) && - verifier.VerifyVector(skeleton_parts()) && - verifier.VerifyVectorOfTables(skeleton_parts()) && - verifier.EndTable(); - } -}; - -struct SkeletonConfigResponseBuilder { - typedef SkeletonConfigResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_skeleton_parts(flatbuffers::Offset>> skeleton_parts) { - fbb_.AddOffset(SkeletonConfigResponse::VT_SKELETON_PARTS, skeleton_parts); - } - explicit SkeletonConfigResponseBuilder(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 CreateSkeletonConfigResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> skeleton_parts = 0) { - SkeletonConfigResponseBuilder builder_(_fbb); - builder_.add_skeleton_parts(skeleton_parts); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSkeletonConfigResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *skeleton_parts = nullptr) { - auto skeleton_parts__ = skeleton_parts ? _fbb.CreateVector>(*skeleton_parts) : 0; - return solarxr_protocol::rpc::CreateSkeletonConfigResponse( - _fbb, - skeleton_parts__); -} - -struct SkeletonResetAllRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SkeletonResetAllRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SkeletonResetAllRequestBuilder { - typedef SkeletonResetAllRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SkeletonResetAllRequestBuilder(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 CreateSkeletonResetAllRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SkeletonResetAllRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct ChangeSkeletonConfigRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef ChangeSkeletonConfigRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_BONE = 4, - VT_VALUE = 6 - }; - solarxr_protocol::rpc::SkeletonBone bone() const { - return static_cast(GetField(VT_BONE, 0)); - } - float value() const { - return GetField(VT_VALUE, 0.0f); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_BONE, 1) && - VerifyField(verifier, VT_VALUE, 4) && - verifier.EndTable(); - } -}; - -struct ChangeSkeletonConfigRequestBuilder { - typedef ChangeSkeletonConfigRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_bone(solarxr_protocol::rpc::SkeletonBone bone) { - fbb_.AddElement(ChangeSkeletonConfigRequest::VT_BONE, static_cast(bone), 0); - } - void add_value(float value) { - fbb_.AddElement(ChangeSkeletonConfigRequest::VT_VALUE, value, 0.0f); - } - explicit ChangeSkeletonConfigRequestBuilder(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 CreateChangeSkeletonConfigRequest( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::SkeletonBone bone = solarxr_protocol::rpc::SkeletonBone::NONE, - float value = 0.0f) { - ChangeSkeletonConfigRequestBuilder builder_(_fbb); - builder_.add_value(value); - builder_.add_bone(bone); - return builder_.Finish(); -} - -struct OpenSerialRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OpenSerialRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct OpenSerialRequestBuilder { - typedef OpenSerialRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit OpenSerialRequestBuilder(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 CreateOpenSerialRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - OpenSerialRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct CloseSerialRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef CloseSerialRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct CloseSerialRequestBuilder { - typedef CloseSerialRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit CloseSerialRequestBuilder(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 CreateCloseSerialRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - CloseSerialRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct SetWifiRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SetWifiRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_SSID = 4, - VT_PASSWORD = 6 - }; - const flatbuffers::String *ssid() const { - return GetPointer(VT_SSID); - } - const flatbuffers::String *password() const { - return GetPointer(VT_PASSWORD); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_SSID) && - verifier.VerifyString(ssid()) && - VerifyOffset(verifier, VT_PASSWORD) && - verifier.VerifyString(password()) && - verifier.EndTable(); - } -}; - -struct SetWifiRequestBuilder { - typedef SetWifiRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_ssid(flatbuffers::Offset ssid) { - fbb_.AddOffset(SetWifiRequest::VT_SSID, ssid); - } - void add_password(flatbuffers::Offset password) { - fbb_.AddOffset(SetWifiRequest::VT_PASSWORD, password); - } - explicit SetWifiRequestBuilder(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 CreateSetWifiRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset ssid = 0, - flatbuffers::Offset password = 0) { - SetWifiRequestBuilder builder_(_fbb); - builder_.add_password(password); - builder_.add_ssid(ssid); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSetWifiRequestDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *ssid = nullptr, - const char *password = nullptr) { - auto ssid__ = ssid ? _fbb.CreateString(ssid) : 0; - auto password__ = password ? _fbb.CreateString(password) : 0; - return solarxr_protocol::rpc::CreateSetWifiRequest( - _fbb, - ssid__, - password__); -} - -struct SerialUpdateResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialUpdateResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_LOG = 4, - VT_CLOSED = 6 - }; - const flatbuffers::String *log() const { - return GetPointer(VT_LOG); - } - bool closed() const { - return GetField(VT_CLOSED, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_LOG) && - verifier.VerifyString(log()) && - VerifyField(verifier, VT_CLOSED, 1) && - verifier.EndTable(); - } -}; - -struct SerialUpdateResponseBuilder { - typedef SerialUpdateResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_log(flatbuffers::Offset log) { - fbb_.AddOffset(SerialUpdateResponse::VT_LOG, log); - } - void add_closed(bool closed) { - fbb_.AddElement(SerialUpdateResponse::VT_CLOSED, static_cast(closed), 0); - } - explicit SerialUpdateResponseBuilder(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 CreateSerialUpdateResponse( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset log = 0, - bool closed = false) { - SerialUpdateResponseBuilder builder_(_fbb); - builder_.add_log(log); - builder_.add_closed(closed); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateSerialUpdateResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const char *log = nullptr, - bool closed = false) { - auto log__ = log ? _fbb.CreateString(log) : 0; - return solarxr_protocol::rpc::CreateSerialUpdateResponse( - _fbb, - log__, - closed); -} - -/// Reboots the tracker connected to the serial monitor -struct SerialTrackerRebootRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialTrackerRebootRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SerialTrackerRebootRequestBuilder { - typedef SerialTrackerRebootRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SerialTrackerRebootRequestBuilder(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 CreateSerialTrackerRebootRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SerialTrackerRebootRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Sends the GET INFO cmd to the current tracker on the serial monitor -struct SerialTrackerGetInfoRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialTrackerGetInfoRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SerialTrackerGetInfoRequestBuilder { - typedef SerialTrackerGetInfoRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SerialTrackerGetInfoRequestBuilder(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 CreateSerialTrackerGetInfoRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SerialTrackerGetInfoRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Sends the FRST cmd to the currently over the Serial Montior connected Tracker -struct SerialTrackerFactoryResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SerialTrackerFactoryResetRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct SerialTrackerFactoryResetRequestBuilder { - typedef SerialTrackerFactoryResetRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit SerialTrackerFactoryResetRequestBuilder(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 CreateSerialTrackerFactoryResetRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - SerialTrackerFactoryResetRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -struct AutoBoneProcessRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneProcessRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_PROCESS_TYPE = 4 - }; - solarxr_protocol::rpc::AutoBoneProcessType process_type() const { - return static_cast(GetField(VT_PROCESS_TYPE, 0)); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_PROCESS_TYPE, 1) && - verifier.EndTable(); - } -}; - -struct AutoBoneProcessRequestBuilder { - typedef AutoBoneProcessRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_process_type(solarxr_protocol::rpc::AutoBoneProcessType process_type) { - fbb_.AddElement(AutoBoneProcessRequest::VT_PROCESS_TYPE, static_cast(process_type), 0); - } - explicit AutoBoneProcessRequestBuilder(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 CreateAutoBoneProcessRequest( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::AutoBoneProcessType process_type = solarxr_protocol::rpc::AutoBoneProcessType::NONE) { - AutoBoneProcessRequestBuilder builder_(_fbb); - builder_.add_process_type(process_type); - return builder_.Finish(); -} - -struct AutoBoneProcessStatusResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneProcessStatusResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_PROCESS_TYPE = 4, - VT_MESSAGE = 6, - VT_CURRENT = 8, - VT_TOTAL = 10, - VT_COMPLETED = 12, - VT_SUCCESS = 14 - }; - solarxr_protocol::rpc::AutoBoneProcessType process_type() const { - return static_cast(GetField(VT_PROCESS_TYPE, 0)); - } - const flatbuffers::String *message() const { - return GetPointer(VT_MESSAGE); - } - uint32_t current() const { - return GetField(VT_CURRENT, 0); - } - uint32_t total() const { - return GetField(VT_TOTAL, 0); - } - bool completed() const { - return GetField(VT_COMPLETED, 0) != 0; - } - bool success() const { - return GetField(VT_SUCCESS, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_PROCESS_TYPE, 1) && - VerifyOffset(verifier, VT_MESSAGE) && - verifier.VerifyString(message()) && - VerifyField(verifier, VT_CURRENT, 4) && - VerifyField(verifier, VT_TOTAL, 4) && - VerifyField(verifier, VT_COMPLETED, 1) && - VerifyField(verifier, VT_SUCCESS, 1) && - verifier.EndTable(); - } -}; - -struct AutoBoneProcessStatusResponseBuilder { - typedef AutoBoneProcessStatusResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_process_type(solarxr_protocol::rpc::AutoBoneProcessType process_type) { - fbb_.AddElement(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, static_cast(process_type), 0); - } - void add_message(flatbuffers::Offset message) { - fbb_.AddOffset(AutoBoneProcessStatusResponse::VT_MESSAGE, message); - } - void add_current(uint32_t current) { - fbb_.AddElement(AutoBoneProcessStatusResponse::VT_CURRENT, current, 0); - } - void add_total(uint32_t total) { - fbb_.AddElement(AutoBoneProcessStatusResponse::VT_TOTAL, total, 0); - } - void add_completed(bool completed) { - fbb_.AddElement(AutoBoneProcessStatusResponse::VT_COMPLETED, static_cast(completed), 0); - } - void add_success(bool success) { - fbb_.AddElement(AutoBoneProcessStatusResponse::VT_SUCCESS, static_cast(success), 0); - } - explicit AutoBoneProcessStatusResponseBuilder(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 CreateAutoBoneProcessStatusResponse( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::AutoBoneProcessType process_type = solarxr_protocol::rpc::AutoBoneProcessType::NONE, - flatbuffers::Offset message = 0, - uint32_t current = 0, - uint32_t total = 0, - bool completed = false, - bool success = false) { - AutoBoneProcessStatusResponseBuilder builder_(_fbb); - builder_.add_total(total); - builder_.add_current(current); - builder_.add_message(message); - builder_.add_success(success); - builder_.add_completed(completed); - builder_.add_process_type(process_type); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateAutoBoneProcessStatusResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::rpc::AutoBoneProcessType process_type = solarxr_protocol::rpc::AutoBoneProcessType::NONE, - const char *message = nullptr, - uint32_t current = 0, - uint32_t total = 0, - bool completed = false, - bool success = false) { - auto message__ = message ? _fbb.CreateString(message) : 0; - return solarxr_protocol::rpc::CreateAutoBoneProcessStatusResponse( - _fbb, - process_type, - message__, - current, - total, - completed, - success); -} - -struct AutoBoneEpochResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef AutoBoneEpochResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_CURRENT_EPOCH = 4, - VT_TOTAL_EPOCHS = 6, - VT_EPOCH_ERROR = 8, - VT_ADJUSTED_SKELETON_PARTS = 10 - }; - uint32_t current_epoch() const { - return GetField(VT_CURRENT_EPOCH, 0); - } - uint32_t total_epochs() const { - return GetField(VT_TOTAL_EPOCHS, 0); - } - float epoch_error() const { - return GetField(VT_EPOCH_ERROR, 0.0f); - } - const flatbuffers::Vector> *adjusted_skeleton_parts() const { - return GetPointer> *>(VT_ADJUSTED_SKELETON_PARTS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_CURRENT_EPOCH, 4) && - VerifyField(verifier, VT_TOTAL_EPOCHS, 4) && - VerifyField(verifier, VT_EPOCH_ERROR, 4) && - VerifyOffset(verifier, VT_ADJUSTED_SKELETON_PARTS) && - verifier.VerifyVector(adjusted_skeleton_parts()) && - verifier.VerifyVectorOfTables(adjusted_skeleton_parts()) && - verifier.EndTable(); - } -}; - -struct AutoBoneEpochResponseBuilder { - typedef AutoBoneEpochResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_current_epoch(uint32_t current_epoch) { - fbb_.AddElement(AutoBoneEpochResponse::VT_CURRENT_EPOCH, current_epoch, 0); - } - void add_total_epochs(uint32_t total_epochs) { - fbb_.AddElement(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, total_epochs, 0); - } - void add_epoch_error(float epoch_error) { - fbb_.AddElement(AutoBoneEpochResponse::VT_EPOCH_ERROR, epoch_error, 0.0f); - } - void add_adjusted_skeleton_parts(flatbuffers::Offset>> adjusted_skeleton_parts) { - fbb_.AddOffset(AutoBoneEpochResponse::VT_ADJUSTED_SKELETON_PARTS, adjusted_skeleton_parts); - } - explicit AutoBoneEpochResponseBuilder(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 CreateAutoBoneEpochResponse( - flatbuffers::FlatBufferBuilder &_fbb, - uint32_t current_epoch = 0, - uint32_t total_epochs = 0, - float epoch_error = 0.0f, - flatbuffers::Offset>> adjusted_skeleton_parts = 0) { - AutoBoneEpochResponseBuilder builder_(_fbb); - builder_.add_adjusted_skeleton_parts(adjusted_skeleton_parts); - builder_.add_epoch_error(epoch_error); - builder_.add_total_epochs(total_epochs); - builder_.add_current_epoch(current_epoch); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateAutoBoneEpochResponseDirect( - flatbuffers::FlatBufferBuilder &_fbb, - uint32_t current_epoch = 0, - uint32_t total_epochs = 0, - float epoch_error = 0.0f, - const std::vector> *adjusted_skeleton_parts = nullptr) { - auto adjusted_skeleton_parts__ = adjusted_skeleton_parts ? _fbb.CreateVector>(*adjusted_skeleton_parts) : 0; - return solarxr_protocol::rpc::CreateAutoBoneEpochResponse( - _fbb, - current_epoch, - total_epochs, - epoch_error, - adjusted_skeleton_parts__); -} - -/// Requests the current state of `OverlayDisplayModeResponse`. -struct OverlayDisplayModeRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OverlayDisplayModeRequestBuilder Builder; - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - verifier.EndTable(); - } -}; - -struct OverlayDisplayModeRequestBuilder { - typedef OverlayDisplayModeRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - explicit OverlayDisplayModeRequestBuilder(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 CreateOverlayDisplayModeRequest( - flatbuffers::FlatBufferBuilder &_fbb) { - OverlayDisplayModeRequestBuilder builder_(_fbb); - return builder_.Finish(); -} - -/// Changes the state of the overlay's display mode. -struct OverlayDisplayModeChangeRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OverlayDisplayModeChangeRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_IS_VISIBLE = 4, - VT_IS_MIRRORED = 6 - }; - flatbuffers::Optional is_visible() const { - return GetOptional(VT_IS_VISIBLE); - } - flatbuffers::Optional is_mirrored() const { - return GetOptional(VT_IS_MIRRORED); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_IS_VISIBLE, 1) && - VerifyField(verifier, VT_IS_MIRRORED, 1) && - verifier.EndTable(); - } -}; - -struct OverlayDisplayModeChangeRequestBuilder { - typedef OverlayDisplayModeChangeRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_is_visible(bool is_visible) { - fbb_.AddElement(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, static_cast(is_visible)); - } - void add_is_mirrored(bool is_mirrored) { - fbb_.AddElement(OverlayDisplayModeChangeRequest::VT_IS_MIRRORED, static_cast(is_mirrored)); - } - explicit OverlayDisplayModeChangeRequestBuilder(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 CreateOverlayDisplayModeChangeRequest( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Optional is_visible = flatbuffers::nullopt, - flatbuffers::Optional is_mirrored = flatbuffers::nullopt) { - OverlayDisplayModeChangeRequestBuilder builder_(_fbb); - if(is_mirrored) { builder_.add_is_mirrored(*is_mirrored); } - if(is_visible) { builder_.add_is_visible(*is_visible); } - return builder_.Finish(); -} - -/// The current state of the overlay's display mode. -struct OverlayDisplayModeResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef OverlayDisplayModeResponseBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_IS_VISIBLE = 4, - VT_IS_MIRRORED = 6 - }; - bool is_visible() const { - return GetField(VT_IS_VISIBLE, 0) != 0; - } - bool is_mirrored() const { - return GetField(VT_IS_MIRRORED, 0) != 0; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_IS_VISIBLE, 1) && - VerifyField(verifier, VT_IS_MIRRORED, 1) && - verifier.EndTable(); - } -}; - -struct OverlayDisplayModeResponseBuilder { - typedef OverlayDisplayModeResponse Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_is_visible(bool is_visible) { - fbb_.AddElement(OverlayDisplayModeResponse::VT_IS_VISIBLE, static_cast(is_visible), 0); - } - void add_is_mirrored(bool is_mirrored) { - fbb_.AddElement(OverlayDisplayModeResponse::VT_IS_MIRRORED, static_cast(is_mirrored), 0); - } - explicit OverlayDisplayModeResponseBuilder(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 CreateOverlayDisplayModeResponse( - flatbuffers::FlatBufferBuilder &_fbb, - bool is_visible = false, - bool is_mirrored = false) { - OverlayDisplayModeResponseBuilder builder_(_fbb); - builder_.add_is_mirrored(is_mirrored); - builder_.add_is_visible(is_visible); - return builder_.Finish(); -} - -} // namespace rpc - -/// MessageBundle contains all of the messages for the data feed system and the -/// rpc system that will be sent in one buffer. -struct MessageBundle FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef MessageBundleBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_DATA_FEED_MSGS = 4, - VT_RPC_MSGS = 6 - }; - const flatbuffers::Vector> *data_feed_msgs() const { - return GetPointer> *>(VT_DATA_FEED_MSGS); - } - const flatbuffers::Vector> *rpc_msgs() const { - return GetPointer> *>(VT_RPC_MSGS); - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_DATA_FEED_MSGS) && - verifier.VerifyVector(data_feed_msgs()) && - verifier.VerifyVectorOfTables(data_feed_msgs()) && - VerifyOffset(verifier, VT_RPC_MSGS) && - verifier.VerifyVector(rpc_msgs()) && - verifier.VerifyVectorOfTables(rpc_msgs()) && - verifier.EndTable(); - } -}; - -struct MessageBundleBuilder { - typedef MessageBundle Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_data_feed_msgs(flatbuffers::Offset>> data_feed_msgs) { - fbb_.AddOffset(MessageBundle::VT_DATA_FEED_MSGS, data_feed_msgs); - } - void add_rpc_msgs(flatbuffers::Offset>> rpc_msgs) { - fbb_.AddOffset(MessageBundle::VT_RPC_MSGS, rpc_msgs); - } - explicit MessageBundleBuilder(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 CreateMessageBundle( - flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset>> data_feed_msgs = 0, - flatbuffers::Offset>> rpc_msgs = 0) { - MessageBundleBuilder builder_(_fbb); - builder_.add_rpc_msgs(rpc_msgs); - builder_.add_data_feed_msgs(data_feed_msgs); - return builder_.Finish(); -} - -inline flatbuffers::Offset CreateMessageBundleDirect( - flatbuffers::FlatBufferBuilder &_fbb, - const std::vector> *data_feed_msgs = nullptr, - const std::vector> *rpc_msgs = nullptr) { - auto data_feed_msgs__ = data_feed_msgs ? _fbb.CreateVector>(*data_feed_msgs) : 0; - auto rpc_msgs__ = rpc_msgs ? _fbb.CreateVector>(*rpc_msgs) : 0; - return solarxr_protocol::CreateMessageBundle( - _fbb, - data_feed_msgs__, - rpc_msgs__); -} - -namespace datatypes { - -namespace hardware_info { - -} // namespace hardware_info -} // namespace datatypes - -namespace data_feed { -namespace tracker { - -} // namespace tracker - -namespace device_data { - -} // namespace device_data - -} // namespace data_feed - -namespace rpc { -namespace settings { - -} // namespace settings - -} // namespace rpc - -namespace data_feed { - -inline bool VerifyDataFeedMessage(flatbuffers::Verifier &verifier, const void *obj, DataFeedMessage type) { - switch (type) { - case DataFeedMessage::NONE: { - return true; - } - case DataFeedMessage::PollDataFeed: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case DataFeedMessage::StartDataFeed: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case DataFeedMessage::DataFeedUpdate: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case DataFeedMessage::DataFeedConfig: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - default: return true; - } -} - -inline bool VerifyDataFeedMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { - if (!values || !types) return !values && !types; - if (values->size() != types->size()) return false; - for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { - if (!VerifyDataFeedMessage( - verifier, values->Get(i), types->GetEnum(i))) { - return false; - } - } - return true; -} - -} // namespace data_feed - -namespace rpc { - -inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type) { - switch (type) { - case RpcMessage::NONE: { - return true; - } - case RpcMessage::HeartbeatRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::HeartbeatResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ResetRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AssignTrackerRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SettingsRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SettingsResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ChangeSettingsRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::RecordBVHRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::RecordBVHStatus: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SkeletonConfigRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::ChangeSkeletonConfigRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SkeletonResetAllRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SkeletonConfigResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::OpenSerialRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::CloseSerialRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SetWifiRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SerialUpdateResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AutoBoneProcessRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AutoBoneProcessStatusResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::AutoBoneEpochResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::OverlayDisplayModeRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::OverlayDisplayModeChangeRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::OverlayDisplayModeResponse: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SerialTrackerRebootRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SerialTrackerGetInfoRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - case RpcMessage::SerialTrackerFactoryResetRequest: { - auto ptr = reinterpret_cast(obj); - return verifier.VerifyTable(ptr); - } - default: return true; - } -} - -inline bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { - if (!values || !types) return !values && !types; - if (values->size() != types->size()) return false; - for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { - if (!VerifyRpcMessage( - verifier, values->Get(i), types->GetEnum(i))) { - return false; - } - } - return true; -} - -} // namespace rpc -} // namespace solarxr_protocol - -#endif // FLATBUFFERS_GENERATED_ALL_SOLARXR_PROTOCOL_H_ +// automatically generated by the FlatBuffers compiler, do not modify + + +#ifndef FLATBUFFERS_GENERATED_ALL_SOLARXR_PROTOCOL_H_ +#define FLATBUFFERS_GENERATED_ALL_SOLARXR_PROTOCOL_H_ + +#include "flatbuffers/flatbuffers.h" + +namespace solarxr_protocol { +namespace datatypes { + +struct HzF32; + +struct TransactionId; + +struct DeviceId; + +struct TrackerId; +struct TrackerIdBuilder; + +struct LogData; +struct LogDataBuilder; + +struct Temperature; + +struct Ipv4Address; + +struct Bytes; +struct BytesBuilder; + +struct String; +struct StringBuilder; + +namespace hardware_info { + +struct HardwareAddress; + +struct HardwareInfo; +struct HardwareInfoBuilder; + +struct HardwareStatus; +struct HardwareStatusBuilder; + +struct FirmwareStatusMask; +struct FirmwareStatusMaskBuilder; + +} // namespace hardware_info + +namespace math { + +struct Quat; + +struct Vec3f; + +} // namespace math +} // namespace datatypes + +namespace data_feed { +namespace tracker { + +struct TrackerData; +struct TrackerDataBuilder; + +struct TrackerDataMask; +struct TrackerDataMaskBuilder; + +struct TrackerInfo; +struct TrackerInfoBuilder; + +} // namespace tracker + +namespace device_data { + +struct DeviceDataMask; +struct DeviceDataMaskBuilder; + +struct DeviceData; +struct DeviceDataBuilder; + +} // namespace device_data + +struct Bone; +struct BoneBuilder; + +struct DataFeedMessageHeader; +struct DataFeedMessageHeaderBuilder; + +struct PollDataFeed; +struct PollDataFeedBuilder; + +struct StartDataFeed; +struct StartDataFeedBuilder; + +struct DataFeedUpdate; +struct DataFeedUpdateBuilder; + +struct DataFeedConfig; +struct DataFeedConfigBuilder; + +} // namespace data_feed + +namespace rpc { +namespace settings { + +struct ModelToggles; +struct ModelTogglesBuilder; + +struct ModelRatios; +struct ModelRatiosBuilder; + +struct ModelSettings; +struct ModelSettingsBuilder; + +} // namespace settings + +struct RpcMessageHeader; +struct RpcMessageHeaderBuilder; + +struct HeartbeatRequest; +struct HeartbeatRequestBuilder; + +struct HeartbeatResponse; +struct HeartbeatResponseBuilder; + +struct ResetRequest; +struct ResetRequestBuilder; + +struct ResetResponse; +struct ResetResponseBuilder; + +struct AssignTrackerRequest; +struct AssignTrackerRequestBuilder; + +struct SettingsRequest; +struct SettingsRequestBuilder; + +struct SettingsResponse; +struct SettingsResponseBuilder; + +struct ChangeSettingsRequest; +struct ChangeSettingsRequestBuilder; + +struct SteamVRTrackersSetting; +struct SteamVRTrackersSettingBuilder; + +struct FilteringSettings; +struct FilteringSettingsBuilder; + +struct RecordBVHRequest; +struct RecordBVHRequestBuilder; + +struct RecordBVHStatus; +struct RecordBVHStatusBuilder; + +struct SkeletonPart; +struct SkeletonPartBuilder; + +struct SkeletonConfigRequest; +struct SkeletonConfigRequestBuilder; + +struct SkeletonConfigResponse; +struct SkeletonConfigResponseBuilder; + +struct SkeletonResetAllRequest; +struct SkeletonResetAllRequestBuilder; + +struct ChangeSkeletonConfigRequest; +struct ChangeSkeletonConfigRequestBuilder; + +struct OpenSerialRequest; +struct OpenSerialRequestBuilder; + +struct CloseSerialRequest; +struct CloseSerialRequestBuilder; + +struct SetWifiRequest; +struct SetWifiRequestBuilder; + +struct SerialUpdateResponse; +struct SerialUpdateResponseBuilder; + +struct SerialTrackerRebootRequest; +struct SerialTrackerRebootRequestBuilder; + +struct SerialTrackerGetInfoRequest; +struct SerialTrackerGetInfoRequestBuilder; + +struct SerialTrackerFactoryResetRequest; +struct SerialTrackerFactoryResetRequestBuilder; + +struct AutoBoneProcessRequest; +struct AutoBoneProcessRequestBuilder; + +struct AutoBoneProcessStatusResponse; +struct AutoBoneProcessStatusResponseBuilder; + +struct AutoBoneEpochResponse; +struct AutoBoneEpochResponseBuilder; + +struct OverlayDisplayModeRequest; +struct OverlayDisplayModeRequestBuilder; + +struct OverlayDisplayModeChangeRequest; +struct OverlayDisplayModeChangeRequestBuilder; + +struct OverlayDisplayModeResponse; +struct OverlayDisplayModeResponseBuilder; + +} // namespace rpc + +namespace pub_sub { + +struct TopicId; +struct TopicIdBuilder; + +struct TopicHandle; +struct TopicHandleBuilder; + +struct TopicHandleRequest; +struct TopicHandleRequestBuilder; + +struct TopicHandleResponse; +struct TopicHandleResponseBuilder; + +struct PubSubHeader; +struct PubSubHeaderBuilder; + +struct Message; +struct MessageBuilder; + +struct SubscriptionRequest; +struct SubscriptionRequestBuilder; + +struct KeyValues; +struct KeyValuesBuilder; + +} // namespace pub_sub + +struct MessageBundle; +struct MessageBundleBuilder; + +namespace datatypes { + +/// A list of error codes for error conditions on the device +enum class FirmwareErrorCode : uint8_t { + Other = 0, + Disconnected = 1, + Occluded = 2, + ImuError = 3, + MIN = Other, + MAX = ImuError +}; + +inline const FirmwareErrorCode (&EnumValuesFirmwareErrorCode())[4] { + static const FirmwareErrorCode values[] = { + FirmwareErrorCode::Other, + FirmwareErrorCode::Disconnected, + FirmwareErrorCode::Occluded, + FirmwareErrorCode::ImuError + }; + return values; +} + +inline const char * const *EnumNamesFirmwareErrorCode() { + static const char * const names[5] = { + "Other", + "Disconnected", + "Occluded", + "ImuError", + nullptr + }; + return names; +} + +inline const char *EnumNameFirmwareErrorCode(FirmwareErrorCode e) { + if (flatbuffers::IsOutRange(e, FirmwareErrorCode::Other, FirmwareErrorCode::ImuError)) return ""; + const size_t index = static_cast(e); + return EnumNamesFirmwareErrorCode()[index]; +} + +/// Used for filtering tracker rotations in software +enum class FilteringType : uint8_t { + NONE = 0, + SMOOTHING = 1, + PREDICTION = 2, + MIN = NONE, + MAX = PREDICTION +}; + +inline const FilteringType (&EnumValuesFilteringType())[3] { + static const FilteringType values[] = { + FilteringType::NONE, + FilteringType::SMOOTHING, + FilteringType::PREDICTION + }; + return values; +} + +inline const char * const *EnumNamesFilteringType() { + static const char * const names[4] = { + "NONE", + "SMOOTHING", + "PREDICTION", + nullptr + }; + return names; +} + +inline const char *EnumNameFilteringType(FilteringType e) { + if (flatbuffers::IsOutRange(e, FilteringType::NONE, FilteringType::PREDICTION)) return ""; + const size_t index = static_cast(e); + return EnumNamesFilteringType()[index]; +} + +/// Possible tracker roles +/// They're not perfect match for SteamVR tracker roles, +/// because we support more possible roles. Host can +/// chose how to map it to their supported role. +enum class TrackerRole : uint8_t { + NONE = 0, + WAIST = 1, + LEFT_FOOT = 2, + RIGHT_FOOT = 3, + CHEST = 4, + LEFT_KNEE = 5, + RIGHT_KNEE = 6, + LEFT_ELBOW = 7, + RIGHT_ELBOW = 8, + LEFT_SHOULDER = 9, + RIGHT_SHOULDER = 10, + LEFT_HAND = 11, + RIGHT_HAND = 12, + LEFT_CONTROLLER = 13, + RIGHT_CONTROLLER = 14, + HEAD = 15, + NECK = 16, + CAMERA = 17, + KEYBOARD = 18, + HMD = 19, + BEACON = 20, + GENERIC_CONTROLLER = 21, + MIN = NONE, + MAX = GENERIC_CONTROLLER +}; + +inline const TrackerRole (&EnumValuesTrackerRole())[22] { + static const TrackerRole values[] = { + TrackerRole::NONE, + TrackerRole::WAIST, + TrackerRole::LEFT_FOOT, + TrackerRole::RIGHT_FOOT, + TrackerRole::CHEST, + TrackerRole::LEFT_KNEE, + TrackerRole::RIGHT_KNEE, + TrackerRole::LEFT_ELBOW, + TrackerRole::RIGHT_ELBOW, + TrackerRole::LEFT_SHOULDER, + TrackerRole::RIGHT_SHOULDER, + TrackerRole::LEFT_HAND, + TrackerRole::RIGHT_HAND, + TrackerRole::LEFT_CONTROLLER, + TrackerRole::RIGHT_CONTROLLER, + TrackerRole::HEAD, + TrackerRole::NECK, + TrackerRole::CAMERA, + TrackerRole::KEYBOARD, + TrackerRole::HMD, + TrackerRole::BEACON, + TrackerRole::GENERIC_CONTROLLER + }; + return values; +} + +inline const char * const *EnumNamesTrackerRole() { + static const char * const names[23] = { + "NONE", + "WAIST", + "LEFT_FOOT", + "RIGHT_FOOT", + "CHEST", + "LEFT_KNEE", + "RIGHT_KNEE", + "LEFT_ELBOW", + "RIGHT_ELBOW", + "LEFT_SHOULDER", + "RIGHT_SHOULDER", + "LEFT_HAND", + "RIGHT_HAND", + "LEFT_CONTROLLER", + "RIGHT_CONTROLLER", + "HEAD", + "NECK", + "CAMERA", + "KEYBOARD", + "HMD", + "BEACON", + "GENERIC_CONTROLLER", + nullptr + }; + return names; +} + +inline const char *EnumNameTrackerRole(TrackerRole e) { + if (flatbuffers::IsOutRange(e, TrackerRole::NONE, TrackerRole::GENERIC_CONTROLLER)) return ""; + const size_t index = static_cast(e); + return EnumNamesTrackerRole()[index]; +} + +/// Different parts of the body. Roughly maps to each possible bone in the skeleton. +/// These are *NOT* the trackers. +enum class BodyPart : uint8_t { + NONE = 0, + HEAD = 1, + NECK = 2, + CHEST = 3, + WAIST = 4, + HIP = 5, + LEFT_UPPER_LEG = 6, + RIGHT_UPPER_LEG = 7, + LEFT_LOWER_LEG = 8, + RIGHT_LOWER_LEG = 9, + LEFT_FOOT = 10, + RIGHT_FOOT = 11, + LEFT_CONTROLLER = 12, + RIGHT_CONTROLLER = 13, + LEFT_LOWER_ARM = 14, + RIGHT_LOWER_ARM = 15, + LEFT_UPPER_ARM = 16, + RIGHT_UPPER_ARM = 17, + LEFT_HAND = 18, + RIGHT_HAND = 19, + LEFT_SHOULDER = 20, + RIGHT_SHOULDER = 21, + MIN = NONE, + MAX = RIGHT_SHOULDER +}; + +inline const BodyPart (&EnumValuesBodyPart())[22] { + static const BodyPart values[] = { + BodyPart::NONE, + BodyPart::HEAD, + BodyPart::NECK, + BodyPart::CHEST, + BodyPart::WAIST, + BodyPart::HIP, + BodyPart::LEFT_UPPER_LEG, + BodyPart::RIGHT_UPPER_LEG, + BodyPart::LEFT_LOWER_LEG, + BodyPart::RIGHT_LOWER_LEG, + BodyPart::LEFT_FOOT, + BodyPart::RIGHT_FOOT, + BodyPart::LEFT_CONTROLLER, + BodyPart::RIGHT_CONTROLLER, + BodyPart::LEFT_LOWER_ARM, + BodyPart::RIGHT_LOWER_ARM, + BodyPart::LEFT_UPPER_ARM, + BodyPart::RIGHT_UPPER_ARM, + BodyPart::LEFT_HAND, + BodyPart::RIGHT_HAND, + BodyPart::LEFT_SHOULDER, + BodyPart::RIGHT_SHOULDER + }; + return values; +} + +inline const char * const *EnumNamesBodyPart() { + static const char * const names[23] = { + "NONE", + "HEAD", + "NECK", + "CHEST", + "WAIST", + "HIP", + "LEFT_UPPER_LEG", + "RIGHT_UPPER_LEG", + "LEFT_LOWER_LEG", + "RIGHT_LOWER_LEG", + "LEFT_FOOT", + "RIGHT_FOOT", + "LEFT_CONTROLLER", + "RIGHT_CONTROLLER", + "LEFT_LOWER_ARM", + "RIGHT_LOWER_ARM", + "LEFT_UPPER_ARM", + "RIGHT_UPPER_ARM", + "LEFT_HAND", + "RIGHT_HAND", + "LEFT_SHOULDER", + "RIGHT_SHOULDER", + nullptr + }; + return names; +} + +inline const char *EnumNameBodyPart(BodyPart e) { + if (flatbuffers::IsOutRange(e, BodyPart::NONE, BodyPart::RIGHT_SHOULDER)) return ""; + const size_t index = static_cast(e); + return EnumNamesBodyPart()[index]; +} + +enum class TrackerStatus : uint8_t { + NONE = 0, + DISCONNECTED = 1, + OK = 2, + BUSY = 3, + ERROR = 4, + OCCLUDED = 5, + MIN = NONE, + MAX = OCCLUDED +}; + +inline const TrackerStatus (&EnumValuesTrackerStatus())[6] { + static const TrackerStatus values[] = { + TrackerStatus::NONE, + TrackerStatus::DISCONNECTED, + TrackerStatus::OK, + TrackerStatus::BUSY, + TrackerStatus::ERROR, + TrackerStatus::OCCLUDED + }; + return values; +} + +inline const char * const *EnumNamesTrackerStatus() { + static const char * const names[7] = { + "NONE", + "DISCONNECTED", + "OK", + "BUSY", + "ERROR", + "OCCLUDED", + nullptr + }; + return names; +} + +inline const char *EnumNameTrackerStatus(TrackerStatus e) { + if (flatbuffers::IsOutRange(e, TrackerStatus::NONE, TrackerStatus::OCCLUDED)) return ""; + const size_t index = static_cast(e); + return EnumNamesTrackerStatus()[index]; +} + +namespace hardware_info { + +enum class McuType : uint16_t { + Other = 0, + ESP8266 = 1, + ESP32_S2 = 2, + ESP32_S3 = 3, + ESP32_C3 = 4, + MIN = Other, + MAX = ESP32_C3 +}; + +inline const McuType (&EnumValuesMcuType())[5] { + static const McuType values[] = { + McuType::Other, + McuType::ESP8266, + McuType::ESP32_S2, + McuType::ESP32_S3, + McuType::ESP32_C3 + }; + return values; +} + +inline const char * const *EnumNamesMcuType() { + static const char * const names[6] = { + "Other", + "ESP8266", + "ESP32_S2", + "ESP32_S3", + "ESP32_C3", + nullptr + }; + return names; +} + +inline const char *EnumNameMcuType(McuType e) { + if (flatbuffers::IsOutRange(e, McuType::Other, McuType::ESP32_C3)) return ""; + const size_t index = static_cast(e); + return EnumNamesMcuType()[index]; +} + +enum class ImuType : uint16_t { + Other = 0, + BNO085 = 1, + BNO080 = 2, + MPU6050 = 3, + MPU9250 = 4, + MPU6500 = 5, + MIN = Other, + MAX = MPU6500 +}; + +inline const ImuType (&EnumValuesImuType())[6] { + static const ImuType values[] = { + ImuType::Other, + ImuType::BNO085, + ImuType::BNO080, + ImuType::MPU6050, + ImuType::MPU9250, + ImuType::MPU6500 + }; + return values; +} + +inline const char * const *EnumNamesImuType() { + static const char * const names[7] = { + "Other", + "BNO085", + "BNO080", + "MPU6050", + "MPU9250", + "MPU6500", + nullptr + }; + return names; +} + +inline const char *EnumNameImuType(ImuType e) { + if (flatbuffers::IsOutRange(e, ImuType::Other, ImuType::MPU6500)) return ""; + const size_t index = static_cast(e); + return EnumNamesImuType()[index]; +} + +} // namespace hardware_info +} // namespace datatypes + +namespace data_feed { + +enum class DataFeedMessage : uint8_t { + NONE = 0, + PollDataFeed = 1, + StartDataFeed = 2, + DataFeedUpdate = 3, + DataFeedConfig = 4, + MIN = NONE, + MAX = DataFeedConfig +}; + +inline const DataFeedMessage (&EnumValuesDataFeedMessage())[5] { + static const DataFeedMessage values[] = { + DataFeedMessage::NONE, + DataFeedMessage::PollDataFeed, + DataFeedMessage::StartDataFeed, + DataFeedMessage::DataFeedUpdate, + DataFeedMessage::DataFeedConfig + }; + return values; +} + +inline const char * const *EnumNamesDataFeedMessage() { + static const char * const names[6] = { + "NONE", + "PollDataFeed", + "StartDataFeed", + "DataFeedUpdate", + "DataFeedConfig", + nullptr + }; + return names; +} + +inline const char *EnumNameDataFeedMessage(DataFeedMessage e) { + if (flatbuffers::IsOutRange(e, DataFeedMessage::NONE, DataFeedMessage::DataFeedConfig)) return ""; + const size_t index = static_cast(e); + return EnumNamesDataFeedMessage()[index]; +} + +template struct DataFeedMessageTraits { + static const DataFeedMessage enum_value = DataFeedMessage::NONE; +}; + +template<> struct DataFeedMessageTraits { + static const DataFeedMessage enum_value = DataFeedMessage::PollDataFeed; +}; + +template<> struct DataFeedMessageTraits { + static const DataFeedMessage enum_value = DataFeedMessage::StartDataFeed; +}; + +template<> struct DataFeedMessageTraits { + static const DataFeedMessage enum_value = DataFeedMessage::DataFeedUpdate; +}; + +template<> struct DataFeedMessageTraits { + static const DataFeedMessage enum_value = DataFeedMessage::DataFeedConfig; +}; + +bool VerifyDataFeedMessage(flatbuffers::Verifier &verifier, const void *obj, DataFeedMessage type); +bool VerifyDataFeedMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +} // namespace data_feed + +namespace rpc { + +enum class RpcMessage : uint8_t { + NONE = 0, + HeartbeatRequest = 1, + HeartbeatResponse = 2, + ResetRequest = 3, + AssignTrackerRequest = 4, + SettingsRequest = 5, + SettingsResponse = 6, + ChangeSettingsRequest = 7, + RecordBVHRequest = 8, + RecordBVHStatus = 9, + SkeletonConfigRequest = 10, + ChangeSkeletonConfigRequest = 11, + SkeletonResetAllRequest = 12, + SkeletonConfigResponse = 13, + OpenSerialRequest = 14, + CloseSerialRequest = 15, + SetWifiRequest = 16, + SerialUpdateResponse = 17, + AutoBoneProcessRequest = 18, + AutoBoneProcessStatusResponse = 19, + AutoBoneEpochResponse = 20, + OverlayDisplayModeRequest = 21, + OverlayDisplayModeChangeRequest = 22, + OverlayDisplayModeResponse = 23, + SerialTrackerRebootRequest = 24, + SerialTrackerGetInfoRequest = 25, + SerialTrackerFactoryResetRequest = 26, + MIN = NONE, + MAX = SerialTrackerFactoryResetRequest +}; + +inline const RpcMessage (&EnumValuesRpcMessage())[27] { + static const RpcMessage values[] = { + RpcMessage::NONE, + RpcMessage::HeartbeatRequest, + RpcMessage::HeartbeatResponse, + RpcMessage::ResetRequest, + RpcMessage::AssignTrackerRequest, + RpcMessage::SettingsRequest, + RpcMessage::SettingsResponse, + RpcMessage::ChangeSettingsRequest, + RpcMessage::RecordBVHRequest, + RpcMessage::RecordBVHStatus, + RpcMessage::SkeletonConfigRequest, + RpcMessage::ChangeSkeletonConfigRequest, + RpcMessage::SkeletonResetAllRequest, + RpcMessage::SkeletonConfigResponse, + RpcMessage::OpenSerialRequest, + RpcMessage::CloseSerialRequest, + RpcMessage::SetWifiRequest, + RpcMessage::SerialUpdateResponse, + RpcMessage::AutoBoneProcessRequest, + RpcMessage::AutoBoneProcessStatusResponse, + RpcMessage::AutoBoneEpochResponse, + RpcMessage::OverlayDisplayModeRequest, + RpcMessage::OverlayDisplayModeChangeRequest, + RpcMessage::OverlayDisplayModeResponse, + RpcMessage::SerialTrackerRebootRequest, + RpcMessage::SerialTrackerGetInfoRequest, + RpcMessage::SerialTrackerFactoryResetRequest + }; + return values; +} + +inline const char * const *EnumNamesRpcMessage() { + static const char * const names[28] = { + "NONE", + "HeartbeatRequest", + "HeartbeatResponse", + "ResetRequest", + "AssignTrackerRequest", + "SettingsRequest", + "SettingsResponse", + "ChangeSettingsRequest", + "RecordBVHRequest", + "RecordBVHStatus", + "SkeletonConfigRequest", + "ChangeSkeletonConfigRequest", + "SkeletonResetAllRequest", + "SkeletonConfigResponse", + "OpenSerialRequest", + "CloseSerialRequest", + "SetWifiRequest", + "SerialUpdateResponse", + "AutoBoneProcessRequest", + "AutoBoneProcessStatusResponse", + "AutoBoneEpochResponse", + "OverlayDisplayModeRequest", + "OverlayDisplayModeChangeRequest", + "OverlayDisplayModeResponse", + "SerialTrackerRebootRequest", + "SerialTrackerGetInfoRequest", + "SerialTrackerFactoryResetRequest", + nullptr + }; + return names; +} + +inline const char *EnumNameRpcMessage(RpcMessage e) { + if (flatbuffers::IsOutRange(e, RpcMessage::NONE, RpcMessage::SerialTrackerFactoryResetRequest)) return ""; + const size_t index = static_cast(e); + return EnumNamesRpcMessage()[index]; +} + +template struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::NONE; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::HeartbeatRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::HeartbeatResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ResetRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AssignTrackerRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SettingsRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SettingsResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ChangeSettingsRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::RecordBVHRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::RecordBVHStatus; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SkeletonConfigRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::ChangeSkeletonConfigRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SkeletonResetAllRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SkeletonConfigResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::OpenSerialRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::CloseSerialRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SetWifiRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialUpdateResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AutoBoneProcessRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AutoBoneProcessStatusResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::AutoBoneEpochResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::OverlayDisplayModeRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::OverlayDisplayModeChangeRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::OverlayDisplayModeResponse; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerRebootRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerGetInfoRequest; +}; + +template<> struct RpcMessageTraits { + static const RpcMessage enum_value = RpcMessage::SerialTrackerFactoryResetRequest; +}; + +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 ResetType : uint8_t { + Quick = 0, + Full = 1, + Recalibrate = 2, + /// Second pose for calibrating mounting rotation + Mounting = 3, + MIN = Quick, + MAX = Mounting +}; + +inline const ResetType (&EnumValuesResetType())[4] { + static const ResetType values[] = { + ResetType::Quick, + ResetType::Full, + ResetType::Recalibrate, + ResetType::Mounting + }; + return values; +} + +inline const char * const *EnumNamesResetType() { + static const char * const names[5] = { + "Quick", + "Full", + "Recalibrate", + "Mounting", + nullptr + }; + return names; +} + +inline const char *EnumNameResetType(ResetType e) { + if (flatbuffers::IsOutRange(e, ResetType::Quick, ResetType::Mounting)) return ""; + const size_t index = static_cast(e); + return EnumNamesResetType()[index]; +} + +enum class SkeletonBone : uint8_t { + NONE = 0, + HEAD = 1, + NECK = 2, + TORSO = 3, + CHEST = 4, + WAIST = 5, + HIP_OFFSET = 6, + HIPS_WIDTH = 7, + LEGS_LENGTH = 8, + KNEE_HEIGHT = 9, + FOOT_LENGTH = 10, + FOOT_SHIFT = 11, + SKELETON_OFFSET = 12, + CONTROLLER_DISTANCE_Z = 13, + CONTROLLER_DISTANCE_Y = 14, + FOREARM_LENGTH = 15, + SHOULDERS_DISTANCE = 16, + SHOULDERS_WIDTH = 17, + UPPER_ARM_LENGTH = 18, + ELBOW_OFFSET = 19, + MIN = NONE, + MAX = ELBOW_OFFSET +}; + +inline const SkeletonBone (&EnumValuesSkeletonBone())[20] { + static const SkeletonBone values[] = { + SkeletonBone::NONE, + SkeletonBone::HEAD, + SkeletonBone::NECK, + SkeletonBone::TORSO, + SkeletonBone::CHEST, + SkeletonBone::WAIST, + SkeletonBone::HIP_OFFSET, + SkeletonBone::HIPS_WIDTH, + SkeletonBone::LEGS_LENGTH, + SkeletonBone::KNEE_HEIGHT, + SkeletonBone::FOOT_LENGTH, + SkeletonBone::FOOT_SHIFT, + SkeletonBone::SKELETON_OFFSET, + SkeletonBone::CONTROLLER_DISTANCE_Z, + SkeletonBone::CONTROLLER_DISTANCE_Y, + SkeletonBone::FOREARM_LENGTH, + SkeletonBone::SHOULDERS_DISTANCE, + SkeletonBone::SHOULDERS_WIDTH, + SkeletonBone::UPPER_ARM_LENGTH, + SkeletonBone::ELBOW_OFFSET + }; + return values; +} + +inline const char * const *EnumNamesSkeletonBone() { + static const char * const names[21] = { + "NONE", + "HEAD", + "NECK", + "TORSO", + "CHEST", + "WAIST", + "HIP_OFFSET", + "HIPS_WIDTH", + "LEGS_LENGTH", + "KNEE_HEIGHT", + "FOOT_LENGTH", + "FOOT_SHIFT", + "SKELETON_OFFSET", + "CONTROLLER_DISTANCE_Z", + "CONTROLLER_DISTANCE_Y", + "FOREARM_LENGTH", + "SHOULDERS_DISTANCE", + "SHOULDERS_WIDTH", + "UPPER_ARM_LENGTH", + "ELBOW_OFFSET", + nullptr + }; + return names; +} + +inline const char *EnumNameSkeletonBone(SkeletonBone e) { + if (flatbuffers::IsOutRange(e, SkeletonBone::NONE, SkeletonBone::ELBOW_OFFSET)) return ""; + const size_t index = static_cast(e); + return EnumNamesSkeletonBone()[index]; +} + +enum class AutoBoneProcessType : uint8_t { + NONE = 0, + RECORD = 1, + SAVE = 2, + PROCESS = 3, + APPLY = 4, + MIN = NONE, + MAX = APPLY +}; + +inline const AutoBoneProcessType (&EnumValuesAutoBoneProcessType())[5] { + static const AutoBoneProcessType values[] = { + AutoBoneProcessType::NONE, + AutoBoneProcessType::RECORD, + AutoBoneProcessType::SAVE, + AutoBoneProcessType::PROCESS, + AutoBoneProcessType::APPLY + }; + return values; +} + +inline const char * const *EnumNamesAutoBoneProcessType() { + static const char * const names[6] = { + "NONE", + "RECORD", + "SAVE", + "PROCESS", + "APPLY", + nullptr + }; + return names; +} + +inline const char *EnumNameAutoBoneProcessType(AutoBoneProcessType e) { + if (flatbuffers::IsOutRange(e, AutoBoneProcessType::NONE, AutoBoneProcessType::APPLY)) return ""; + const size_t index = static_cast(e); + return EnumNamesAutoBoneProcessType()[index]; +} + +} // namespace rpc + +namespace pub_sub { + +enum class Topic : uint8_t { + NONE = 0, + TopicHandle = 1, + TopicId = 2, + MIN = NONE, + MAX = TopicId +}; + +inline const Topic (&EnumValuesTopic())[3] { + static const Topic values[] = { + Topic::NONE, + Topic::TopicHandle, + Topic::TopicId + }; + return values; +} + +inline const char * const *EnumNamesTopic() { + static const char * const names[4] = { + "NONE", + "TopicHandle", + "TopicId", + nullptr + }; + return names; +} + +inline const char *EnumNameTopic(Topic e) { + if (flatbuffers::IsOutRange(e, Topic::NONE, Topic::TopicId)) return ""; + const size_t index = static_cast(e); + return EnumNamesTopic()[index]; +} + +template struct TopicTraits { + static const Topic enum_value = Topic::NONE; +}; + +template<> struct TopicTraits { + static const Topic enum_value = Topic::TopicHandle; +}; + +template<> struct TopicTraits { + static const Topic enum_value = Topic::TopicId; +}; + +bool VerifyTopic(flatbuffers::Verifier &verifier, const void *obj, Topic type); +bool VerifyTopicVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +enum class PubSubUnion : uint8_t { + NONE = 0, + Message = 1, + SubscriptionRequest = 2, + TopicHandleRequest = 3, + TopicHandleResponse = 4, + MIN = NONE, + MAX = TopicHandleResponse +}; + +inline const PubSubUnion (&EnumValuesPubSubUnion())[5] { + static const PubSubUnion values[] = { + PubSubUnion::NONE, + PubSubUnion::Message, + PubSubUnion::SubscriptionRequest, + PubSubUnion::TopicHandleRequest, + PubSubUnion::TopicHandleResponse + }; + return values; +} + +inline const char * const *EnumNamesPubSubUnion() { + static const char * const names[6] = { + "NONE", + "Message", + "SubscriptionRequest", + "TopicHandleRequest", + "TopicHandleResponse", + nullptr + }; + return names; +} + +inline const char *EnumNamePubSubUnion(PubSubUnion e) { + if (flatbuffers::IsOutRange(e, PubSubUnion::NONE, PubSubUnion::TopicHandleResponse)) return ""; + const size_t index = static_cast(e); + return EnumNamesPubSubUnion()[index]; +} + +template struct PubSubUnionTraits { + static const PubSubUnion enum_value = PubSubUnion::NONE; +}; + +template<> struct PubSubUnionTraits { + static const PubSubUnion enum_value = PubSubUnion::Message; +}; + +template<> struct PubSubUnionTraits { + static const PubSubUnion enum_value = PubSubUnion::SubscriptionRequest; +}; + +template<> struct PubSubUnionTraits { + static const PubSubUnion enum_value = PubSubUnion::TopicHandleRequest; +}; + +template<> struct PubSubUnionTraits { + static const PubSubUnion enum_value = PubSubUnion::TopicHandleResponse; +}; + +bool VerifyPubSubUnion(flatbuffers::Verifier &verifier, const void *obj, PubSubUnion type); +bool VerifyPubSubUnionVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +enum class Payload : uint8_t { + NONE = 0, + solarxr_protocol_datatypes_String = 1, + solarxr_protocol_datatypes_Bytes = 2, + KeyValues = 3, + MIN = NONE, + MAX = KeyValues +}; + +inline const Payload (&EnumValuesPayload())[4] { + static const Payload values[] = { + Payload::NONE, + Payload::solarxr_protocol_datatypes_String, + Payload::solarxr_protocol_datatypes_Bytes, + Payload::KeyValues + }; + return values; +} + +inline const char * const *EnumNamesPayload() { + static const char * const names[5] = { + "NONE", + "solarxr_protocol_datatypes_String", + "solarxr_protocol_datatypes_Bytes", + "KeyValues", + nullptr + }; + return names; +} + +inline const char *EnumNamePayload(Payload e) { + if (flatbuffers::IsOutRange(e, Payload::NONE, Payload::KeyValues)) return ""; + const size_t index = static_cast(e); + return EnumNamesPayload()[index]; +} + +template struct PayloadTraits { + static const Payload enum_value = Payload::NONE; +}; + +template<> struct PayloadTraits { + static const Payload enum_value = Payload::solarxr_protocol_datatypes_String; +}; + +template<> struct PayloadTraits { + static const Payload enum_value = Payload::solarxr_protocol_datatypes_Bytes; +}; + +template<> struct PayloadTraits { + static const Payload enum_value = Payload::KeyValues; +}; + +bool VerifyPayload(flatbuffers::Verifier &verifier, const void *obj, Payload type); +bool VerifyPayloadVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +} // namespace pub_sub + +namespace datatypes { + +/// Frequency as 32 bit float +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) HzF32 FLATBUFFERS_FINAL_CLASS { + private: + float f_; + + public: + HzF32() + : f_(0) { + } + HzF32(float _f) + : f_(flatbuffers::EndianScalar(_f)) { + } + float f() const { + return flatbuffers::EndianScalar(f_); + } +}; +FLATBUFFERS_STRUCT_END(HzF32, 4); + +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) TransactionId FLATBUFFERS_FINAL_CLASS { + private: + uint32_t id_; + + public: + TransactionId() + : id_(0) { + } + TransactionId(uint32_t _id) + : id_(flatbuffers::EndianScalar(_id)) { + } + /// This is expected to overflow, networking logic should handle this case. + uint32_t id() const { + return flatbuffers::EndianScalar(id_); + } +}; +FLATBUFFERS_STRUCT_END(TransactionId, 4); + +/// A unique ID for the device. IDs are not guaranteed to be the same after +/// the connection is terminated. +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(1) DeviceId FLATBUFFERS_FINAL_CLASS { + private: + uint8_t id_; + + public: + DeviceId() + : id_(0) { + } + DeviceId(uint8_t _id) + : id_(flatbuffers::EndianScalar(_id)) { + } + uint8_t id() const { + return flatbuffers::EndianScalar(id_); + } +}; +FLATBUFFERS_STRUCT_END(DeviceId, 1); + +/// Temperature in degrees celsius +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Temperature FLATBUFFERS_FINAL_CLASS { + private: + float temp_; + + public: + Temperature() + : temp_(0) { + } + Temperature(float _temp) + : temp_(flatbuffers::EndianScalar(_temp)) { + } + float temp() const { + return flatbuffers::EndianScalar(temp_); + } +}; +FLATBUFFERS_STRUCT_END(Temperature, 4); + +/// The 4 bytes of an ip address are stored in 32 bits in big endian order. +/// We will switch over to fixed size arrays when they are supported better. +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Ipv4Address FLATBUFFERS_FINAL_CLASS { + private: + uint32_t addr_; + + public: + Ipv4Address() + : addr_(0) { + } + Ipv4Address(uint32_t _addr) + : addr_(flatbuffers::EndianScalar(_addr)) { + } + uint32_t addr() const { + return flatbuffers::EndianScalar(addr_); + } +}; +FLATBUFFERS_STRUCT_END(Ipv4Address, 4); + +namespace hardware_info { + +/// A MAC address or a bluetooth address, or some other uniquely identifying address +/// associated with the endpoint that we are communicating with. If it doesn't take +/// up the full set of bytes, it is aligned towards the least significant bits. +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(8) HardwareAddress FLATBUFFERS_FINAL_CLASS { + private: + uint64_t addr_; + + public: + HardwareAddress() + : addr_(0) { + } + HardwareAddress(uint64_t _addr) + : addr_(flatbuffers::EndianScalar(_addr)) { + } + uint64_t addr() const { + return flatbuffers::EndianScalar(addr_); + } +}; +FLATBUFFERS_STRUCT_END(HardwareAddress, 8); + +} // namespace hardware_info + +namespace math { + +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Quat FLATBUFFERS_FINAL_CLASS { + private: + float x_; + float y_; + float z_; + float w_; + + public: + Quat() + : x_(0), + y_(0), + z_(0), + w_(0) { + } + Quat(float _x, float _y, float _z, float _w) + : x_(flatbuffers::EndianScalar(_x)), + y_(flatbuffers::EndianScalar(_y)), + z_(flatbuffers::EndianScalar(_z)), + w_(flatbuffers::EndianScalar(_w)) { + } + float x() const { + return flatbuffers::EndianScalar(x_); + } + float y() const { + return flatbuffers::EndianScalar(y_); + } + float z() const { + return flatbuffers::EndianScalar(z_); + } + float w() const { + return flatbuffers::EndianScalar(w_); + } +}; +FLATBUFFERS_STRUCT_END(Quat, 16); + +FLATBUFFERS_MANUALLY_ALIGNED_STRUCT(4) Vec3f FLATBUFFERS_FINAL_CLASS { + private: + float x_; + float y_; + float z_; + + public: + Vec3f() + : x_(0), + y_(0), + z_(0) { + } + Vec3f(float _x, float _y, float _z) + : x_(flatbuffers::EndianScalar(_x)), + y_(flatbuffers::EndianScalar(_y)), + z_(flatbuffers::EndianScalar(_z)) { + } + float x() const { + return flatbuffers::EndianScalar(x_); + } + float y() const { + return flatbuffers::EndianScalar(y_); + } + float z() const { + return flatbuffers::EndianScalar(z_); + } +}; +FLATBUFFERS_STRUCT_END(Vec3f, 12); + +} // namespace math + +struct TrackerId FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackerIdBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICE_ID = 4, + VT_TRACKER_NUM = 6 + }; + /// The device the tracker is associated with. If there is no hardware device it is + /// associated with, this should be `null`. + const solarxr_protocol::datatypes::DeviceId *device_id() const { + return GetStruct(VT_DEVICE_ID); + } + /// There are possibly multiple trackers per device. This identifies which one. + uint8_t tracker_num() const { + return GetField(VT_TRACKER_NUM, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_DEVICE_ID, 1) && + VerifyField(verifier, VT_TRACKER_NUM, 1) && + verifier.EndTable(); + } +}; + +struct TrackerIdBuilder { + typedef TrackerId Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_device_id(const solarxr_protocol::datatypes::DeviceId *device_id) { + fbb_.AddStruct(TrackerId::VT_DEVICE_ID, device_id); + } + void add_tracker_num(uint8_t tracker_num) { + fbb_.AddElement(TrackerId::VT_TRACKER_NUM, tracker_num, 0); + } + explicit TrackerIdBuilder(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 CreateTrackerId( + flatbuffers::FlatBufferBuilder &_fbb, + const solarxr_protocol::datatypes::DeviceId *device_id = nullptr, + uint8_t tracker_num = 0) { + TrackerIdBuilder builder_(_fbb); + builder_.add_device_id(device_id); + builder_.add_tracker_num(tracker_num); + return builder_.Finish(); +} + +/// General purpose logging datatype +struct LogData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogDataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MESSAGE = 4, + VT_DATA = 6 + }; + const flatbuffers::String *message() const { + return GetPointer(VT_MESSAGE); + } + const flatbuffers::Vector *data() const { + return GetPointer *>(VT_DATA); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_MESSAGE) && + verifier.VerifyString(message()) && + VerifyOffset(verifier, VT_DATA) && + verifier.VerifyVector(data()) && + verifier.EndTable(); + } +}; + +struct LogDataBuilder { + typedef LogData Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_message(flatbuffers::Offset message) { + fbb_.AddOffset(LogData::VT_MESSAGE, message); + } + void add_data(flatbuffers::Offset> data) { + fbb_.AddOffset(LogData::VT_DATA, data); + } + explicit LogDataBuilder(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 CreateLogData( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset message = 0, + flatbuffers::Offset> data = 0) { + LogDataBuilder builder_(_fbb); + builder_.add_data(data); + builder_.add_message(message); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateLogDataDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *message = nullptr, + const std::vector *data = nullptr) { + auto message__ = message ? _fbb.CreateString(message) : 0; + auto data__ = data ? _fbb.CreateVector(*data) : 0; + return solarxr_protocol::datatypes::CreateLogData( + _fbb, + message__, + data__); +} + +struct Bytes FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BytesBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_B = 4 + }; + const flatbuffers::Vector *b() const { + return GetPointer *>(VT_B); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_B) && + verifier.VerifyVector(b()) && + verifier.EndTable(); + } +}; + +struct BytesBuilder { + typedef Bytes Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_b(flatbuffers::Offset> b) { + fbb_.AddOffset(Bytes::VT_B, b); + } + explicit BytesBuilder(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 CreateBytes( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset> b = 0) { + BytesBuilder builder_(_fbb); + builder_.add_b(b); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateBytesDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector *b = nullptr) { + auto b__ = b ? _fbb.CreateVector(*b) : 0; + return solarxr_protocol::datatypes::CreateBytes( + _fbb, + b__); +} + +struct String FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StringBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_S = 4 + }; + const flatbuffers::String *s() const { + return GetPointer(VT_S); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_S) && + verifier.VerifyString(s()) && + verifier.EndTable(); + } +}; + +struct StringBuilder { + typedef String Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_s(flatbuffers::Offset s) { + fbb_.AddOffset(String::VT_S, s); + } + explicit StringBuilder(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 CreateString( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset s = 0) { + StringBuilder builder_(_fbb); + builder_.add_s(s); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStringDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *s = nullptr) { + auto s__ = s ? _fbb.CreateString(s) : 0; + return solarxr_protocol::datatypes::CreateString( + _fbb, + s__); +} + +namespace hardware_info { + +/// Mostly static info about the device's hardware/firmware. +struct HardwareInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HardwareInfoBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MCU_ID = 4, + VT_DISPLAY_NAME = 6, + VT_MODEL = 8, + VT_MANUFACTURER = 10, + VT_HARDWARE_REVISION = 12, + VT_FIRMWARE_VERSION = 14, + VT_HARDWARE_ADDRESS = 16, + VT_IP_ADDRESS = 18 + }; + solarxr_protocol::datatypes::hardware_info::McuType mcu_id() const { + return static_cast(GetField(VT_MCU_ID, 0)); + } + /// A human-friendly name to display as the name of the device. + const flatbuffers::String *display_name() const { + return GetPointer(VT_DISPLAY_NAME); + } + /// A human-friendly string for the device model. + const flatbuffers::String *model() const { + return GetPointer(VT_MODEL); + } + /// A human-friendly string for the manufacturer of the device. + const flatbuffers::String *manufacturer() const { + return GetPointer(VT_MANUFACTURER); + } + /// The hardware version of the device. For example, pcb version. + const flatbuffers::String *hardware_revision() const { + return GetPointer(VT_HARDWARE_REVISION); + } + /// The version of the slimevr firmware that the device is running. + const flatbuffers::String *firmware_version() const { + return GetPointer(VT_FIRMWARE_VERSION); + } + const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address() const { + return GetStruct(VT_HARDWARE_ADDRESS); + } + const solarxr_protocol::datatypes::Ipv4Address *ip_address() const { + return GetStruct(VT_IP_ADDRESS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_MCU_ID, 2) && + VerifyOffset(verifier, VT_DISPLAY_NAME) && + verifier.VerifyString(display_name()) && + VerifyOffset(verifier, VT_MODEL) && + verifier.VerifyString(model()) && + VerifyOffset(verifier, VT_MANUFACTURER) && + verifier.VerifyString(manufacturer()) && + VerifyOffset(verifier, VT_HARDWARE_REVISION) && + verifier.VerifyString(hardware_revision()) && + VerifyOffset(verifier, VT_FIRMWARE_VERSION) && + verifier.VerifyString(firmware_version()) && + VerifyField(verifier, VT_HARDWARE_ADDRESS, 8) && + VerifyField(verifier, VT_IP_ADDRESS, 4) && + verifier.EndTable(); + } +}; + +struct HardwareInfoBuilder { + typedef HardwareInfo Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mcu_id(solarxr_protocol::datatypes::hardware_info::McuType mcu_id) { + fbb_.AddElement(HardwareInfo::VT_MCU_ID, static_cast(mcu_id), 0); + } + void add_display_name(flatbuffers::Offset display_name) { + fbb_.AddOffset(HardwareInfo::VT_DISPLAY_NAME, display_name); + } + void add_model(flatbuffers::Offset model) { + fbb_.AddOffset(HardwareInfo::VT_MODEL, model); + } + void add_manufacturer(flatbuffers::Offset manufacturer) { + fbb_.AddOffset(HardwareInfo::VT_MANUFACTURER, manufacturer); + } + void add_hardware_revision(flatbuffers::Offset hardware_revision) { + fbb_.AddOffset(HardwareInfo::VT_HARDWARE_REVISION, hardware_revision); + } + void add_firmware_version(flatbuffers::Offset firmware_version) { + fbb_.AddOffset(HardwareInfo::VT_FIRMWARE_VERSION, firmware_version); + } + void add_hardware_address(const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address) { + fbb_.AddStruct(HardwareInfo::VT_HARDWARE_ADDRESS, hardware_address); + } + void add_ip_address(const solarxr_protocol::datatypes::Ipv4Address *ip_address) { + fbb_.AddStruct(HardwareInfo::VT_IP_ADDRESS, ip_address); + } + explicit HardwareInfoBuilder(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 CreateHardwareInfo( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::datatypes::hardware_info::McuType mcu_id = solarxr_protocol::datatypes::hardware_info::McuType::Other, + flatbuffers::Offset display_name = 0, + flatbuffers::Offset model = 0, + flatbuffers::Offset manufacturer = 0, + flatbuffers::Offset hardware_revision = 0, + flatbuffers::Offset firmware_version = 0, + const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr, + const solarxr_protocol::datatypes::Ipv4Address *ip_address = nullptr) { + HardwareInfoBuilder builder_(_fbb); + builder_.add_ip_address(ip_address); + builder_.add_hardware_address(hardware_address); + builder_.add_firmware_version(firmware_version); + builder_.add_hardware_revision(hardware_revision); + builder_.add_manufacturer(manufacturer); + builder_.add_model(model); + builder_.add_display_name(display_name); + builder_.add_mcu_id(mcu_id); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateHardwareInfoDirect( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::datatypes::hardware_info::McuType mcu_id = solarxr_protocol::datatypes::hardware_info::McuType::Other, + const char *display_name = nullptr, + const char *model = nullptr, + const char *manufacturer = nullptr, + const char *hardware_revision = nullptr, + const char *firmware_version = nullptr, + const solarxr_protocol::datatypes::hardware_info::HardwareAddress *hardware_address = nullptr, + const solarxr_protocol::datatypes::Ipv4Address *ip_address = nullptr) { + auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; + auto model__ = model ? _fbb.CreateString(model) : 0; + auto manufacturer__ = manufacturer ? _fbb.CreateString(manufacturer) : 0; + auto hardware_revision__ = hardware_revision ? _fbb.CreateString(hardware_revision) : 0; + auto firmware_version__ = firmware_version ? _fbb.CreateString(firmware_version) : 0; + return solarxr_protocol::datatypes::hardware_info::CreateHardwareInfo( + _fbb, + mcu_id, + display_name__, + model__, + manufacturer__, + hardware_revision__, + firmware_version__, + hardware_address, + ip_address); +} + +/// Mostly-dynamic status info about a tracked device's firmware +struct HardwareStatus FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HardwareStatusBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ERROR_STATUS = 4, + VT_TPS = 6, + VT_PING = 8, + VT_RSSI = 10, + VT_MCU_TEMP = 12, + VT_BATTERY_VOLTAGE = 14, + VT_BATTERY_PCT_ESTIMATE = 16, + VT_LOG_DATA = 18 + }; + flatbuffers::Optional error_status() const { + return GetOptional(VT_ERROR_STATUS); + } + flatbuffers::Optional tps() const { + return GetOptional(VT_TPS); + } + flatbuffers::Optional ping() const { + return GetOptional(VT_PING); + } + /// “Received Signal Strength Indicator" between device and wifi adapter in dBm + flatbuffers::Optional rssi() const { + return GetOptional(VT_RSSI); + } + /// Temperature in degrees celsius + flatbuffers::Optional mcu_temp() const { + return GetOptional(VT_MCU_TEMP); + } + flatbuffers::Optional battery_voltage() const { + return GetOptional(VT_BATTERY_VOLTAGE); + } + flatbuffers::Optional battery_pct_estimate() const { + return GetOptional(VT_BATTERY_PCT_ESTIMATE); + } + const solarxr_protocol::datatypes::LogData *log_data() const { + return GetPointer(VT_LOG_DATA); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ERROR_STATUS, 1) && + VerifyField(verifier, VT_TPS, 1) && + VerifyField(verifier, VT_PING, 2) && + VerifyField(verifier, VT_RSSI, 2) && + VerifyField(verifier, VT_MCU_TEMP, 4) && + VerifyField(verifier, VT_BATTERY_VOLTAGE, 4) && + VerifyField(verifier, VT_BATTERY_PCT_ESTIMATE, 1) && + VerifyOffset(verifier, VT_LOG_DATA) && + verifier.VerifyTable(log_data()) && + verifier.EndTable(); + } +}; + +struct HardwareStatusBuilder { + typedef HardwareStatus Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_error_status(solarxr_protocol::datatypes::FirmwareErrorCode error_status) { + fbb_.AddElement(HardwareStatus::VT_ERROR_STATUS, static_cast(error_status)); + } + void add_tps(uint8_t tps) { + fbb_.AddElement(HardwareStatus::VT_TPS, tps); + } + void add_ping(uint16_t ping) { + fbb_.AddElement(HardwareStatus::VT_PING, ping); + } + void add_rssi(int16_t rssi) { + fbb_.AddElement(HardwareStatus::VT_RSSI, rssi); + } + void add_mcu_temp(float mcu_temp) { + fbb_.AddElement(HardwareStatus::VT_MCU_TEMP, mcu_temp); + } + void add_battery_voltage(float battery_voltage) { + fbb_.AddElement(HardwareStatus::VT_BATTERY_VOLTAGE, battery_voltage); + } + void add_battery_pct_estimate(uint8_t battery_pct_estimate) { + fbb_.AddElement(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, battery_pct_estimate); + } + void add_log_data(flatbuffers::Offset log_data) { + fbb_.AddOffset(HardwareStatus::VT_LOG_DATA, log_data); + } + explicit HardwareStatusBuilder(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 CreateHardwareStatus( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional error_status = flatbuffers::nullopt, + flatbuffers::Optional tps = flatbuffers::nullopt, + flatbuffers::Optional ping = flatbuffers::nullopt, + flatbuffers::Optional rssi = flatbuffers::nullopt, + flatbuffers::Optional mcu_temp = flatbuffers::nullopt, + flatbuffers::Optional battery_voltage = flatbuffers::nullopt, + flatbuffers::Optional battery_pct_estimate = flatbuffers::nullopt, + flatbuffers::Offset log_data = 0) { + HardwareStatusBuilder builder_(_fbb); + builder_.add_log_data(log_data); + if(battery_voltage) { builder_.add_battery_voltage(*battery_voltage); } + if(mcu_temp) { builder_.add_mcu_temp(*mcu_temp); } + if(rssi) { builder_.add_rssi(*rssi); } + if(ping) { builder_.add_ping(*ping); } + if(battery_pct_estimate) { builder_.add_battery_pct_estimate(*battery_pct_estimate); } + if(tps) { builder_.add_tps(*tps); } + if(error_status) { builder_.add_error_status(*error_status); } + return builder_.Finish(); +} + +/// A mask of the data in `FirmwareStatus` +struct FirmwareStatusMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FirmwareStatusMaskBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ERROR_STATUS = 4, + VT_TPS = 6, + VT_PING = 8, + VT_RSSI = 10, + VT_MCU_TEMP = 12, + VT_BATTERY_VOLTAGE = 14, + VT_BATTERY_PCT_ESTIMATE = 16 + }; + bool error_status() const { + return GetField(VT_ERROR_STATUS, 0) != 0; + } + bool tps() const { + return GetField(VT_TPS, 0) != 0; + } + bool ping() const { + return GetField(VT_PING, 0) != 0; + } + bool rssi() const { + return GetField(VT_RSSI, 0) != 0; + } + bool mcu_temp() const { + return GetField(VT_MCU_TEMP, 0) != 0; + } + bool battery_voltage() const { + return GetField(VT_BATTERY_VOLTAGE, 0) != 0; + } + bool battery_pct_estimate() const { + return GetField(VT_BATTERY_PCT_ESTIMATE, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ERROR_STATUS, 1) && + VerifyField(verifier, VT_TPS, 1) && + VerifyField(verifier, VT_PING, 1) && + VerifyField(verifier, VT_RSSI, 1) && + VerifyField(verifier, VT_MCU_TEMP, 1) && + VerifyField(verifier, VT_BATTERY_VOLTAGE, 1) && + VerifyField(verifier, VT_BATTERY_PCT_ESTIMATE, 1) && + verifier.EndTable(); + } +}; + +struct FirmwareStatusMaskBuilder { + typedef FirmwareStatusMask Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_error_status(bool error_status) { + fbb_.AddElement(FirmwareStatusMask::VT_ERROR_STATUS, static_cast(error_status), 0); + } + void add_tps(bool tps) { + fbb_.AddElement(FirmwareStatusMask::VT_TPS, static_cast(tps), 0); + } + void add_ping(bool ping) { + fbb_.AddElement(FirmwareStatusMask::VT_PING, static_cast(ping), 0); + } + void add_rssi(bool rssi) { + fbb_.AddElement(FirmwareStatusMask::VT_RSSI, static_cast(rssi), 0); + } + void add_mcu_temp(bool mcu_temp) { + fbb_.AddElement(FirmwareStatusMask::VT_MCU_TEMP, static_cast(mcu_temp), 0); + } + void add_battery_voltage(bool battery_voltage) { + fbb_.AddElement(FirmwareStatusMask::VT_BATTERY_VOLTAGE, static_cast(battery_voltage), 0); + } + void add_battery_pct_estimate(bool battery_pct_estimate) { + fbb_.AddElement(FirmwareStatusMask::VT_BATTERY_PCT_ESTIMATE, static_cast(battery_pct_estimate), 0); + } + explicit FirmwareStatusMaskBuilder(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 CreateFirmwareStatusMask( + flatbuffers::FlatBufferBuilder &_fbb, + bool error_status = false, + bool tps = false, + bool ping = false, + bool rssi = false, + bool mcu_temp = false, + bool battery_voltage = false, + bool battery_pct_estimate = false) { + FirmwareStatusMaskBuilder builder_(_fbb); + builder_.add_battery_pct_estimate(battery_pct_estimate); + builder_.add_battery_voltage(battery_voltage); + builder_.add_mcu_temp(mcu_temp); + builder_.add_rssi(rssi); + builder_.add_ping(ping); + builder_.add_tps(tps); + builder_.add_error_status(error_status); + return builder_.Finish(); +} + +} // namespace hardware_info +} // namespace datatypes + +namespace data_feed { +namespace tracker { + +/// Describes all possible information about a tracker. A tracker is anything that +/// provides kinematic data about a particular body part. +/// +/// Trackers may be synthetic/computed or instead part of an actual hardware device. +/// There can be multiple trackers per hardware device. +struct TrackerData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackerDataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_ID = 4, + VT_INFO = 6, + VT_STATUS = 8, + VT_ROTATION = 10, + VT_POSITION = 12, + VT_RAW_ROT_VEL = 14, + VT_RAW_TRANS_ACCEL = 16, + VT_TEMP = 18 + }; + const solarxr_protocol::datatypes::TrackerId *tracker_id() const { + return GetPointer(VT_TRACKER_ID); + } + const solarxr_protocol::data_feed::tracker::TrackerInfo *info() const { + return GetPointer(VT_INFO); + } + solarxr_protocol::datatypes::TrackerStatus status() const { + return static_cast(GetField(VT_STATUS, 0)); + } + const solarxr_protocol::datatypes::math::Quat *rotation() const { + return GetStruct(VT_ROTATION); + } + /// Position, in meters + const solarxr_protocol::datatypes::math::Vec3f *position() const { + return GetStruct(VT_POSITION); + } + /// Raw rotational velocity, in euler angles + const solarxr_protocol::datatypes::math::Vec3f *raw_rot_vel() const { + return GetStruct(VT_RAW_ROT_VEL); + } + /// Raw translational acceleration, in m/s^2 + const solarxr_protocol::datatypes::math::Vec3f *raw_trans_accel() const { + return GetStruct(VT_RAW_TRANS_ACCEL); + } + /// Temperature in degrees celsius + const solarxr_protocol::datatypes::Temperature *temp() const { + return GetStruct(VT_TEMP); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_ID) && + verifier.VerifyTable(tracker_id()) && + VerifyOffset(verifier, VT_INFO) && + verifier.VerifyTable(info()) && + VerifyField(verifier, VT_STATUS, 1) && + VerifyField(verifier, VT_ROTATION, 4) && + VerifyField(verifier, VT_POSITION, 4) && + VerifyField(verifier, VT_RAW_ROT_VEL, 4) && + VerifyField(verifier, VT_RAW_TRANS_ACCEL, 4) && + VerifyField(verifier, VT_TEMP, 4) && + verifier.EndTable(); + } +}; + +struct TrackerDataBuilder { + typedef TrackerData Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_id(flatbuffers::Offset tracker_id) { + fbb_.AddOffset(TrackerData::VT_TRACKER_ID, tracker_id); + } + void add_info(flatbuffers::Offset info) { + fbb_.AddOffset(TrackerData::VT_INFO, info); + } + void add_status(solarxr_protocol::datatypes::TrackerStatus status) { + fbb_.AddElement(TrackerData::VT_STATUS, static_cast(status), 0); + } + void add_rotation(const solarxr_protocol::datatypes::math::Quat *rotation) { + fbb_.AddStruct(TrackerData::VT_ROTATION, rotation); + } + void add_position(const solarxr_protocol::datatypes::math::Vec3f *position) { + fbb_.AddStruct(TrackerData::VT_POSITION, position); + } + void add_raw_rot_vel(const solarxr_protocol::datatypes::math::Vec3f *raw_rot_vel) { + fbb_.AddStruct(TrackerData::VT_RAW_ROT_VEL, raw_rot_vel); + } + void add_raw_trans_accel(const solarxr_protocol::datatypes::math::Vec3f *raw_trans_accel) { + fbb_.AddStruct(TrackerData::VT_RAW_TRANS_ACCEL, raw_trans_accel); + } + void add_temp(const solarxr_protocol::datatypes::Temperature *temp) { + fbb_.AddStruct(TrackerData::VT_TEMP, temp); + } + explicit TrackerDataBuilder(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 CreateTrackerData( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0, + flatbuffers::Offset info = 0, + solarxr_protocol::datatypes::TrackerStatus status = solarxr_protocol::datatypes::TrackerStatus::NONE, + const solarxr_protocol::datatypes::math::Quat *rotation = nullptr, + const solarxr_protocol::datatypes::math::Vec3f *position = nullptr, + const solarxr_protocol::datatypes::math::Vec3f *raw_rot_vel = nullptr, + const solarxr_protocol::datatypes::math::Vec3f *raw_trans_accel = nullptr, + const solarxr_protocol::datatypes::Temperature *temp = nullptr) { + TrackerDataBuilder builder_(_fbb); + builder_.add_temp(temp); + builder_.add_raw_trans_accel(raw_trans_accel); + builder_.add_raw_rot_vel(raw_rot_vel); + builder_.add_position(position); + builder_.add_rotation(rotation); + builder_.add_info(info); + builder_.add_tracker_id(tracker_id); + builder_.add_status(status); + return builder_.Finish(); +} + +/// A mask of the different components in `TrackerComponent` +struct TrackerDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackerDataMaskBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INFO = 4, + VT_STATUS = 6, + VT_ROTATION = 8, + VT_POSITION = 10, + VT_RAW_ROT_VEL = 12, + VT_RAW_TRANS_ACCEL = 14, + VT_TEMP = 16 + }; + bool info() const { + return GetField(VT_INFO, 0) != 0; + } + bool status() const { + return GetField(VT_STATUS, 0) != 0; + } + bool rotation() const { + return GetField(VT_ROTATION, 0) != 0; + } + bool position() const { + return GetField(VT_POSITION, 0) != 0; + } + bool raw_rot_vel() const { + return GetField(VT_RAW_ROT_VEL, 0) != 0; + } + bool raw_trans_accel() const { + return GetField(VT_RAW_TRANS_ACCEL, 0) != 0; + } + bool temp() const { + return GetField(VT_TEMP, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_INFO, 1) && + VerifyField(verifier, VT_STATUS, 1) && + VerifyField(verifier, VT_ROTATION, 1) && + VerifyField(verifier, VT_POSITION, 1) && + VerifyField(verifier, VT_RAW_ROT_VEL, 1) && + VerifyField(verifier, VT_RAW_TRANS_ACCEL, 1) && + VerifyField(verifier, VT_TEMP, 1) && + verifier.EndTable(); + } +}; + +struct TrackerDataMaskBuilder { + typedef TrackerDataMask Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_info(bool info) { + fbb_.AddElement(TrackerDataMask::VT_INFO, static_cast(info), 0); + } + void add_status(bool status) { + fbb_.AddElement(TrackerDataMask::VT_STATUS, static_cast(status), 0); + } + void add_rotation(bool rotation) { + fbb_.AddElement(TrackerDataMask::VT_ROTATION, static_cast(rotation), 0); + } + void add_position(bool position) { + fbb_.AddElement(TrackerDataMask::VT_POSITION, static_cast(position), 0); + } + void add_raw_rot_vel(bool raw_rot_vel) { + fbb_.AddElement(TrackerDataMask::VT_RAW_ROT_VEL, static_cast(raw_rot_vel), 0); + } + void add_raw_trans_accel(bool raw_trans_accel) { + fbb_.AddElement(TrackerDataMask::VT_RAW_TRANS_ACCEL, static_cast(raw_trans_accel), 0); + } + void add_temp(bool temp) { + fbb_.AddElement(TrackerDataMask::VT_TEMP, static_cast(temp), 0); + } + explicit TrackerDataMaskBuilder(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 CreateTrackerDataMask( + flatbuffers::FlatBufferBuilder &_fbb, + bool info = false, + bool status = false, + bool rotation = false, + bool position = false, + bool raw_rot_vel = false, + bool raw_trans_accel = false, + bool temp = false) { + TrackerDataMaskBuilder builder_(_fbb); + builder_.add_temp(temp); + builder_.add_raw_trans_accel(raw_trans_accel); + builder_.add_raw_rot_vel(raw_rot_vel); + builder_.add_position(position); + builder_.add_rotation(rotation); + builder_.add_status(status); + builder_.add_info(info); + return builder_.Finish(); +} + +/// Static description of a tracker +struct TrackerInfo FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TrackerInfoBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IMU_TYPE = 4, + VT_BODY_PART = 6, + VT_POLL_RATE = 8, + VT_MOUNTING_ORIENTATION = 10, + VT_EDITABLE = 12, + VT_COMPUTED = 14, + VT_DISPLAY_NAME = 16, + VT_CUSTOM_NAME = 18 + }; + solarxr_protocol::datatypes::hardware_info::ImuType imu_type() const { + return static_cast(GetField(VT_IMU_TYPE, 0)); + } + /// The user-assigned role of the tracker. + solarxr_protocol::datatypes::BodyPart body_part() const { + return static_cast(GetField(VT_BODY_PART, 0)); + } + /// average samples per second + const solarxr_protocol::datatypes::HzF32 *poll_rate() const { + return GetStruct(VT_POLL_RATE); + } + /// The orientation of the tracker when mounted on the body + const solarxr_protocol::datatypes::math::Quat *mounting_orientation() const { + return GetStruct(VT_MOUNTING_ORIENTATION); + } + bool editable() const { + return GetField(VT_EDITABLE, 0) != 0; + } + bool computed() const { + return GetField(VT_COMPUTED, 0) != 0; + } + /// A human-friendly name to display as the name of the tracker. + const flatbuffers::String *display_name() const { + return GetPointer(VT_DISPLAY_NAME); + } + /// name to display as the name of the tracker set by the user + const flatbuffers::String *custom_name() const { + return GetPointer(VT_CUSTOM_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IMU_TYPE, 2) && + VerifyField(verifier, VT_BODY_PART, 1) && + VerifyField(verifier, VT_POLL_RATE, 4) && + VerifyField(verifier, VT_MOUNTING_ORIENTATION, 4) && + VerifyField(verifier, VT_EDITABLE, 1) && + VerifyField(verifier, VT_COMPUTED, 1) && + VerifyOffset(verifier, VT_DISPLAY_NAME) && + verifier.VerifyString(display_name()) && + VerifyOffset(verifier, VT_CUSTOM_NAME) && + verifier.VerifyString(custom_name()) && + verifier.EndTable(); + } +}; + +struct TrackerInfoBuilder { + typedef TrackerInfo Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_imu_type(solarxr_protocol::datatypes::hardware_info::ImuType imu_type) { + fbb_.AddElement(TrackerInfo::VT_IMU_TYPE, static_cast(imu_type), 0); + } + void add_body_part(solarxr_protocol::datatypes::BodyPart body_part) { + fbb_.AddElement(TrackerInfo::VT_BODY_PART, static_cast(body_part), 0); + } + void add_poll_rate(const solarxr_protocol::datatypes::HzF32 *poll_rate) { + fbb_.AddStruct(TrackerInfo::VT_POLL_RATE, poll_rate); + } + void add_mounting_orientation(const solarxr_protocol::datatypes::math::Quat *mounting_orientation) { + fbb_.AddStruct(TrackerInfo::VT_MOUNTING_ORIENTATION, mounting_orientation); + } + void add_editable(bool editable) { + fbb_.AddElement(TrackerInfo::VT_EDITABLE, static_cast(editable), 0); + } + void add_computed(bool computed) { + fbb_.AddElement(TrackerInfo::VT_COMPUTED, static_cast(computed), 0); + } + void add_display_name(flatbuffers::Offset display_name) { + fbb_.AddOffset(TrackerInfo::VT_DISPLAY_NAME, display_name); + } + void add_custom_name(flatbuffers::Offset custom_name) { + fbb_.AddOffset(TrackerInfo::VT_CUSTOM_NAME, custom_name); + } + explicit TrackerInfoBuilder(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 CreateTrackerInfo( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::datatypes::hardware_info::ImuType imu_type = solarxr_protocol::datatypes::hardware_info::ImuType::Other, + solarxr_protocol::datatypes::BodyPart body_part = solarxr_protocol::datatypes::BodyPart::NONE, + const solarxr_protocol::datatypes::HzF32 *poll_rate = nullptr, + const solarxr_protocol::datatypes::math::Quat *mounting_orientation = nullptr, + bool editable = false, + bool computed = false, + flatbuffers::Offset display_name = 0, + flatbuffers::Offset custom_name = 0) { + TrackerInfoBuilder builder_(_fbb); + builder_.add_custom_name(custom_name); + builder_.add_display_name(display_name); + builder_.add_mounting_orientation(mounting_orientation); + builder_.add_poll_rate(poll_rate); + builder_.add_imu_type(imu_type); + builder_.add_computed(computed); + builder_.add_editable(editable); + builder_.add_body_part(body_part); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateTrackerInfoDirect( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::datatypes::hardware_info::ImuType imu_type = solarxr_protocol::datatypes::hardware_info::ImuType::Other, + solarxr_protocol::datatypes::BodyPart body_part = solarxr_protocol::datatypes::BodyPart::NONE, + const solarxr_protocol::datatypes::HzF32 *poll_rate = nullptr, + const solarxr_protocol::datatypes::math::Quat *mounting_orientation = nullptr, + bool editable = false, + bool computed = false, + const char *display_name = nullptr, + const char *custom_name = nullptr) { + auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; + auto custom_name__ = custom_name ? _fbb.CreateString(custom_name) : 0; + return solarxr_protocol::data_feed::tracker::CreateTrackerInfo( + _fbb, + imu_type, + body_part, + poll_rate, + mounting_orientation, + editable, + computed, + display_name__, + custom_name__); +} + +} // namespace tracker + +namespace device_data { + +/// A mask of values to be reported in subsequent DeviceStatus. Values set to `false` +/// or `null` will not reported. By default, all fields are false/null. +/// +/// If you set a value to `true`, it is not guaranteed that the sender actually has +/// such a value to send. In this case, they will probably send `null`, and the receiver +/// has the choice to disconnect due to missing data. +struct DeviceDataMask FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DeviceDataMaskBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_DATA = 4, + VT_DEVICE_DATA = 6 + }; + /// Which tracker data should be sent in this data feed + const solarxr_protocol::data_feed::tracker::TrackerDataMask *tracker_data() const { + return GetPointer(VT_TRACKER_DATA); + } + /// true if device data should be sent in this data feed + bool device_data() const { + return GetField(VT_DEVICE_DATA, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_DATA) && + verifier.VerifyTable(tracker_data()) && + VerifyField(verifier, VT_DEVICE_DATA, 1) && + verifier.EndTable(); + } +}; + +struct DeviceDataMaskBuilder { + typedef DeviceDataMask Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_data(flatbuffers::Offset tracker_data) { + fbb_.AddOffset(DeviceDataMask::VT_TRACKER_DATA, tracker_data); + } + void add_device_data(bool device_data) { + fbb_.AddElement(DeviceDataMask::VT_DEVICE_DATA, static_cast(device_data), 0); + } + explicit DeviceDataMaskBuilder(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 CreateDeviceDataMask( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_data = 0, + bool device_data = false) { + DeviceDataMaskBuilder builder_(_fbb); + builder_.add_tracker_data(tracker_data); + builder_.add_device_data(device_data); + return builder_.Finish(); +} + +/// Describes all possible information about a hardware device. For example, a +/// vive tracker is a single hardware device, and a slime tracker with two +/// extensions is a single hardware device but two trackers. +struct DeviceData FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DeviceDataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ID = 4, + VT_CUSTOM_NAME = 6, + VT_HARDWARE_INFO = 8, + VT_HARDWARE_STATUS = 10, + VT_TRACKERS = 12 + }; + const solarxr_protocol::datatypes::DeviceId *id() const { + return GetStruct(VT_ID); + } + /// The dynamically changeable name of the device. This might be set by the + /// user to help them remember which tracker is which. + const flatbuffers::String *custom_name() const { + return GetPointer(VT_CUSTOM_NAME); + } + /// Mostly-static info about the device hardware + const solarxr_protocol::datatypes::hardware_info::HardwareInfo *hardware_info() const { + return GetPointer(VT_HARDWARE_INFO); + } + /// General info about the status of the device + const solarxr_protocol::datatypes::hardware_info::HardwareStatus *hardware_status() const { + return GetPointer(VT_HARDWARE_STATUS); + } + /// Info about all trackers attached to this device + const flatbuffers::Vector> *trackers() const { + return GetPointer> *>(VT_TRACKERS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID, 1) && + VerifyOffset(verifier, VT_CUSTOM_NAME) && + verifier.VerifyString(custom_name()) && + VerifyOffset(verifier, VT_HARDWARE_INFO) && + verifier.VerifyTable(hardware_info()) && + VerifyOffset(verifier, VT_HARDWARE_STATUS) && + verifier.VerifyTable(hardware_status()) && + VerifyOffset(verifier, VT_TRACKERS) && + verifier.VerifyVector(trackers()) && + verifier.VerifyVectorOfTables(trackers()) && + verifier.EndTable(); + } +}; + +struct DeviceDataBuilder { + typedef DeviceData Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(const solarxr_protocol::datatypes::DeviceId *id) { + fbb_.AddStruct(DeviceData::VT_ID, id); + } + void add_custom_name(flatbuffers::Offset custom_name) { + fbb_.AddOffset(DeviceData::VT_CUSTOM_NAME, custom_name); + } + void add_hardware_info(flatbuffers::Offset hardware_info) { + fbb_.AddOffset(DeviceData::VT_HARDWARE_INFO, hardware_info); + } + void add_hardware_status(flatbuffers::Offset hardware_status) { + fbb_.AddOffset(DeviceData::VT_HARDWARE_STATUS, hardware_status); + } + void add_trackers(flatbuffers::Offset>> trackers) { + fbb_.AddOffset(DeviceData::VT_TRACKERS, trackers); + } + explicit DeviceDataBuilder(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 CreateDeviceData( + flatbuffers::FlatBufferBuilder &_fbb, + const solarxr_protocol::datatypes::DeviceId *id = nullptr, + flatbuffers::Offset custom_name = 0, + flatbuffers::Offset hardware_info = 0, + flatbuffers::Offset hardware_status = 0, + flatbuffers::Offset>> trackers = 0) { + DeviceDataBuilder builder_(_fbb); + builder_.add_trackers(trackers); + builder_.add_hardware_status(hardware_status); + builder_.add_hardware_info(hardware_info); + builder_.add_custom_name(custom_name); + builder_.add_id(id); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateDeviceDataDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const solarxr_protocol::datatypes::DeviceId *id = nullptr, + const char *custom_name = nullptr, + flatbuffers::Offset hardware_info = 0, + flatbuffers::Offset hardware_status = 0, + const std::vector> *trackers = nullptr) { + auto custom_name__ = custom_name ? _fbb.CreateString(custom_name) : 0; + auto trackers__ = trackers ? _fbb.CreateVector>(*trackers) : 0; + return solarxr_protocol::data_feed::device_data::CreateDeviceData( + _fbb, + id, + custom_name__, + hardware_info, + hardware_status, + trackers__); +} + +} // namespace device_data + +struct Bone FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BoneBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BODY_PART = 4, + VT_ROTATION_G = 6, + VT_BONE_LENGTH = 8, + VT_HEAD_POSITION_G = 10 + }; + solarxr_protocol::datatypes::BodyPart body_part() const { + return static_cast(GetField(VT_BODY_PART, 0)); + } + /// The global rotation of the bone. + /// + /// Note that the identity rotation is where a bone's tail is towards -y (assuming + /// the head of the bone is the origin) + const solarxr_protocol::datatypes::math::Quat *rotation_g() const { + return GetStruct(VT_ROTATION_G); + } + float bone_length() const { + return GetField(VT_BONE_LENGTH, 0.0f); + } + /// The global position of the head of this bone. + /// + /// The head of a bone is joint/node of the bone touching the parent bone. The + /// parent is defined as the bone closer to the HMD. + const solarxr_protocol::datatypes::math::Vec3f *head_position_g() const { + return GetStruct(VT_HEAD_POSITION_G); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BODY_PART, 1) && + VerifyField(verifier, VT_ROTATION_G, 4) && + VerifyField(verifier, VT_BONE_LENGTH, 4) && + VerifyField(verifier, VT_HEAD_POSITION_G, 4) && + verifier.EndTable(); + } +}; + +struct BoneBuilder { + typedef Bone Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_body_part(solarxr_protocol::datatypes::BodyPart body_part) { + fbb_.AddElement(Bone::VT_BODY_PART, static_cast(body_part), 0); + } + void add_rotation_g(const solarxr_protocol::datatypes::math::Quat *rotation_g) { + fbb_.AddStruct(Bone::VT_ROTATION_G, rotation_g); + } + void add_bone_length(float bone_length) { + fbb_.AddElement(Bone::VT_BONE_LENGTH, bone_length, 0.0f); + } + void add_head_position_g(const solarxr_protocol::datatypes::math::Vec3f *head_position_g) { + fbb_.AddStruct(Bone::VT_HEAD_POSITION_G, head_position_g); + } + explicit BoneBuilder(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 CreateBone( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::datatypes::BodyPart body_part = solarxr_protocol::datatypes::BodyPart::NONE, + const solarxr_protocol::datatypes::math::Quat *rotation_g = nullptr, + float bone_length = 0.0f, + const solarxr_protocol::datatypes::math::Vec3f *head_position_g = nullptr) { + BoneBuilder builder_(_fbb); + builder_.add_head_position_g(head_position_g); + builder_.add_bone_length(bone_length); + builder_.add_rotation_g(rotation_g); + builder_.add_body_part(body_part); + return builder_.Finish(); +} + +struct DataFeedMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DataFeedMessageHeaderBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MESSAGE_TYPE = 4, + VT_MESSAGE = 6 + }; + solarxr_protocol::data_feed::DataFeedMessage message_type() const { + return static_cast(GetField(VT_MESSAGE_TYPE, 0)); + } + const void *message() const { + return GetPointer(VT_MESSAGE); + } + template const T *message_as() const; + const solarxr_protocol::data_feed::PollDataFeed *message_as_PollDataFeed() const { + return message_type() == solarxr_protocol::data_feed::DataFeedMessage::PollDataFeed ? static_cast(message()) : nullptr; + } + const solarxr_protocol::data_feed::StartDataFeed *message_as_StartDataFeed() const { + return message_type() == solarxr_protocol::data_feed::DataFeedMessage::StartDataFeed ? static_cast(message()) : nullptr; + } + const solarxr_protocol::data_feed::DataFeedUpdate *message_as_DataFeedUpdate() const { + return message_type() == solarxr_protocol::data_feed::DataFeedMessage::DataFeedUpdate ? static_cast(message()) : nullptr; + } + const solarxr_protocol::data_feed::DataFeedConfig *message_as_DataFeedConfig() const { + return message_type() == solarxr_protocol::data_feed::DataFeedMessage::DataFeedConfig ? static_cast(message()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_MESSAGE_TYPE, 1) && + VerifyOffset(verifier, VT_MESSAGE) && + VerifyDataFeedMessage(verifier, message(), message_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::data_feed::PollDataFeed *DataFeedMessageHeader::message_as() const { + return message_as_PollDataFeed(); +} + +template<> inline const solarxr_protocol::data_feed::StartDataFeed *DataFeedMessageHeader::message_as() const { + return message_as_StartDataFeed(); +} + +template<> inline const solarxr_protocol::data_feed::DataFeedUpdate *DataFeedMessageHeader::message_as() const { + return message_as_DataFeedUpdate(); +} + +template<> inline const solarxr_protocol::data_feed::DataFeedConfig *DataFeedMessageHeader::message_as() const { + return message_as_DataFeedConfig(); +} + +struct DataFeedMessageHeaderBuilder { + typedef DataFeedMessageHeader Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_message_type(solarxr_protocol::data_feed::DataFeedMessage message_type) { + fbb_.AddElement(DataFeedMessageHeader::VT_MESSAGE_TYPE, static_cast(message_type), 0); + } + void add_message(flatbuffers::Offset message) { + fbb_.AddOffset(DataFeedMessageHeader::VT_MESSAGE, message); + } + explicit DataFeedMessageHeaderBuilder(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 CreateDataFeedMessageHeader( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::data_feed::DataFeedMessage message_type = solarxr_protocol::data_feed::DataFeedMessage::NONE, + flatbuffers::Offset message = 0) { + DataFeedMessageHeaderBuilder builder_(_fbb); + builder_.add_message(message); + builder_.add_message_type(message_type); + return builder_.Finish(); +} + +/// Requests for a single `Update` to be sent. This is helpful when getting +/// initial info about the device. +struct PollDataFeed FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PollDataFeedBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CONFIG = 4 + }; + const solarxr_protocol::data_feed::DataFeedConfig *config() const { + return GetPointer(VT_CONFIG); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_CONFIG) && + verifier.VerifyTable(config()) && + verifier.EndTable(); + } +}; + +struct PollDataFeedBuilder { + typedef PollDataFeed Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_config(flatbuffers::Offset config) { + fbb_.AddOffset(PollDataFeed::VT_CONFIG, config); + } + explicit PollDataFeedBuilder(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 CreatePollDataFeed( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset config = 0) { + PollDataFeedBuilder builder_(_fbb); + builder_.add_config(config); + return builder_.Finish(); +} + +/// Requests for the other party to send `data_feeds`. +/// For example, GUI requests for position data to be sent from server. +/// +/// When sending a new `StartFeed`, the old data feeds should stop being sent. +/// We still support multiple data feeds at the same time, because `data_feeds` +/// is a list. +/// +/// Multiple data feeds are useful to get data at different frequencies. +struct StartDataFeed FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StartDataFeedBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DATA_FEEDS = 4 + }; + const flatbuffers::Vector> *data_feeds() const { + return GetPointer> *>(VT_DATA_FEEDS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DATA_FEEDS) && + verifier.VerifyVector(data_feeds()) && + verifier.VerifyVectorOfTables(data_feeds()) && + verifier.EndTable(); + } +}; + +struct StartDataFeedBuilder { + typedef StartDataFeed Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_data_feeds(flatbuffers::Offset>> data_feeds) { + fbb_.AddOffset(StartDataFeed::VT_DATA_FEEDS, data_feeds); + } + explicit StartDataFeedBuilder(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 CreateStartDataFeed( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> data_feeds = 0) { + StartDataFeedBuilder builder_(_fbb); + builder_.add_data_feeds(data_feeds); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateStartDataFeedDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *data_feeds = nullptr) { + auto data_feeds__ = data_feeds ? _fbb.CreateVector>(*data_feeds) : 0; + return solarxr_protocol::data_feed::CreateStartDataFeed( + _fbb, + data_feeds__); +} + +/// All of the data components related to a single data feed. A data feed is comprised +/// of device data, and tracker data. +/// +/// A data feed might send data only when it changes/updates, and we should make no +/// assumptions that the data is actually delivered. If you want to guarantee +/// delivery and avoid dropped observations of data (such as a user-initiated +/// button press), it is better to use the RPC system. +struct DataFeedUpdate FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DataFeedUpdateBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICES = 4, + VT_SYNTHETIC_TRACKERS = 6, + VT_BONES = 8 + }; + const flatbuffers::Vector> *devices() const { + return GetPointer> *>(VT_DEVICES); + } + const flatbuffers::Vector> *synthetic_trackers() const { + return GetPointer> *>(VT_SYNTHETIC_TRACKERS); + } + /// This must represent a set, where there is no more than one bone for a `BodyPart`. + const flatbuffers::Vector> *bones() const { + return GetPointer> *>(VT_BONES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DEVICES) && + verifier.VerifyVector(devices()) && + verifier.VerifyVectorOfTables(devices()) && + VerifyOffset(verifier, VT_SYNTHETIC_TRACKERS) && + verifier.VerifyVector(synthetic_trackers()) && + verifier.VerifyVectorOfTables(synthetic_trackers()) && + VerifyOffset(verifier, VT_BONES) && + verifier.VerifyVector(bones()) && + verifier.VerifyVectorOfTables(bones()) && + verifier.EndTable(); + } +}; + +struct DataFeedUpdateBuilder { + typedef DataFeedUpdate Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_devices(flatbuffers::Offset>> devices) { + fbb_.AddOffset(DataFeedUpdate::VT_DEVICES, devices); + } + void add_synthetic_trackers(flatbuffers::Offset>> synthetic_trackers) { + fbb_.AddOffset(DataFeedUpdate::VT_SYNTHETIC_TRACKERS, synthetic_trackers); + } + void add_bones(flatbuffers::Offset>> bones) { + fbb_.AddOffset(DataFeedUpdate::VT_BONES, bones); + } + explicit DataFeedUpdateBuilder(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 CreateDataFeedUpdate( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> devices = 0, + flatbuffers::Offset>> synthetic_trackers = 0, + flatbuffers::Offset>> bones = 0) { + DataFeedUpdateBuilder builder_(_fbb); + builder_.add_bones(bones); + builder_.add_synthetic_trackers(synthetic_trackers); + builder_.add_devices(devices); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateDataFeedUpdateDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *devices = nullptr, + const std::vector> *synthetic_trackers = nullptr, + const std::vector> *bones = nullptr) { + auto devices__ = devices ? _fbb.CreateVector>(*devices) : 0; + auto synthetic_trackers__ = synthetic_trackers ? _fbb.CreateVector>(*synthetic_trackers) : 0; + auto bones__ = bones ? _fbb.CreateVector>(*bones) : 0; + return solarxr_protocol::data_feed::CreateDataFeedUpdate( + _fbb, + devices__, + synthetic_trackers__, + bones__); +} + +/// All information related to the configuration of a data feed. This may be sent +/// as part of a `StartFeed`. +struct DataFeedConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DataFeedConfigBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MINIMUM_TIME_SINCE_LAST = 4, + VT_DATA_MASK = 6, + VT_SYNTHETIC_TRACKERS_MASK = 8, + VT_BONE_MASK = 10 + }; + /// Minimum delay in milliseconds between new data updates. This value will be + /// ignored when used for a `PollDataFeed`. + uint16_t minimum_time_since_last() const { + return GetField(VT_MINIMUM_TIME_SINCE_LAST, 0); + } + const solarxr_protocol::data_feed::device_data::DeviceDataMask *data_mask() const { + return GetPointer(VT_DATA_MASK); + } + const solarxr_protocol::data_feed::tracker::TrackerDataMask *synthetic_trackers_mask() const { + return GetPointer(VT_SYNTHETIC_TRACKERS_MASK); + } + bool bone_mask() const { + return GetField(VT_BONE_MASK, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_MINIMUM_TIME_SINCE_LAST, 2) && + VerifyOffset(verifier, VT_DATA_MASK) && + verifier.VerifyTable(data_mask()) && + VerifyOffset(verifier, VT_SYNTHETIC_TRACKERS_MASK) && + verifier.VerifyTable(synthetic_trackers_mask()) && + VerifyField(verifier, VT_BONE_MASK, 1) && + verifier.EndTable(); + } +}; + +struct DataFeedConfigBuilder { + typedef DataFeedConfig Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_minimum_time_since_last(uint16_t minimum_time_since_last) { + fbb_.AddElement(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, minimum_time_since_last, 0); + } + void add_data_mask(flatbuffers::Offset data_mask) { + fbb_.AddOffset(DataFeedConfig::VT_DATA_MASK, data_mask); + } + void add_synthetic_trackers_mask(flatbuffers::Offset synthetic_trackers_mask) { + fbb_.AddOffset(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, synthetic_trackers_mask); + } + void add_bone_mask(bool bone_mask) { + fbb_.AddElement(DataFeedConfig::VT_BONE_MASK, static_cast(bone_mask), 0); + } + explicit DataFeedConfigBuilder(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 CreateDataFeedConfig( + flatbuffers::FlatBufferBuilder &_fbb, + uint16_t minimum_time_since_last = 0, + flatbuffers::Offset data_mask = 0, + flatbuffers::Offset synthetic_trackers_mask = 0, + bool bone_mask = false) { + DataFeedConfigBuilder builder_(_fbb); + builder_.add_synthetic_trackers_mask(synthetic_trackers_mask); + builder_.add_data_mask(data_mask); + builder_.add_minimum_time_since_last(minimum_time_since_last); + builder_.add_bone_mask(bone_mask); + return builder_.Finish(); +} + +} // namespace data_feed + +namespace rpc { +namespace settings { + +/// Settings for the skeletal model that are toggles. +struct ModelToggles FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ModelTogglesBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_EXTENDED_SPINE = 4, + VT_EXTENDED_PELVIS = 6, + VT_EXTENDED_KNEE = 8, + VT_FORCE_ARMS_FROM_HMD = 10, + VT_FLOOR_CLIP = 12, + VT_SKATING_CORRECTION = 14 + }; + flatbuffers::Optional extended_spine() const { + return GetOptional(VT_EXTENDED_SPINE); + } + flatbuffers::Optional extended_pelvis() const { + return GetOptional(VT_EXTENDED_PELVIS); + } + flatbuffers::Optional extended_knee() const { + return GetOptional(VT_EXTENDED_KNEE); + } + flatbuffers::Optional force_arms_from_hmd() const { + return GetOptional(VT_FORCE_ARMS_FROM_HMD); + } + flatbuffers::Optional floor_clip() const { + return GetOptional(VT_FLOOR_CLIP); + } + flatbuffers::Optional skating_correction() const { + return GetOptional(VT_SKATING_CORRECTION); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_EXTENDED_SPINE, 1) && + VerifyField(verifier, VT_EXTENDED_PELVIS, 1) && + VerifyField(verifier, VT_EXTENDED_KNEE, 1) && + VerifyField(verifier, VT_FORCE_ARMS_FROM_HMD, 1) && + VerifyField(verifier, VT_FLOOR_CLIP, 1) && + VerifyField(verifier, VT_SKATING_CORRECTION, 1) && + verifier.EndTable(); + } +}; + +struct ModelTogglesBuilder { + typedef ModelToggles Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_extended_spine(bool extended_spine) { + fbb_.AddElement(ModelToggles::VT_EXTENDED_SPINE, static_cast(extended_spine)); + } + void add_extended_pelvis(bool extended_pelvis) { + fbb_.AddElement(ModelToggles::VT_EXTENDED_PELVIS, static_cast(extended_pelvis)); + } + void add_extended_knee(bool extended_knee) { + fbb_.AddElement(ModelToggles::VT_EXTENDED_KNEE, static_cast(extended_knee)); + } + void add_force_arms_from_hmd(bool force_arms_from_hmd) { + fbb_.AddElement(ModelToggles::VT_FORCE_ARMS_FROM_HMD, static_cast(force_arms_from_hmd)); + } + void add_floor_clip(bool floor_clip) { + fbb_.AddElement(ModelToggles::VT_FLOOR_CLIP, static_cast(floor_clip)); + } + void add_skating_correction(bool skating_correction) { + fbb_.AddElement(ModelToggles::VT_SKATING_CORRECTION, static_cast(skating_correction)); + } + explicit ModelTogglesBuilder(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 CreateModelToggles( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional extended_spine = flatbuffers::nullopt, + flatbuffers::Optional extended_pelvis = flatbuffers::nullopt, + flatbuffers::Optional extended_knee = flatbuffers::nullopt, + flatbuffers::Optional force_arms_from_hmd = flatbuffers::nullopt, + flatbuffers::Optional floor_clip = flatbuffers::nullopt, + flatbuffers::Optional skating_correction = flatbuffers::nullopt) { + ModelTogglesBuilder builder_(_fbb); + if(skating_correction) { builder_.add_skating_correction(*skating_correction); } + if(floor_clip) { builder_.add_floor_clip(*floor_clip); } + if(force_arms_from_hmd) { builder_.add_force_arms_from_hmd(*force_arms_from_hmd); } + if(extended_knee) { builder_.add_extended_knee(*extended_knee); } + if(extended_pelvis) { builder_.add_extended_pelvis(*extended_pelvis); } + if(extended_spine) { builder_.add_extended_spine(*extended_spine); } + return builder_.Finish(); +} + +/// Settings for the skeletal model that are ratios. +/// These values range from 0 to 1. +struct ModelRatios FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ModelRatiosBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IMPUTE_WAIST_FROM_CHEST_HIP = 4, + VT_IMPUTE_WAIST_FROM_CHEST_LEGS = 6, + VT_IMPUTE_HIP_FROM_CHEST_LEGS = 8, + VT_IMPUTE_HIP_FROM_WAIST_LEGS = 10, + VT_INTERP_HIP_LEGS = 12, + VT_INTERP_KNEE_TRACKER_ANKLE = 14 + }; + flatbuffers::Optional impute_waist_from_chest_hip() const { + return GetOptional(VT_IMPUTE_WAIST_FROM_CHEST_HIP); + } + flatbuffers::Optional impute_waist_from_chest_legs() const { + return GetOptional(VT_IMPUTE_WAIST_FROM_CHEST_LEGS); + } + flatbuffers::Optional impute_hip_from_chest_legs() const { + return GetOptional(VT_IMPUTE_HIP_FROM_CHEST_LEGS); + } + flatbuffers::Optional impute_hip_from_waist_legs() const { + return GetOptional(VT_IMPUTE_HIP_FROM_WAIST_LEGS); + } + /// Hip's yaw and roll is set to the average of legs when 1.0 + flatbuffers::Optional interp_hip_legs() const { + return GetOptional(VT_INTERP_HIP_LEGS); + } + /// Knee trackers' yaw and roll is set to the ankle's when 1.0 + flatbuffers::Optional interp_knee_tracker_ankle() const { + return GetOptional(VT_INTERP_KNEE_TRACKER_ANKLE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IMPUTE_WAIST_FROM_CHEST_HIP, 4) && + VerifyField(verifier, VT_IMPUTE_WAIST_FROM_CHEST_LEGS, 4) && + VerifyField(verifier, VT_IMPUTE_HIP_FROM_CHEST_LEGS, 4) && + VerifyField(verifier, VT_IMPUTE_HIP_FROM_WAIST_LEGS, 4) && + VerifyField(verifier, VT_INTERP_HIP_LEGS, 4) && + VerifyField(verifier, VT_INTERP_KNEE_TRACKER_ANKLE, 4) && + verifier.EndTable(); + } +}; + +struct ModelRatiosBuilder { + typedef ModelRatios Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_impute_waist_from_chest_hip(float impute_waist_from_chest_hip) { + fbb_.AddElement(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, impute_waist_from_chest_hip); + } + void add_impute_waist_from_chest_legs(float impute_waist_from_chest_legs) { + fbb_.AddElement(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, impute_waist_from_chest_legs); + } + void add_impute_hip_from_chest_legs(float impute_hip_from_chest_legs) { + fbb_.AddElement(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, impute_hip_from_chest_legs); + } + void add_impute_hip_from_waist_legs(float impute_hip_from_waist_legs) { + fbb_.AddElement(ModelRatios::VT_IMPUTE_HIP_FROM_WAIST_LEGS, impute_hip_from_waist_legs); + } + void add_interp_hip_legs(float interp_hip_legs) { + fbb_.AddElement(ModelRatios::VT_INTERP_HIP_LEGS, interp_hip_legs); + } + void add_interp_knee_tracker_ankle(float interp_knee_tracker_ankle) { + fbb_.AddElement(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, interp_knee_tracker_ankle); + } + explicit ModelRatiosBuilder(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 CreateModelRatios( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional impute_waist_from_chest_hip = flatbuffers::nullopt, + flatbuffers::Optional impute_waist_from_chest_legs = flatbuffers::nullopt, + flatbuffers::Optional impute_hip_from_chest_legs = flatbuffers::nullopt, + flatbuffers::Optional impute_hip_from_waist_legs = flatbuffers::nullopt, + flatbuffers::Optional interp_hip_legs = flatbuffers::nullopt, + flatbuffers::Optional interp_knee_tracker_ankle = flatbuffers::nullopt) { + ModelRatiosBuilder builder_(_fbb); + if(interp_knee_tracker_ankle) { builder_.add_interp_knee_tracker_ankle(*interp_knee_tracker_ankle); } + if(interp_hip_legs) { builder_.add_interp_hip_legs(*interp_hip_legs); } + if(impute_hip_from_waist_legs) { builder_.add_impute_hip_from_waist_legs(*impute_hip_from_waist_legs); } + if(impute_hip_from_chest_legs) { builder_.add_impute_hip_from_chest_legs(*impute_hip_from_chest_legs); } + if(impute_waist_from_chest_legs) { builder_.add_impute_waist_from_chest_legs(*impute_waist_from_chest_legs); } + if(impute_waist_from_chest_hip) { builder_.add_impute_waist_from_chest_hip(*impute_waist_from_chest_hip); } + return builder_.Finish(); +} + +/// Settings for the skeletal model. +struct ModelSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ModelSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TOGGLES = 4, + VT_RATIOS = 6 + }; + const solarxr_protocol::rpc::settings::ModelToggles *toggles() const { + return GetPointer(VT_TOGGLES); + } + const solarxr_protocol::rpc::settings::ModelRatios *ratios() const { + return GetPointer(VT_RATIOS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TOGGLES) && + verifier.VerifyTable(toggles()) && + VerifyOffset(verifier, VT_RATIOS) && + verifier.VerifyTable(ratios()) && + verifier.EndTable(); + } +}; + +struct ModelSettingsBuilder { + typedef ModelSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_toggles(flatbuffers::Offset toggles) { + fbb_.AddOffset(ModelSettings::VT_TOGGLES, toggles); + } + void add_ratios(flatbuffers::Offset ratios) { + fbb_.AddOffset(ModelSettings::VT_RATIOS, ratios); + } + explicit ModelSettingsBuilder(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 CreateModelSettings( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset toggles = 0, + flatbuffers::Offset ratios = 0) { + ModelSettingsBuilder builder_(_fbb); + builder_.add_ratios(ratios); + builder_.add_toggles(toggles); + return builder_.Finish(); +} + +} // namespace settings + +struct RpcMessageHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RpcMessageHeaderBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TX_ID = 4, + VT_MESSAGE_TYPE = 6, + VT_MESSAGE = 8 + }; + /// For a request, this identifies the request. For a response, this corresponds + /// to the request that it is responding to. + const solarxr_protocol::datatypes::TransactionId *tx_id() const { + return GetStruct(VT_TX_ID); + } + solarxr_protocol::rpc::RpcMessage message_type() const { + return static_cast(GetField(VT_MESSAGE_TYPE, 0)); + } + const void *message() const { + return GetPointer(VT_MESSAGE); + } + template const T *message_as() const; + const solarxr_protocol::rpc::HeartbeatRequest *message_as_HeartbeatRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::HeartbeatRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::HeartbeatResponse *message_as_HeartbeatResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::HeartbeatResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ResetRequest *message_as_ResetRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ResetRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AssignTrackerRequest *message_as_AssignTrackerRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AssignTrackerRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SettingsRequest *message_as_SettingsRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SettingsRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SettingsResponse *message_as_SettingsResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SettingsResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ChangeSettingsRequest *message_as_ChangeSettingsRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ChangeSettingsRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::RecordBVHRequest *message_as_RecordBVHRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::RecordBVHRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::RecordBVHStatus *message_as_RecordBVHStatus() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::RecordBVHStatus ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SkeletonConfigRequest *message_as_SkeletonConfigRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SkeletonConfigRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::ChangeSkeletonConfigRequest *message_as_ChangeSkeletonConfigRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::ChangeSkeletonConfigRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SkeletonResetAllRequest *message_as_SkeletonResetAllRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SkeletonResetAllRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SkeletonConfigResponse *message_as_SkeletonConfigResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SkeletonConfigResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::OpenSerialRequest *message_as_OpenSerialRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::OpenSerialRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::CloseSerialRequest *message_as_CloseSerialRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::CloseSerialRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SetWifiRequest *message_as_SetWifiRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SetWifiRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialUpdateResponse *message_as_SerialUpdateResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialUpdateResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AutoBoneProcessRequest *message_as_AutoBoneProcessRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneProcessRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AutoBoneProcessStatusResponse *message_as_AutoBoneProcessStatusResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneProcessStatusResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::AutoBoneEpochResponse *message_as_AutoBoneEpochResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::AutoBoneEpochResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::OverlayDisplayModeRequest *message_as_OverlayDisplayModeRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::OverlayDisplayModeChangeRequest *message_as_OverlayDisplayModeChangeRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeChangeRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::OverlayDisplayModeResponse *message_as_OverlayDisplayModeResponse() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::OverlayDisplayModeResponse ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialTrackerRebootRequest *message_as_SerialTrackerRebootRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerRebootRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialTrackerGetInfoRequest *message_as_SerialTrackerGetInfoRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerGetInfoRequest ? static_cast(message()) : nullptr; + } + const solarxr_protocol::rpc::SerialTrackerFactoryResetRequest *message_as_SerialTrackerFactoryResetRequest() const { + return message_type() == solarxr_protocol::rpc::RpcMessage::SerialTrackerFactoryResetRequest ? static_cast(message()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TX_ID, 4) && + VerifyField(verifier, VT_MESSAGE_TYPE, 1) && + VerifyOffset(verifier, VT_MESSAGE) && + VerifyRpcMessage(verifier, message(), message_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::rpc::HeartbeatRequest *RpcMessageHeader::message_as() const { + return message_as_HeartbeatRequest(); +} + +template<> inline const solarxr_protocol::rpc::HeartbeatResponse *RpcMessageHeader::message_as() const { + return message_as_HeartbeatResponse(); +} + +template<> inline const solarxr_protocol::rpc::ResetRequest *RpcMessageHeader::message_as() const { + return message_as_ResetRequest(); +} + +template<> inline const solarxr_protocol::rpc::AssignTrackerRequest *RpcMessageHeader::message_as() const { + return message_as_AssignTrackerRequest(); +} + +template<> inline const solarxr_protocol::rpc::SettingsRequest *RpcMessageHeader::message_as() const { + return message_as_SettingsRequest(); +} + +template<> inline const solarxr_protocol::rpc::SettingsResponse *RpcMessageHeader::message_as() const { + return message_as_SettingsResponse(); +} + +template<> inline const solarxr_protocol::rpc::ChangeSettingsRequest *RpcMessageHeader::message_as() const { + return message_as_ChangeSettingsRequest(); +} + +template<> inline const solarxr_protocol::rpc::RecordBVHRequest *RpcMessageHeader::message_as() const { + return message_as_RecordBVHRequest(); +} + +template<> inline const solarxr_protocol::rpc::RecordBVHStatus *RpcMessageHeader::message_as() const { + return message_as_RecordBVHStatus(); +} + +template<> inline const solarxr_protocol::rpc::SkeletonConfigRequest *RpcMessageHeader::message_as() const { + return message_as_SkeletonConfigRequest(); +} + +template<> inline const solarxr_protocol::rpc::ChangeSkeletonConfigRequest *RpcMessageHeader::message_as() const { + return message_as_ChangeSkeletonConfigRequest(); +} + +template<> inline const solarxr_protocol::rpc::SkeletonResetAllRequest *RpcMessageHeader::message_as() const { + return message_as_SkeletonResetAllRequest(); +} + +template<> inline const solarxr_protocol::rpc::SkeletonConfigResponse *RpcMessageHeader::message_as() const { + return message_as_SkeletonConfigResponse(); +} + +template<> inline const solarxr_protocol::rpc::OpenSerialRequest *RpcMessageHeader::message_as() const { + return message_as_OpenSerialRequest(); +} + +template<> inline const solarxr_protocol::rpc::CloseSerialRequest *RpcMessageHeader::message_as() const { + return message_as_CloseSerialRequest(); +} + +template<> inline const solarxr_protocol::rpc::SetWifiRequest *RpcMessageHeader::message_as() const { + return message_as_SetWifiRequest(); +} + +template<> inline const solarxr_protocol::rpc::SerialUpdateResponse *RpcMessageHeader::message_as() const { + return message_as_SerialUpdateResponse(); +} + +template<> inline const solarxr_protocol::rpc::AutoBoneProcessRequest *RpcMessageHeader::message_as() const { + return message_as_AutoBoneProcessRequest(); +} + +template<> inline const solarxr_protocol::rpc::AutoBoneProcessStatusResponse *RpcMessageHeader::message_as() const { + return message_as_AutoBoneProcessStatusResponse(); +} + +template<> inline const solarxr_protocol::rpc::AutoBoneEpochResponse *RpcMessageHeader::message_as() const { + return message_as_AutoBoneEpochResponse(); +} + +template<> inline const solarxr_protocol::rpc::OverlayDisplayModeRequest *RpcMessageHeader::message_as() const { + return message_as_OverlayDisplayModeRequest(); +} + +template<> inline const solarxr_protocol::rpc::OverlayDisplayModeChangeRequest *RpcMessageHeader::message_as() const { + return message_as_OverlayDisplayModeChangeRequest(); +} + +template<> inline const solarxr_protocol::rpc::OverlayDisplayModeResponse *RpcMessageHeader::message_as() const { + return message_as_OverlayDisplayModeResponse(); +} + +template<> inline const solarxr_protocol::rpc::SerialTrackerRebootRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerRebootRequest(); +} + +template<> inline const solarxr_protocol::rpc::SerialTrackerGetInfoRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerGetInfoRequest(); +} + +template<> inline const solarxr_protocol::rpc::SerialTrackerFactoryResetRequest *RpcMessageHeader::message_as() const { + return message_as_SerialTrackerFactoryResetRequest(); +} + +struct RpcMessageHeaderBuilder { + typedef RpcMessageHeader Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tx_id(const solarxr_protocol::datatypes::TransactionId *tx_id) { + fbb_.AddStruct(RpcMessageHeader::VT_TX_ID, tx_id); + } + void add_message_type(solarxr_protocol::rpc::RpcMessage message_type) { + fbb_.AddElement(RpcMessageHeader::VT_MESSAGE_TYPE, static_cast(message_type), 0); + } + void add_message(flatbuffers::Offset message) { + fbb_.AddOffset(RpcMessageHeader::VT_MESSAGE, message); + } + explicit RpcMessageHeaderBuilder(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 CreateRpcMessageHeader( + flatbuffers::FlatBufferBuilder &_fbb, + const solarxr_protocol::datatypes::TransactionId *tx_id = nullptr, + solarxr_protocol::rpc::RpcMessage message_type = solarxr_protocol::rpc::RpcMessage::NONE, + flatbuffers::Offset message = 0) { + RpcMessageHeaderBuilder builder_(_fbb); + builder_.add_message(message); + builder_.add_tx_id(tx_id); + builder_.add_message_type(message_type); + return builder_.Finish(); +} + +struct HeartbeatRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HeartbeatRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct HeartbeatRequestBuilder { + typedef HeartbeatRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HeartbeatRequestBuilder(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 CreateHeartbeatRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + HeartbeatRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct HeartbeatResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HeartbeatResponseBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct HeartbeatResponseBuilder { + typedef HeartbeatResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HeartbeatResponseBuilder(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 CreateHeartbeatResponse( + flatbuffers::FlatBufferBuilder &_fbb) { + HeartbeatResponseBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct ResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResetRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RESET_TYPE = 4 + }; + solarxr_protocol::rpc::ResetType reset_type() const { + return static_cast(GetField(VT_RESET_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_RESET_TYPE, 1) && + verifier.EndTable(); + } +}; + +struct ResetRequestBuilder { + typedef ResetRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_reset_type(solarxr_protocol::rpc::ResetType reset_type) { + fbb_.AddElement(ResetRequest::VT_RESET_TYPE, static_cast(reset_type), 0); + } + explicit ResetRequestBuilder(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 CreateResetRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::ResetType reset_type = solarxr_protocol::rpc::ResetType::Quick) { + ResetRequestBuilder builder_(_fbb); + builder_.add_reset_type(reset_type); + return builder_.Finish(); +} + +struct ResetResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResetResponseBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct ResetResponseBuilder { + typedef ResetResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ResetResponseBuilder(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 CreateResetResponse( + flatbuffers::FlatBufferBuilder &_fbb) { + ResetResponseBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct AssignTrackerRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AssignTrackerRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRACKER_ID = 4, + VT_BODY_POSITION = 6, + VT_MOUNTING_ROTATION = 8, + VT_DISPLAY_NAME = 10 + }; + const solarxr_protocol::datatypes::TrackerId *tracker_id() const { + return GetPointer(VT_TRACKER_ID); + } + solarxr_protocol::datatypes::BodyPart body_position() const { + return static_cast(GetField(VT_BODY_POSITION, 0)); + } + const solarxr_protocol::datatypes::math::Quat *mounting_rotation() const { + return GetStruct(VT_MOUNTING_ROTATION); + } + const flatbuffers::String *display_name() const { + return GetPointer(VT_DISPLAY_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TRACKER_ID) && + verifier.VerifyTable(tracker_id()) && + VerifyField(verifier, VT_BODY_POSITION, 1) && + VerifyField(verifier, VT_MOUNTING_ROTATION, 4) && + VerifyOffset(verifier, VT_DISPLAY_NAME) && + verifier.VerifyString(display_name()) && + verifier.EndTable(); + } +}; + +struct AssignTrackerRequestBuilder { + typedef AssignTrackerRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tracker_id(flatbuffers::Offset tracker_id) { + fbb_.AddOffset(AssignTrackerRequest::VT_TRACKER_ID, tracker_id); + } + void add_body_position(solarxr_protocol::datatypes::BodyPart body_position) { + fbb_.AddElement(AssignTrackerRequest::VT_BODY_POSITION, static_cast(body_position), 0); + } + void add_mounting_rotation(const solarxr_protocol::datatypes::math::Quat *mounting_rotation) { + fbb_.AddStruct(AssignTrackerRequest::VT_MOUNTING_ROTATION, mounting_rotation); + } + void add_display_name(flatbuffers::Offset display_name) { + fbb_.AddOffset(AssignTrackerRequest::VT_DISPLAY_NAME, display_name); + } + explicit AssignTrackerRequestBuilder(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 CreateAssignTrackerRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0, + solarxr_protocol::datatypes::BodyPart body_position = solarxr_protocol::datatypes::BodyPart::NONE, + const solarxr_protocol::datatypes::math::Quat *mounting_rotation = nullptr, + flatbuffers::Offset display_name = 0) { + AssignTrackerRequestBuilder builder_(_fbb); + builder_.add_display_name(display_name); + builder_.add_mounting_rotation(mounting_rotation); + builder_.add_tracker_id(tracker_id); + builder_.add_body_position(body_position); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateAssignTrackerRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset tracker_id = 0, + solarxr_protocol::datatypes::BodyPart body_position = solarxr_protocol::datatypes::BodyPart::NONE, + const solarxr_protocol::datatypes::math::Quat *mounting_rotation = nullptr, + const char *display_name = nullptr) { + auto display_name__ = display_name ? _fbb.CreateString(display_name) : 0; + return solarxr_protocol::rpc::CreateAssignTrackerRequest( + _fbb, + tracker_id, + body_position, + mounting_rotation, + display_name__); +} + +struct SettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SettingsRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SettingsRequestBuilder { + typedef SettingsRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SettingsRequestBuilder(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 CreateSettingsRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SettingsRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct SettingsResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SettingsResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_STEAM_VR_TRACKERS = 4, + VT_FILTERING = 6, + VT_MODEL_SETTINGS = 8 + }; + const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { + return GetPointer(VT_STEAM_VR_TRACKERS); + } + const solarxr_protocol::rpc::FilteringSettings *filtering() const { + return GetPointer(VT_FILTERING); + } + const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { + return GetPointer(VT_MODEL_SETTINGS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && + verifier.VerifyTable(steam_vr_trackers()) && + VerifyOffset(verifier, VT_FILTERING) && + verifier.VerifyTable(filtering()) && + VerifyOffset(verifier, VT_MODEL_SETTINGS) && + verifier.VerifyTable(model_settings()) && + verifier.EndTable(); + } +}; + +struct SettingsResponseBuilder { + typedef SettingsResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_steam_vr_trackers(flatbuffers::Offset steam_vr_trackers) { + fbb_.AddOffset(SettingsResponse::VT_STEAM_VR_TRACKERS, steam_vr_trackers); + } + void add_filtering(flatbuffers::Offset filtering) { + fbb_.AddOffset(SettingsResponse::VT_FILTERING, filtering); + } + void add_model_settings(flatbuffers::Offset model_settings) { + fbb_.AddOffset(SettingsResponse::VT_MODEL_SETTINGS, model_settings); + } + explicit SettingsResponseBuilder(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 CreateSettingsResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset steam_vr_trackers = 0, + flatbuffers::Offset filtering = 0, + flatbuffers::Offset model_settings = 0) { + SettingsResponseBuilder builder_(_fbb); + builder_.add_model_settings(model_settings); + builder_.add_filtering(filtering); + builder_.add_steam_vr_trackers(steam_vr_trackers); + return builder_.Finish(); +} + +struct ChangeSettingsRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ChangeSettingsRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_STEAM_VR_TRACKERS = 4, + VT_FILTERING = 6, + VT_MODEL_SETTINGS = 8 + }; + const solarxr_protocol::rpc::SteamVRTrackersSetting *steam_vr_trackers() const { + return GetPointer(VT_STEAM_VR_TRACKERS); + } + const solarxr_protocol::rpc::FilteringSettings *filtering() const { + return GetPointer(VT_FILTERING); + } + const solarxr_protocol::rpc::settings::ModelSettings *model_settings() const { + return GetPointer(VT_MODEL_SETTINGS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_STEAM_VR_TRACKERS) && + verifier.VerifyTable(steam_vr_trackers()) && + VerifyOffset(verifier, VT_FILTERING) && + verifier.VerifyTable(filtering()) && + VerifyOffset(verifier, VT_MODEL_SETTINGS) && + verifier.VerifyTable(model_settings()) && + verifier.EndTable(); + } +}; + +struct ChangeSettingsRequestBuilder { + typedef ChangeSettingsRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_steam_vr_trackers(flatbuffers::Offset steam_vr_trackers) { + fbb_.AddOffset(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, steam_vr_trackers); + } + void add_filtering(flatbuffers::Offset filtering) { + fbb_.AddOffset(ChangeSettingsRequest::VT_FILTERING, filtering); + } + void add_model_settings(flatbuffers::Offset model_settings) { + fbb_.AddOffset(ChangeSettingsRequest::VT_MODEL_SETTINGS, model_settings); + } + explicit ChangeSettingsRequestBuilder(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 CreateChangeSettingsRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset steam_vr_trackers = 0, + flatbuffers::Offset filtering = 0, + flatbuffers::Offset model_settings = 0) { + ChangeSettingsRequestBuilder builder_(_fbb); + builder_.add_model_settings(model_settings); + builder_.add_filtering(filtering); + builder_.add_steam_vr_trackers(steam_vr_trackers); + return builder_.Finish(); +} + +struct SteamVRTrackersSetting FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SteamVRTrackersSettingBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_WAIST = 4, + VT_CHEST = 6, + VT_LEGS = 8, + VT_KNEES = 10, + VT_ELBOWS = 12 + }; + bool waist() const { + return GetField(VT_WAIST, 0) != 0; + } + bool chest() const { + return GetField(VT_CHEST, 0) != 0; + } + bool legs() const { + return GetField(VT_LEGS, 0) != 0; + } + bool knees() const { + return GetField(VT_KNEES, 0) != 0; + } + bool elbows() const { + return GetField(VT_ELBOWS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_WAIST, 1) && + VerifyField(verifier, VT_CHEST, 1) && + VerifyField(verifier, VT_LEGS, 1) && + VerifyField(verifier, VT_KNEES, 1) && + VerifyField(verifier, VT_ELBOWS, 1) && + verifier.EndTable(); + } +}; + +struct SteamVRTrackersSettingBuilder { + typedef SteamVRTrackersSetting Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_waist(bool waist) { + fbb_.AddElement(SteamVRTrackersSetting::VT_WAIST, static_cast(waist), 0); + } + void add_chest(bool chest) { + fbb_.AddElement(SteamVRTrackersSetting::VT_CHEST, static_cast(chest), 0); + } + void add_legs(bool legs) { + fbb_.AddElement(SteamVRTrackersSetting::VT_LEGS, static_cast(legs), 0); + } + void add_knees(bool knees) { + fbb_.AddElement(SteamVRTrackersSetting::VT_KNEES, static_cast(knees), 0); + } + void add_elbows(bool elbows) { + fbb_.AddElement(SteamVRTrackersSetting::VT_ELBOWS, static_cast(elbows), 0); + } + explicit SteamVRTrackersSettingBuilder(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 CreateSteamVRTrackersSetting( + flatbuffers::FlatBufferBuilder &_fbb, + bool waist = false, + bool chest = false, + bool legs = false, + bool knees = false, + bool elbows = false) { + SteamVRTrackersSettingBuilder builder_(_fbb); + builder_.add_elbows(elbows); + builder_.add_knees(knees); + builder_.add_legs(legs); + builder_.add_chest(chest); + builder_.add_waist(waist); + return builder_.Finish(); +} + +struct FilteringSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FilteringSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TYPE = 4, + VT_AMOUNT = 6 + }; + solarxr_protocol::datatypes::FilteringType type() const { + return static_cast(GetField(VT_TYPE, 0)); + } + /// 0 to 1. A higher value results in more smoothing or prediction + float amount() const { + return GetField(VT_AMOUNT, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TYPE, 1) && + VerifyField(verifier, VT_AMOUNT, 4) && + verifier.EndTable(); + } +}; + +struct FilteringSettingsBuilder { + typedef FilteringSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_type(solarxr_protocol::datatypes::FilteringType type) { + fbb_.AddElement(FilteringSettings::VT_TYPE, static_cast(type), 0); + } + void add_amount(float amount) { + fbb_.AddElement(FilteringSettings::VT_AMOUNT, amount, 0.0f); + } + explicit FilteringSettingsBuilder(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 CreateFilteringSettings( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::datatypes::FilteringType type = solarxr_protocol::datatypes::FilteringType::NONE, + float amount = 0.0f) { + FilteringSettingsBuilder builder_(_fbb); + builder_.add_amount(amount); + builder_.add_type(type); + return builder_.Finish(); +} + +struct RecordBVHRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RecordBVHRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_STOP = 4 + }; + bool stop() const { + return GetField(VT_STOP, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_STOP, 1) && + verifier.EndTable(); + } +}; + +struct RecordBVHRequestBuilder { + typedef RecordBVHRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_stop(bool stop) { + fbb_.AddElement(RecordBVHRequest::VT_STOP, static_cast(stop), 0); + } + explicit RecordBVHRequestBuilder(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 CreateRecordBVHRequest( + flatbuffers::FlatBufferBuilder &_fbb, + bool stop = false) { + RecordBVHRequestBuilder builder_(_fbb); + builder_.add_stop(stop); + return builder_.Finish(); +} + +struct RecordBVHStatus FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RecordBVHStatusBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RECORDING = 4 + }; + bool recording() const { + return GetField(VT_RECORDING, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_RECORDING, 1) && + verifier.EndTable(); + } +}; + +struct RecordBVHStatusBuilder { + typedef RecordBVHStatus Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_recording(bool recording) { + fbb_.AddElement(RecordBVHStatus::VT_RECORDING, static_cast(recording), 0); + } + explicit RecordBVHStatusBuilder(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 CreateRecordBVHStatus( + flatbuffers::FlatBufferBuilder &_fbb, + bool recording = false) { + RecordBVHStatusBuilder builder_(_fbb); + builder_.add_recording(recording); + return builder_.Finish(); +} + +struct SkeletonPart FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SkeletonPartBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BONE = 4, + VT_VALUE = 6 + }; + solarxr_protocol::rpc::SkeletonBone bone() const { + return static_cast(GetField(VT_BONE, 0)); + } + float value() const { + return GetField(VT_VALUE, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BONE, 1) && + VerifyField(verifier, VT_VALUE, 4) && + verifier.EndTable(); + } +}; + +struct SkeletonPartBuilder { + typedef SkeletonPart Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bone(solarxr_protocol::rpc::SkeletonBone bone) { + fbb_.AddElement(SkeletonPart::VT_BONE, static_cast(bone), 0); + } + void add_value(float value) { + fbb_.AddElement(SkeletonPart::VT_VALUE, value, 0.0f); + } + explicit SkeletonPartBuilder(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 CreateSkeletonPart( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::SkeletonBone bone = solarxr_protocol::rpc::SkeletonBone::NONE, + float value = 0.0f) { + SkeletonPartBuilder builder_(_fbb); + builder_.add_value(value); + builder_.add_bone(bone); + return builder_.Finish(); +} + +struct SkeletonConfigRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SkeletonConfigRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SkeletonConfigRequestBuilder { + typedef SkeletonConfigRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SkeletonConfigRequestBuilder(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 CreateSkeletonConfigRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SkeletonConfigRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct SkeletonConfigResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SkeletonConfigResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SKELETON_PARTS = 4 + }; + const flatbuffers::Vector> *skeleton_parts() const { + return GetPointer> *>(VT_SKELETON_PARTS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SKELETON_PARTS) && + verifier.VerifyVector(skeleton_parts()) && + verifier.VerifyVectorOfTables(skeleton_parts()) && + verifier.EndTable(); + } +}; + +struct SkeletonConfigResponseBuilder { + typedef SkeletonConfigResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_skeleton_parts(flatbuffers::Offset>> skeleton_parts) { + fbb_.AddOffset(SkeletonConfigResponse::VT_SKELETON_PARTS, skeleton_parts); + } + explicit SkeletonConfigResponseBuilder(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 CreateSkeletonConfigResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> skeleton_parts = 0) { + SkeletonConfigResponseBuilder builder_(_fbb); + builder_.add_skeleton_parts(skeleton_parts); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSkeletonConfigResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *skeleton_parts = nullptr) { + auto skeleton_parts__ = skeleton_parts ? _fbb.CreateVector>(*skeleton_parts) : 0; + return solarxr_protocol::rpc::CreateSkeletonConfigResponse( + _fbb, + skeleton_parts__); +} + +struct SkeletonResetAllRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SkeletonResetAllRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SkeletonResetAllRequestBuilder { + typedef SkeletonResetAllRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SkeletonResetAllRequestBuilder(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 CreateSkeletonResetAllRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SkeletonResetAllRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct ChangeSkeletonConfigRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ChangeSkeletonConfigRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BONE = 4, + VT_VALUE = 6 + }; + solarxr_protocol::rpc::SkeletonBone bone() const { + return static_cast(GetField(VT_BONE, 0)); + } + float value() const { + return GetField(VT_VALUE, 0.0f); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_BONE, 1) && + VerifyField(verifier, VT_VALUE, 4) && + verifier.EndTable(); + } +}; + +struct ChangeSkeletonConfigRequestBuilder { + typedef ChangeSkeletonConfigRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_bone(solarxr_protocol::rpc::SkeletonBone bone) { + fbb_.AddElement(ChangeSkeletonConfigRequest::VT_BONE, static_cast(bone), 0); + } + void add_value(float value) { + fbb_.AddElement(ChangeSkeletonConfigRequest::VT_VALUE, value, 0.0f); + } + explicit ChangeSkeletonConfigRequestBuilder(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 CreateChangeSkeletonConfigRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::SkeletonBone bone = solarxr_protocol::rpc::SkeletonBone::NONE, + float value = 0.0f) { + ChangeSkeletonConfigRequestBuilder builder_(_fbb); + builder_.add_value(value); + builder_.add_bone(bone); + return builder_.Finish(); +} + +struct OpenSerialRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OpenSerialRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct OpenSerialRequestBuilder { + typedef OpenSerialRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit OpenSerialRequestBuilder(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 CreateOpenSerialRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + OpenSerialRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct CloseSerialRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CloseSerialRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct CloseSerialRequestBuilder { + typedef CloseSerialRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit CloseSerialRequestBuilder(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 CreateCloseSerialRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + CloseSerialRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct SetWifiRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SetWifiRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SSID = 4, + VT_PASSWORD = 6 + }; + const flatbuffers::String *ssid() const { + return GetPointer(VT_SSID); + } + const flatbuffers::String *password() const { + return GetPointer(VT_PASSWORD); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SSID) && + verifier.VerifyString(ssid()) && + VerifyOffset(verifier, VT_PASSWORD) && + verifier.VerifyString(password()) && + verifier.EndTable(); + } +}; + +struct SetWifiRequestBuilder { + typedef SetWifiRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_ssid(flatbuffers::Offset ssid) { + fbb_.AddOffset(SetWifiRequest::VT_SSID, ssid); + } + void add_password(flatbuffers::Offset password) { + fbb_.AddOffset(SetWifiRequest::VT_PASSWORD, password); + } + explicit SetWifiRequestBuilder(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 CreateSetWifiRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset ssid = 0, + flatbuffers::Offset password = 0) { + SetWifiRequestBuilder builder_(_fbb); + builder_.add_password(password); + builder_.add_ssid(ssid); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSetWifiRequestDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *ssid = nullptr, + const char *password = nullptr) { + auto ssid__ = ssid ? _fbb.CreateString(ssid) : 0; + auto password__ = password ? _fbb.CreateString(password) : 0; + return solarxr_protocol::rpc::CreateSetWifiRequest( + _fbb, + ssid__, + password__); +} + +struct SerialUpdateResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialUpdateResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_LOG = 4, + VT_CLOSED = 6 + }; + const flatbuffers::String *log() const { + return GetPointer(VT_LOG); + } + bool closed() const { + return GetField(VT_CLOSED, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_LOG) && + verifier.VerifyString(log()) && + VerifyField(verifier, VT_CLOSED, 1) && + verifier.EndTable(); + } +}; + +struct SerialUpdateResponseBuilder { + typedef SerialUpdateResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_log(flatbuffers::Offset log) { + fbb_.AddOffset(SerialUpdateResponse::VT_LOG, log); + } + void add_closed(bool closed) { + fbb_.AddElement(SerialUpdateResponse::VT_CLOSED, static_cast(closed), 0); + } + explicit SerialUpdateResponseBuilder(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 CreateSerialUpdateResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset log = 0, + bool closed = false) { + SerialUpdateResponseBuilder builder_(_fbb); + builder_.add_log(log); + builder_.add_closed(closed); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateSerialUpdateResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *log = nullptr, + bool closed = false) { + auto log__ = log ? _fbb.CreateString(log) : 0; + return solarxr_protocol::rpc::CreateSerialUpdateResponse( + _fbb, + log__, + closed); +} + +/// Reboots the tracker connected to the serial monitor +struct SerialTrackerRebootRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerRebootRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerRebootRequestBuilder { + typedef SerialTrackerRebootRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerRebootRequestBuilder(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 CreateSerialTrackerRebootRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerRebootRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Sends the GET INFO cmd to the current tracker on the serial monitor +struct SerialTrackerGetInfoRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerGetInfoRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerGetInfoRequestBuilder { + typedef SerialTrackerGetInfoRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerGetInfoRequestBuilder(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 CreateSerialTrackerGetInfoRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerGetInfoRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Sends the FRST cmd to the currently over the Serial Montior connected Tracker +struct SerialTrackerFactoryResetRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SerialTrackerFactoryResetRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct SerialTrackerFactoryResetRequestBuilder { + typedef SerialTrackerFactoryResetRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SerialTrackerFactoryResetRequestBuilder(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 CreateSerialTrackerFactoryResetRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + SerialTrackerFactoryResetRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +struct AutoBoneProcessRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneProcessRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PROCESS_TYPE = 4 + }; + solarxr_protocol::rpc::AutoBoneProcessType process_type() const { + return static_cast(GetField(VT_PROCESS_TYPE, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PROCESS_TYPE, 1) && + verifier.EndTable(); + } +}; + +struct AutoBoneProcessRequestBuilder { + typedef AutoBoneProcessRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_process_type(solarxr_protocol::rpc::AutoBoneProcessType process_type) { + fbb_.AddElement(AutoBoneProcessRequest::VT_PROCESS_TYPE, static_cast(process_type), 0); + } + explicit AutoBoneProcessRequestBuilder(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 CreateAutoBoneProcessRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::AutoBoneProcessType process_type = solarxr_protocol::rpc::AutoBoneProcessType::NONE) { + AutoBoneProcessRequestBuilder builder_(_fbb); + builder_.add_process_type(process_type); + return builder_.Finish(); +} + +struct AutoBoneProcessStatusResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneProcessStatusResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PROCESS_TYPE = 4, + VT_MESSAGE = 6, + VT_CURRENT = 8, + VT_TOTAL = 10, + VT_COMPLETED = 12, + VT_SUCCESS = 14 + }; + solarxr_protocol::rpc::AutoBoneProcessType process_type() const { + return static_cast(GetField(VT_PROCESS_TYPE, 0)); + } + const flatbuffers::String *message() const { + return GetPointer(VT_MESSAGE); + } + uint32_t current() const { + return GetField(VT_CURRENT, 0); + } + uint32_t total() const { + return GetField(VT_TOTAL, 0); + } + bool completed() const { + return GetField(VT_COMPLETED, 0) != 0; + } + bool success() const { + return GetField(VT_SUCCESS, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_PROCESS_TYPE, 1) && + VerifyOffset(verifier, VT_MESSAGE) && + verifier.VerifyString(message()) && + VerifyField(verifier, VT_CURRENT, 4) && + VerifyField(verifier, VT_TOTAL, 4) && + VerifyField(verifier, VT_COMPLETED, 1) && + VerifyField(verifier, VT_SUCCESS, 1) && + verifier.EndTable(); + } +}; + +struct AutoBoneProcessStatusResponseBuilder { + typedef AutoBoneProcessStatusResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_process_type(solarxr_protocol::rpc::AutoBoneProcessType process_type) { + fbb_.AddElement(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, static_cast(process_type), 0); + } + void add_message(flatbuffers::Offset message) { + fbb_.AddOffset(AutoBoneProcessStatusResponse::VT_MESSAGE, message); + } + void add_current(uint32_t current) { + fbb_.AddElement(AutoBoneProcessStatusResponse::VT_CURRENT, current, 0); + } + void add_total(uint32_t total) { + fbb_.AddElement(AutoBoneProcessStatusResponse::VT_TOTAL, total, 0); + } + void add_completed(bool completed) { + fbb_.AddElement(AutoBoneProcessStatusResponse::VT_COMPLETED, static_cast(completed), 0); + } + void add_success(bool success) { + fbb_.AddElement(AutoBoneProcessStatusResponse::VT_SUCCESS, static_cast(success), 0); + } + explicit AutoBoneProcessStatusResponseBuilder(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 CreateAutoBoneProcessStatusResponse( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::AutoBoneProcessType process_type = solarxr_protocol::rpc::AutoBoneProcessType::NONE, + flatbuffers::Offset message = 0, + uint32_t current = 0, + uint32_t total = 0, + bool completed = false, + bool success = false) { + AutoBoneProcessStatusResponseBuilder builder_(_fbb); + builder_.add_total(total); + builder_.add_current(current); + builder_.add_message(message); + builder_.add_success(success); + builder_.add_completed(completed); + builder_.add_process_type(process_type); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateAutoBoneProcessStatusResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::rpc::AutoBoneProcessType process_type = solarxr_protocol::rpc::AutoBoneProcessType::NONE, + const char *message = nullptr, + uint32_t current = 0, + uint32_t total = 0, + bool completed = false, + bool success = false) { + auto message__ = message ? _fbb.CreateString(message) : 0; + return solarxr_protocol::rpc::CreateAutoBoneProcessStatusResponse( + _fbb, + process_type, + message__, + current, + total, + completed, + success); +} + +struct AutoBoneEpochResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AutoBoneEpochResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CURRENT_EPOCH = 4, + VT_TOTAL_EPOCHS = 6, + VT_EPOCH_ERROR = 8, + VT_ADJUSTED_SKELETON_PARTS = 10 + }; + uint32_t current_epoch() const { + return GetField(VT_CURRENT_EPOCH, 0); + } + uint32_t total_epochs() const { + return GetField(VT_TOTAL_EPOCHS, 0); + } + float epoch_error() const { + return GetField(VT_EPOCH_ERROR, 0.0f); + } + const flatbuffers::Vector> *adjusted_skeleton_parts() const { + return GetPointer> *>(VT_ADJUSTED_SKELETON_PARTS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_CURRENT_EPOCH, 4) && + VerifyField(verifier, VT_TOTAL_EPOCHS, 4) && + VerifyField(verifier, VT_EPOCH_ERROR, 4) && + VerifyOffset(verifier, VT_ADJUSTED_SKELETON_PARTS) && + verifier.VerifyVector(adjusted_skeleton_parts()) && + verifier.VerifyVectorOfTables(adjusted_skeleton_parts()) && + verifier.EndTable(); + } +}; + +struct AutoBoneEpochResponseBuilder { + typedef AutoBoneEpochResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_current_epoch(uint32_t current_epoch) { + fbb_.AddElement(AutoBoneEpochResponse::VT_CURRENT_EPOCH, current_epoch, 0); + } + void add_total_epochs(uint32_t total_epochs) { + fbb_.AddElement(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, total_epochs, 0); + } + void add_epoch_error(float epoch_error) { + fbb_.AddElement(AutoBoneEpochResponse::VT_EPOCH_ERROR, epoch_error, 0.0f); + } + void add_adjusted_skeleton_parts(flatbuffers::Offset>> adjusted_skeleton_parts) { + fbb_.AddOffset(AutoBoneEpochResponse::VT_ADJUSTED_SKELETON_PARTS, adjusted_skeleton_parts); + } + explicit AutoBoneEpochResponseBuilder(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 CreateAutoBoneEpochResponse( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t current_epoch = 0, + uint32_t total_epochs = 0, + float epoch_error = 0.0f, + flatbuffers::Offset>> adjusted_skeleton_parts = 0) { + AutoBoneEpochResponseBuilder builder_(_fbb); + builder_.add_adjusted_skeleton_parts(adjusted_skeleton_parts); + builder_.add_epoch_error(epoch_error); + builder_.add_total_epochs(total_epochs); + builder_.add_current_epoch(current_epoch); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateAutoBoneEpochResponseDirect( + flatbuffers::FlatBufferBuilder &_fbb, + uint32_t current_epoch = 0, + uint32_t total_epochs = 0, + float epoch_error = 0.0f, + const std::vector> *adjusted_skeleton_parts = nullptr) { + auto adjusted_skeleton_parts__ = adjusted_skeleton_parts ? _fbb.CreateVector>(*adjusted_skeleton_parts) : 0; + return solarxr_protocol::rpc::CreateAutoBoneEpochResponse( + _fbb, + current_epoch, + total_epochs, + epoch_error, + adjusted_skeleton_parts__); +} + +/// Requests the current state of `OverlayDisplayModeResponse`. +struct OverlayDisplayModeRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OverlayDisplayModeRequestBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } +}; + +struct OverlayDisplayModeRequestBuilder { + typedef OverlayDisplayModeRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit OverlayDisplayModeRequestBuilder(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 CreateOverlayDisplayModeRequest( + flatbuffers::FlatBufferBuilder &_fbb) { + OverlayDisplayModeRequestBuilder builder_(_fbb); + return builder_.Finish(); +} + +/// Changes the state of the overlay's display mode. +struct OverlayDisplayModeChangeRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OverlayDisplayModeChangeRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IS_VISIBLE = 4, + VT_IS_MIRRORED = 6 + }; + flatbuffers::Optional is_visible() const { + return GetOptional(VT_IS_VISIBLE); + } + flatbuffers::Optional is_mirrored() const { + return GetOptional(VT_IS_MIRRORED); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IS_VISIBLE, 1) && + VerifyField(verifier, VT_IS_MIRRORED, 1) && + verifier.EndTable(); + } +}; + +struct OverlayDisplayModeChangeRequestBuilder { + typedef OverlayDisplayModeChangeRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_is_visible(bool is_visible) { + fbb_.AddElement(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, static_cast(is_visible)); + } + void add_is_mirrored(bool is_mirrored) { + fbb_.AddElement(OverlayDisplayModeChangeRequest::VT_IS_MIRRORED, static_cast(is_mirrored)); + } + explicit OverlayDisplayModeChangeRequestBuilder(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 CreateOverlayDisplayModeChangeRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Optional is_visible = flatbuffers::nullopt, + flatbuffers::Optional is_mirrored = flatbuffers::nullopt) { + OverlayDisplayModeChangeRequestBuilder builder_(_fbb); + if(is_mirrored) { builder_.add_is_mirrored(*is_mirrored); } + if(is_visible) { builder_.add_is_visible(*is_visible); } + return builder_.Finish(); +} + +/// The current state of the overlay's display mode. +struct OverlayDisplayModeResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OverlayDisplayModeResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IS_VISIBLE = 4, + VT_IS_MIRRORED = 6 + }; + bool is_visible() const { + return GetField(VT_IS_VISIBLE, 0) != 0; + } + bool is_mirrored() const { + return GetField(VT_IS_MIRRORED, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_IS_VISIBLE, 1) && + VerifyField(verifier, VT_IS_MIRRORED, 1) && + verifier.EndTable(); + } +}; + +struct OverlayDisplayModeResponseBuilder { + typedef OverlayDisplayModeResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_is_visible(bool is_visible) { + fbb_.AddElement(OverlayDisplayModeResponse::VT_IS_VISIBLE, static_cast(is_visible), 0); + } + void add_is_mirrored(bool is_mirrored) { + fbb_.AddElement(OverlayDisplayModeResponse::VT_IS_MIRRORED, static_cast(is_mirrored), 0); + } + explicit OverlayDisplayModeResponseBuilder(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 CreateOverlayDisplayModeResponse( + flatbuffers::FlatBufferBuilder &_fbb, + bool is_visible = false, + bool is_mirrored = false) { + OverlayDisplayModeResponseBuilder builder_(_fbb); + builder_.add_is_mirrored(is_mirrored); + builder_.add_is_visible(is_visible); + return builder_.Finish(); +} + +} // namespace rpc + +namespace pub_sub { + +/// A `TopicId` identifies an application-specific category of data. Because it +/// is application-specific, it is up to the application within the specified +/// organization to define its semantics/meaning. +/// +/// For example, "bob" may have an "overlay" app with a "settings" topic for controlling +/// the overlay visibility and other settings, as well as a "video feed" topic for +/// allowing other applications to display video data in a wrist mounted window in VR. +struct TopicId FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopicIdBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ORGANIZATION = 4, + VT_APP_NAME = 6, + VT_TOPIC = 8 + }; + /// The organization/developer that defines the meaning of this feature. Avoids name + /// clashes. Should be something unique - same idea as java package identifier. + const flatbuffers::String *organization() const { + return GetPointer(VT_ORGANIZATION); + } + /// The name of the application/device. Should be unique within the organization. + const flatbuffers::String *app_name() const { + return GetPointer(VT_APP_NAME); + } + /// The name of the topic. Should be unique within the application. + const flatbuffers::String *topic() const { + return GetPointer(VT_TOPIC); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_ORGANIZATION) && + verifier.VerifyString(organization()) && + VerifyOffset(verifier, VT_APP_NAME) && + verifier.VerifyString(app_name()) && + VerifyOffset(verifier, VT_TOPIC) && + verifier.VerifyString(topic()) && + verifier.EndTable(); + } +}; + +struct TopicIdBuilder { + typedef TopicId Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_organization(flatbuffers::Offset organization) { + fbb_.AddOffset(TopicId::VT_ORGANIZATION, organization); + } + void add_app_name(flatbuffers::Offset app_name) { + fbb_.AddOffset(TopicId::VT_APP_NAME, app_name); + } + void add_topic(flatbuffers::Offset topic) { + fbb_.AddOffset(TopicId::VT_TOPIC, topic); + } + explicit TopicIdBuilder(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 CreateTopicId( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset organization = 0, + flatbuffers::Offset app_name = 0, + flatbuffers::Offset topic = 0) { + TopicIdBuilder builder_(_fbb); + builder_.add_topic(topic); + builder_.add_app_name(app_name); + builder_.add_organization(organization); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateTopicIdDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *organization = nullptr, + const char *app_name = nullptr, + const char *topic = nullptr) { + auto organization__ = organization ? _fbb.CreateString(organization) : 0; + auto app_name__ = app_name ? _fbb.CreateString(app_name) : 0; + auto topic__ = topic ? _fbb.CreateString(topic) : 0; + return solarxr_protocol::pub_sub::CreateTopicId( + _fbb, + organization__, + app_name__, + topic__); +} + +/// A handle for the topic, allows referencing a topic without sending a huge +/// `TopicId`. +struct TopicHandle FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopicHandleBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ID = 4 + }; + uint16_t id() const { + return GetField(VT_ID, 0); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_ID, 2) && + verifier.EndTable(); + } +}; + +struct TopicHandleBuilder { + typedef TopicHandle Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(uint16_t id) { + fbb_.AddElement(TopicHandle::VT_ID, id, 0); + } + explicit TopicHandleBuilder(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 CreateTopicHandle( + flatbuffers::FlatBufferBuilder &_fbb, + uint16_t id = 0) { + TopicHandleBuilder builder_(_fbb); + builder_.add_id(id); + return builder_.Finish(); +} + +/// Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing +/// bandwidth, since `FeatureId` can be large. +struct TopicHandleRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopicHandleRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ID = 4 + }; + const solarxr_protocol::pub_sub::TopicId *id() const { + return GetPointer(VT_ID); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_ID) && + verifier.VerifyTable(id()) && + verifier.EndTable(); + } +}; + +struct TopicHandleRequestBuilder { + typedef TopicHandleRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(flatbuffers::Offset id) { + fbb_.AddOffset(TopicHandleRequest::VT_ID, id); + } + explicit TopicHandleRequestBuilder(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 CreateTopicHandleRequest( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset id = 0) { + TopicHandleRequestBuilder builder_(_fbb); + builder_.add_id(id); + return builder_.Finish(); +} + +/// Response for `TopicHandleRequest` +struct TopicHandleResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopicHandleResponseBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_HANDLE = 4 + }; + const solarxr_protocol::pub_sub::TopicHandle *handle() const { + return GetPointer(VT_HANDLE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_HANDLE) && + verifier.VerifyTable(handle()) && + verifier.EndTable(); + } +}; + +struct TopicHandleResponseBuilder { + typedef TopicHandleResponse Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_handle(flatbuffers::Offset handle) { + fbb_.AddOffset(TopicHandleResponse::VT_HANDLE, handle); + } + explicit TopicHandleResponseBuilder(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 CreateTopicHandleResponse( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset handle = 0) { + TopicHandleResponseBuilder builder_(_fbb); + builder_.add_handle(handle); + return builder_.Finish(); +} + +struct PubSubHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PubSubHeaderBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_U_TYPE = 4, + VT_U = 6 + }; + solarxr_protocol::pub_sub::PubSubUnion u_type() const { + return static_cast(GetField(VT_U_TYPE, 0)); + } + const void *u() const { + return GetPointer(VT_U); + } + template const T *u_as() const; + const solarxr_protocol::pub_sub::Message *u_as_Message() const { + return u_type() == solarxr_protocol::pub_sub::PubSubUnion::Message ? static_cast(u()) : nullptr; + } + const solarxr_protocol::pub_sub::SubscriptionRequest *u_as_SubscriptionRequest() const { + return u_type() == solarxr_protocol::pub_sub::PubSubUnion::SubscriptionRequest ? static_cast(u()) : nullptr; + } + const solarxr_protocol::pub_sub::TopicHandleRequest *u_as_TopicHandleRequest() const { + return u_type() == solarxr_protocol::pub_sub::PubSubUnion::TopicHandleRequest ? static_cast(u()) : nullptr; + } + const solarxr_protocol::pub_sub::TopicHandleResponse *u_as_TopicHandleResponse() const { + return u_type() == solarxr_protocol::pub_sub::PubSubUnion::TopicHandleResponse ? static_cast(u()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_U_TYPE, 1) && + VerifyOffset(verifier, VT_U) && + VerifyPubSubUnion(verifier, u(), u_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::pub_sub::Message *PubSubHeader::u_as() const { + return u_as_Message(); +} + +template<> inline const solarxr_protocol::pub_sub::SubscriptionRequest *PubSubHeader::u_as() const { + return u_as_SubscriptionRequest(); +} + +template<> inline const solarxr_protocol::pub_sub::TopicHandleRequest *PubSubHeader::u_as() const { + return u_as_TopicHandleRequest(); +} + +template<> inline const solarxr_protocol::pub_sub::TopicHandleResponse *PubSubHeader::u_as() const { + return u_as_TopicHandleResponse(); +} + +struct PubSubHeaderBuilder { + typedef PubSubHeader Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_u_type(solarxr_protocol::pub_sub::PubSubUnion u_type) { + fbb_.AddElement(PubSubHeader::VT_U_TYPE, static_cast(u_type), 0); + } + void add_u(flatbuffers::Offset u) { + fbb_.AddOffset(PubSubHeader::VT_U, u); + } + explicit PubSubHeaderBuilder(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 CreatePubSubHeader( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::pub_sub::PubSubUnion u_type = solarxr_protocol::pub_sub::PubSubUnion::NONE, + flatbuffers::Offset u = 0) { + PubSubHeaderBuilder builder_(_fbb); + builder_.add_u(u); + builder_.add_u_type(u_type); + return builder_.Finish(); +} + +/// Data that is sent from publishers to subscribers +struct Message FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MessageBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TOPIC_TYPE = 4, + VT_TOPIC = 6, + VT_PAYLOAD_TYPE = 8, + VT_PAYLOAD = 10 + }; + solarxr_protocol::pub_sub::Topic topic_type() const { + return static_cast(GetField(VT_TOPIC_TYPE, 0)); + } + const void *topic() const { + return GetPointer(VT_TOPIC); + } + template const T *topic_as() const; + const solarxr_protocol::pub_sub::TopicHandle *topic_as_TopicHandle() const { + return topic_type() == solarxr_protocol::pub_sub::Topic::TopicHandle ? static_cast(topic()) : nullptr; + } + const solarxr_protocol::pub_sub::TopicId *topic_as_TopicId() const { + return topic_type() == solarxr_protocol::pub_sub::Topic::TopicId ? static_cast(topic()) : nullptr; + } + solarxr_protocol::pub_sub::Payload payload_type() const { + return static_cast(GetField(VT_PAYLOAD_TYPE, 0)); + } + const void *payload() const { + return GetPointer(VT_PAYLOAD); + } + template const T *payload_as() const; + const solarxr_protocol::datatypes::String *payload_as_solarxr_protocol_datatypes_String() const { + return payload_type() == solarxr_protocol::pub_sub::Payload::solarxr_protocol_datatypes_String ? static_cast(payload()) : nullptr; + } + const solarxr_protocol::datatypes::Bytes *payload_as_solarxr_protocol_datatypes_Bytes() const { + return payload_type() == solarxr_protocol::pub_sub::Payload::solarxr_protocol_datatypes_Bytes ? static_cast(payload()) : nullptr; + } + const solarxr_protocol::pub_sub::KeyValues *payload_as_KeyValues() const { + return payload_type() == solarxr_protocol::pub_sub::Payload::KeyValues ? static_cast(payload()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TOPIC_TYPE, 1) && + VerifyOffset(verifier, VT_TOPIC) && + VerifyTopic(verifier, topic(), topic_type()) && + VerifyField(verifier, VT_PAYLOAD_TYPE, 1) && + VerifyOffset(verifier, VT_PAYLOAD) && + VerifyPayload(verifier, payload(), payload_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::pub_sub::TopicHandle *Message::topic_as() const { + return topic_as_TopicHandle(); +} + +template<> inline const solarxr_protocol::pub_sub::TopicId *Message::topic_as() const { + return topic_as_TopicId(); +} + +template<> inline const solarxr_protocol::datatypes::String *Message::payload_as() const { + return payload_as_solarxr_protocol_datatypes_String(); +} + +template<> inline const solarxr_protocol::datatypes::Bytes *Message::payload_as() const { + return payload_as_solarxr_protocol_datatypes_Bytes(); +} + +template<> inline const solarxr_protocol::pub_sub::KeyValues *Message::payload_as() const { + return payload_as_KeyValues(); +} + +struct MessageBuilder { + typedef Message Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_topic_type(solarxr_protocol::pub_sub::Topic topic_type) { + fbb_.AddElement(Message::VT_TOPIC_TYPE, static_cast(topic_type), 0); + } + void add_topic(flatbuffers::Offset topic) { + fbb_.AddOffset(Message::VT_TOPIC, topic); + } + void add_payload_type(solarxr_protocol::pub_sub::Payload payload_type) { + fbb_.AddElement(Message::VT_PAYLOAD_TYPE, static_cast(payload_type), 0); + } + void add_payload(flatbuffers::Offset payload) { + fbb_.AddOffset(Message::VT_PAYLOAD, payload); + } + explicit MessageBuilder(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 CreateMessage( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::pub_sub::Topic topic_type = solarxr_protocol::pub_sub::Topic::NONE, + flatbuffers::Offset topic = 0, + solarxr_protocol::pub_sub::Payload payload_type = solarxr_protocol::pub_sub::Payload::NONE, + flatbuffers::Offset payload = 0) { + MessageBuilder builder_(_fbb); + builder_.add_payload(payload); + builder_.add_topic(topic); + builder_.add_payload_type(payload_type); + builder_.add_topic_type(topic_type); + return builder_.Finish(); +} + +/// Requests a subscription to `topic` +struct SubscriptionRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubscriptionRequestBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TOPIC_TYPE = 4, + VT_TOPIC = 6 + }; + solarxr_protocol::pub_sub::Topic topic_type() const { + return static_cast(GetField(VT_TOPIC_TYPE, 0)); + } + const void *topic() const { + return GetPointer(VT_TOPIC); + } + template const T *topic_as() const; + const solarxr_protocol::pub_sub::TopicHandle *topic_as_TopicHandle() const { + return topic_type() == solarxr_protocol::pub_sub::Topic::TopicHandle ? static_cast(topic()) : nullptr; + } + const solarxr_protocol::pub_sub::TopicId *topic_as_TopicId() const { + return topic_type() == solarxr_protocol::pub_sub::Topic::TopicId ? static_cast(topic()) : nullptr; + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyField(verifier, VT_TOPIC_TYPE, 1) && + VerifyOffset(verifier, VT_TOPIC) && + VerifyTopic(verifier, topic(), topic_type()) && + verifier.EndTable(); + } +}; + +template<> inline const solarxr_protocol::pub_sub::TopicHandle *SubscriptionRequest::topic_as() const { + return topic_as_TopicHandle(); +} + +template<> inline const solarxr_protocol::pub_sub::TopicId *SubscriptionRequest::topic_as() const { + return topic_as_TopicId(); +} + +struct SubscriptionRequestBuilder { + typedef SubscriptionRequest Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_topic_type(solarxr_protocol::pub_sub::Topic topic_type) { + fbb_.AddElement(SubscriptionRequest::VT_TOPIC_TYPE, static_cast(topic_type), 0); + } + void add_topic(flatbuffers::Offset topic) { + fbb_.AddOffset(SubscriptionRequest::VT_TOPIC, topic); + } + explicit SubscriptionRequestBuilder(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 CreateSubscriptionRequest( + flatbuffers::FlatBufferBuilder &_fbb, + solarxr_protocol::pub_sub::Topic topic_type = solarxr_protocol::pub_sub::Topic::NONE, + flatbuffers::Offset topic = 0) { + SubscriptionRequestBuilder builder_(_fbb); + builder_.add_topic(topic); + builder_.add_topic_type(topic_type); + return builder_.Finish(); +} + +struct KeyValues FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef KeyValuesBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEYS = 4, + VT_VALUES = 6 + }; + const flatbuffers::Vector> *keys() const { + return GetPointer> *>(VT_KEYS); + } + const flatbuffers::Vector> *values() const { + return GetPointer> *>(VT_VALUES); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_KEYS) && + verifier.VerifyVector(keys()) && + verifier.VerifyVectorOfStrings(keys()) && + VerifyOffset(verifier, VT_VALUES) && + verifier.VerifyVector(values()) && + verifier.VerifyVectorOfStrings(values()) && + verifier.EndTable(); + } +}; + +struct KeyValuesBuilder { + typedef KeyValues Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_keys(flatbuffers::Offset>> keys) { + fbb_.AddOffset(KeyValues::VT_KEYS, keys); + } + void add_values(flatbuffers::Offset>> values) { + fbb_.AddOffset(KeyValues::VT_VALUES, values); + } + explicit KeyValuesBuilder(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 CreateKeyValues( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> keys = 0, + flatbuffers::Offset>> values = 0) { + KeyValuesBuilder builder_(_fbb); + builder_.add_values(values); + builder_.add_keys(keys); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateKeyValuesDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *keys = nullptr, + const std::vector> *values = nullptr) { + auto keys__ = keys ? _fbb.CreateVector>(*keys) : 0; + auto values__ = values ? _fbb.CreateVector>(*values) : 0; + return solarxr_protocol::pub_sub::CreateKeyValues( + _fbb, + keys__, + values__); +} + +} // namespace pub_sub + +/// MessageBundle contains all of the messages for the data feed system and the +/// rpc system that will be sent in one buffer. +struct MessageBundle FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MessageBundleBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DATA_FEED_MSGS = 4, + VT_RPC_MSGS = 6, + VT_PUB_SUB_MSGS = 8 + }; + const flatbuffers::Vector> *data_feed_msgs() const { + return GetPointer> *>(VT_DATA_FEED_MSGS); + } + const flatbuffers::Vector> *rpc_msgs() const { + return GetPointer> *>(VT_RPC_MSGS); + } + const flatbuffers::Vector> *pub_sub_msgs() const { + return GetPointer> *>(VT_PUB_SUB_MSGS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DATA_FEED_MSGS) && + verifier.VerifyVector(data_feed_msgs()) && + verifier.VerifyVectorOfTables(data_feed_msgs()) && + VerifyOffset(verifier, VT_RPC_MSGS) && + verifier.VerifyVector(rpc_msgs()) && + verifier.VerifyVectorOfTables(rpc_msgs()) && + VerifyOffset(verifier, VT_PUB_SUB_MSGS) && + verifier.VerifyVector(pub_sub_msgs()) && + verifier.VerifyVectorOfTables(pub_sub_msgs()) && + verifier.EndTable(); + } +}; + +struct MessageBundleBuilder { + typedef MessageBundle Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_data_feed_msgs(flatbuffers::Offset>> data_feed_msgs) { + fbb_.AddOffset(MessageBundle::VT_DATA_FEED_MSGS, data_feed_msgs); + } + void add_rpc_msgs(flatbuffers::Offset>> rpc_msgs) { + fbb_.AddOffset(MessageBundle::VT_RPC_MSGS, rpc_msgs); + } + void add_pub_sub_msgs(flatbuffers::Offset>> pub_sub_msgs) { + fbb_.AddOffset(MessageBundle::VT_PUB_SUB_MSGS, pub_sub_msgs); + } + explicit MessageBundleBuilder(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 CreateMessageBundle( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset>> data_feed_msgs = 0, + flatbuffers::Offset>> rpc_msgs = 0, + flatbuffers::Offset>> pub_sub_msgs = 0) { + MessageBundleBuilder builder_(_fbb); + builder_.add_pub_sub_msgs(pub_sub_msgs); + builder_.add_rpc_msgs(rpc_msgs); + builder_.add_data_feed_msgs(data_feed_msgs); + return builder_.Finish(); +} + +inline flatbuffers::Offset CreateMessageBundleDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const std::vector> *data_feed_msgs = nullptr, + const std::vector> *rpc_msgs = nullptr, + const std::vector> *pub_sub_msgs = nullptr) { + auto data_feed_msgs__ = data_feed_msgs ? _fbb.CreateVector>(*data_feed_msgs) : 0; + auto rpc_msgs__ = rpc_msgs ? _fbb.CreateVector>(*rpc_msgs) : 0; + auto pub_sub_msgs__ = pub_sub_msgs ? _fbb.CreateVector>(*pub_sub_msgs) : 0; + return solarxr_protocol::CreateMessageBundle( + _fbb, + data_feed_msgs__, + rpc_msgs__, + pub_sub_msgs__); +} + +namespace datatypes { + +namespace hardware_info { + +} // namespace hardware_info +} // namespace datatypes + +namespace data_feed { +namespace tracker { + +} // namespace tracker + +namespace device_data { + +} // namespace device_data + +} // namespace data_feed + +namespace rpc { +namespace settings { + +} // namespace settings + +} // namespace rpc + +namespace pub_sub { + +} // namespace pub_sub + +namespace data_feed { + +inline bool VerifyDataFeedMessage(flatbuffers::Verifier &verifier, const void *obj, DataFeedMessage type) { + switch (type) { + case DataFeedMessage::NONE: { + return true; + } + case DataFeedMessage::PollDataFeed: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case DataFeedMessage::StartDataFeed: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case DataFeedMessage::DataFeedUpdate: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case DataFeedMessage::DataFeedConfig: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyDataFeedMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyDataFeedMessage( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +} // namespace data_feed + +namespace rpc { + +inline bool VerifyRpcMessage(flatbuffers::Verifier &verifier, const void *obj, RpcMessage type) { + switch (type) { + case RpcMessage::NONE: { + return true; + } + case RpcMessage::HeartbeatRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::HeartbeatResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ResetRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AssignTrackerRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SettingsRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SettingsResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ChangeSettingsRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::RecordBVHRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::RecordBVHStatus: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SkeletonConfigRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::ChangeSkeletonConfigRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SkeletonResetAllRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SkeletonConfigResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::OpenSerialRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::CloseSerialRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SetWifiRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialUpdateResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AutoBoneProcessRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AutoBoneProcessStatusResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::AutoBoneEpochResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::OverlayDisplayModeRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::OverlayDisplayModeChangeRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::OverlayDisplayModeResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialTrackerRebootRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialTrackerGetInfoRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case RpcMessage::SerialTrackerFactoryResetRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyRpcMessageVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyRpcMessage( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +} // namespace rpc + +namespace pub_sub { + +inline bool VerifyTopic(flatbuffers::Verifier &verifier, const void *obj, Topic type) { + switch (type) { + case Topic::NONE: { + return true; + } + case Topic::TopicHandle: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case Topic::TopicId: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyTopicVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyTopic( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +inline bool VerifyPubSubUnion(flatbuffers::Verifier &verifier, const void *obj, PubSubUnion type) { + switch (type) { + case PubSubUnion::NONE: { + return true; + } + case PubSubUnion::Message: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case PubSubUnion::SubscriptionRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case PubSubUnion::TopicHandleRequest: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case PubSubUnion::TopicHandleResponse: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyPubSubUnionVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyPubSubUnion( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +inline bool VerifyPayload(flatbuffers::Verifier &verifier, const void *obj, Payload type) { + switch (type) { + case Payload::NONE: { + return true; + } + case Payload::solarxr_protocol_datatypes_String: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case Payload::solarxr_protocol_datatypes_Bytes: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + case Payload::KeyValues: { + auto ptr = reinterpret_cast(obj); + return verifier.VerifyTable(ptr); + } + default: return true; + } +} + +inline bool VerifyPayloadVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types) { + if (!values || !types) return !values && !types; + if (values->size() != types->size()) return false; + for (flatbuffers::uoffset_t i = 0; i < values->size(); ++i) { + if (!VerifyPayload( + verifier, values->Get(i), types->GetEnum(i))) { + return false; + } + } + return true; +} + +} // namespace pub_sub +} // namespace solarxr_protocol + +#endif // FLATBUFFERS_GENERATED_ALL_SOLARXR_PROTOCOL_H_ diff --git a/protocol/java/src/solarxr_protocol/MessageBundle.java b/protocol/java/src/solarxr_protocol/MessageBundle.java index 97718075..925028ea 100644 --- a/protocol/java/src/solarxr_protocol/MessageBundle.java +++ b/protocol/java/src/solarxr_protocol/MessageBundle.java @@ -1,95 +1,116 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * MessageBundle contains all of the messages for the data feed system and the - * rpc system that will be sent in one buffer. - */ -@SuppressWarnings("unused") -public final class MessageBundle extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static MessageBundle getRootAsMessageBundle(ByteBuffer _bb) { return getRootAsMessageBundle(_bb, new MessageBundle()); } - public static MessageBundle getRootAsMessageBundle(ByteBuffer _bb, MessageBundle 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 MessageBundle __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.data_feed.DataFeedMessageHeader dataFeedMsgs(int j) { return dataFeedMsgs(new solarxr_protocol.data_feed.DataFeedMessageHeader(), j); } - public solarxr_protocol.data_feed.DataFeedMessageHeader dataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeader obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int dataFeedMsgsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.data_feed.DataFeedMessageHeader.Vector dataFeedMsgsVector() { return dataFeedMsgsVector(new solarxr_protocol.data_feed.DataFeedMessageHeader.Vector()); } - public solarxr_protocol.data_feed.DataFeedMessageHeader.Vector dataFeedMsgsVector(solarxr_protocol.data_feed.DataFeedMessageHeader.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - public solarxr_protocol.rpc.RpcMessageHeader rpcMsgs(int j) { return rpcMsgs(new solarxr_protocol.rpc.RpcMessageHeader(), j); } - public solarxr_protocol.rpc.RpcMessageHeader rpcMsgs(solarxr_protocol.rpc.RpcMessageHeader obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int rpcMsgsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.rpc.RpcMessageHeader.Vector rpcMsgsVector() { return rpcMsgsVector(new solarxr_protocol.rpc.RpcMessageHeader.Vector()); } - public solarxr_protocol.rpc.RpcMessageHeader.Vector rpcMsgsVector(solarxr_protocol.rpc.RpcMessageHeader.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createMessageBundle(FlatBufferBuilder builder, - int dataFeedMsgsOffset, - int rpcMsgsOffset) { - builder.startTable(2); - MessageBundle.addRpcMsgs(builder, rpcMsgsOffset); - MessageBundle.addDataFeedMsgs(builder, dataFeedMsgsOffset); - return MessageBundle.endMessageBundle(builder); - } - - public static void startMessageBundle(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addDataFeedMsgs(FlatBufferBuilder builder, int dataFeedMsgsOffset) { builder.addOffset(0, dataFeedMsgsOffset, 0); } - public static int createDataFeedMsgsVector(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 startDataFeedMsgsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static void addRpcMsgs(FlatBufferBuilder builder, int rpcMsgsOffset) { builder.addOffset(1, rpcMsgsOffset, 0); } - public static int createRpcMsgsVector(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 startRpcMsgsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endMessageBundle(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 MessageBundle get(int j) { return get(new MessageBundle(), j); } - public MessageBundle get(MessageBundle obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public MessageBundleT unpack() { - MessageBundleT _o = new MessageBundleT(); - unpackTo(_o); - return _o; - } - public void unpackTo(MessageBundleT _o) { - solarxr_protocol.data_feed.DataFeedMessageHeaderT[] _oDataFeedMsgs = new solarxr_protocol.data_feed.DataFeedMessageHeaderT[dataFeedMsgsLength()]; - for (int _j = 0; _j < dataFeedMsgsLength(); ++_j) {_oDataFeedMsgs[_j] = (dataFeedMsgs(_j) != null ? dataFeedMsgs(_j).unpack() : null);} - _o.setDataFeedMsgs(_oDataFeedMsgs); - solarxr_protocol.rpc.RpcMessageHeaderT[] _oRpcMsgs = new solarxr_protocol.rpc.RpcMessageHeaderT[rpcMsgsLength()]; - for (int _j = 0; _j < rpcMsgsLength(); ++_j) {_oRpcMsgs[_j] = (rpcMsgs(_j) != null ? rpcMsgs(_j).unpack() : null);} - _o.setRpcMsgs(_oRpcMsgs); - } - public static int pack(FlatBufferBuilder builder, MessageBundleT _o) { - if (_o == null) return 0; - int _dataFeedMsgs = 0; - if (_o.getDataFeedMsgs() != null) { - int[] __dataFeedMsgs = new int[_o.getDataFeedMsgs().length]; - int _j = 0; - for (solarxr_protocol.data_feed.DataFeedMessageHeaderT _e : _o.getDataFeedMsgs()) { __dataFeedMsgs[_j] = solarxr_protocol.data_feed.DataFeedMessageHeader.pack(builder, _e); _j++;} - _dataFeedMsgs = createDataFeedMsgsVector(builder, __dataFeedMsgs); - } - int _rpcMsgs = 0; - if (_o.getRpcMsgs() != null) { - int[] __rpcMsgs = new int[_o.getRpcMsgs().length]; - int _j = 0; - for (solarxr_protocol.rpc.RpcMessageHeaderT _e : _o.getRpcMsgs()) { __rpcMsgs[_j] = solarxr_protocol.rpc.RpcMessageHeader.pack(builder, _e); _j++;} - _rpcMsgs = createRpcMsgsVector(builder, __rpcMsgs); - } - return createMessageBundle( - builder, - _dataFeedMsgs, - _rpcMsgs); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * MessageBundle contains all of the messages for the data feed system and the + * rpc system that will be sent in one buffer. + */ +@SuppressWarnings("unused") +public final class MessageBundle extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static MessageBundle getRootAsMessageBundle(ByteBuffer _bb) { return getRootAsMessageBundle(_bb, new MessageBundle()); } + public static MessageBundle getRootAsMessageBundle(ByteBuffer _bb, MessageBundle 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 MessageBundle __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.data_feed.DataFeedMessageHeader dataFeedMsgs(int j) { return dataFeedMsgs(new solarxr_protocol.data_feed.DataFeedMessageHeader(), j); } + public solarxr_protocol.data_feed.DataFeedMessageHeader dataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeader obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int dataFeedMsgsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.data_feed.DataFeedMessageHeader.Vector dataFeedMsgsVector() { return dataFeedMsgsVector(new solarxr_protocol.data_feed.DataFeedMessageHeader.Vector()); } + public solarxr_protocol.data_feed.DataFeedMessageHeader.Vector dataFeedMsgsVector(solarxr_protocol.data_feed.DataFeedMessageHeader.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public solarxr_protocol.rpc.RpcMessageHeader rpcMsgs(int j) { return rpcMsgs(new solarxr_protocol.rpc.RpcMessageHeader(), j); } + public solarxr_protocol.rpc.RpcMessageHeader rpcMsgs(solarxr_protocol.rpc.RpcMessageHeader obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int rpcMsgsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.RpcMessageHeader.Vector rpcMsgsVector() { return rpcMsgsVector(new solarxr_protocol.rpc.RpcMessageHeader.Vector()); } + public solarxr_protocol.rpc.RpcMessageHeader.Vector rpcMsgsVector(solarxr_protocol.rpc.RpcMessageHeader.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public solarxr_protocol.pub_sub.PubSubHeader pubSubMsgs(int j) { return pubSubMsgs(new solarxr_protocol.pub_sub.PubSubHeader(), j); } + public solarxr_protocol.pub_sub.PubSubHeader pubSubMsgs(solarxr_protocol.pub_sub.PubSubHeader obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int pubSubMsgsLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.pub_sub.PubSubHeader.Vector pubSubMsgsVector() { return pubSubMsgsVector(new solarxr_protocol.pub_sub.PubSubHeader.Vector()); } + public solarxr_protocol.pub_sub.PubSubHeader.Vector pubSubMsgsVector(solarxr_protocol.pub_sub.PubSubHeader.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createMessageBundle(FlatBufferBuilder builder, + int dataFeedMsgsOffset, + int rpcMsgsOffset, + int pubSubMsgsOffset) { + builder.startTable(3); + MessageBundle.addPubSubMsgs(builder, pubSubMsgsOffset); + MessageBundle.addRpcMsgs(builder, rpcMsgsOffset); + MessageBundle.addDataFeedMsgs(builder, dataFeedMsgsOffset); + return MessageBundle.endMessageBundle(builder); + } + + public static void startMessageBundle(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addDataFeedMsgs(FlatBufferBuilder builder, int dataFeedMsgsOffset) { builder.addOffset(0, dataFeedMsgsOffset, 0); } + public static int createDataFeedMsgsVector(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 startDataFeedMsgsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addRpcMsgs(FlatBufferBuilder builder, int rpcMsgsOffset) { builder.addOffset(1, rpcMsgsOffset, 0); } + public static int createRpcMsgsVector(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 startRpcMsgsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addPubSubMsgs(FlatBufferBuilder builder, int pubSubMsgsOffset) { builder.addOffset(2, pubSubMsgsOffset, 0); } + public static int createPubSubMsgsVector(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 startPubSubMsgsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endMessageBundle(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 MessageBundle get(int j) { return get(new MessageBundle(), j); } + public MessageBundle get(MessageBundle obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public MessageBundleT unpack() { + MessageBundleT _o = new MessageBundleT(); + unpackTo(_o); + return _o; + } + public void unpackTo(MessageBundleT _o) { + solarxr_protocol.data_feed.DataFeedMessageHeaderT[] _oDataFeedMsgs = new solarxr_protocol.data_feed.DataFeedMessageHeaderT[dataFeedMsgsLength()]; + for (int _j = 0; _j < dataFeedMsgsLength(); ++_j) {_oDataFeedMsgs[_j] = (dataFeedMsgs(_j) != null ? dataFeedMsgs(_j).unpack() : null);} + _o.setDataFeedMsgs(_oDataFeedMsgs); + solarxr_protocol.rpc.RpcMessageHeaderT[] _oRpcMsgs = new solarxr_protocol.rpc.RpcMessageHeaderT[rpcMsgsLength()]; + for (int _j = 0; _j < rpcMsgsLength(); ++_j) {_oRpcMsgs[_j] = (rpcMsgs(_j) != null ? rpcMsgs(_j).unpack() : null);} + _o.setRpcMsgs(_oRpcMsgs); + solarxr_protocol.pub_sub.PubSubHeaderT[] _oPubSubMsgs = new solarxr_protocol.pub_sub.PubSubHeaderT[pubSubMsgsLength()]; + for (int _j = 0; _j < pubSubMsgsLength(); ++_j) {_oPubSubMsgs[_j] = (pubSubMsgs(_j) != null ? pubSubMsgs(_j).unpack() : null);} + _o.setPubSubMsgs(_oPubSubMsgs); + } + public static int pack(FlatBufferBuilder builder, MessageBundleT _o) { + if (_o == null) return 0; + int _dataFeedMsgs = 0; + if (_o.getDataFeedMsgs() != null) { + int[] __dataFeedMsgs = new int[_o.getDataFeedMsgs().length]; + int _j = 0; + for (solarxr_protocol.data_feed.DataFeedMessageHeaderT _e : _o.getDataFeedMsgs()) { __dataFeedMsgs[_j] = solarxr_protocol.data_feed.DataFeedMessageHeader.pack(builder, _e); _j++;} + _dataFeedMsgs = createDataFeedMsgsVector(builder, __dataFeedMsgs); + } + int _rpcMsgs = 0; + if (_o.getRpcMsgs() != null) { + int[] __rpcMsgs = new int[_o.getRpcMsgs().length]; + int _j = 0; + for (solarxr_protocol.rpc.RpcMessageHeaderT _e : _o.getRpcMsgs()) { __rpcMsgs[_j] = solarxr_protocol.rpc.RpcMessageHeader.pack(builder, _e); _j++;} + _rpcMsgs = createRpcMsgsVector(builder, __rpcMsgs); + } + int _pubSubMsgs = 0; + if (_o.getPubSubMsgs() != null) { + int[] __pubSubMsgs = new int[_o.getPubSubMsgs().length]; + int _j = 0; + for (solarxr_protocol.pub_sub.PubSubHeaderT _e : _o.getPubSubMsgs()) { __pubSubMsgs[_j] = solarxr_protocol.pub_sub.PubSubHeader.pack(builder, _e); _j++;} + _pubSubMsgs = createPubSubMsgsVector(builder, __pubSubMsgs); + } + return createMessageBundle( + builder, + _dataFeedMsgs, + _rpcMsgs, + _pubSubMsgs); + } +} + diff --git a/protocol/java/src/solarxr_protocol/MessageBundleT.java b/protocol/java/src/solarxr_protocol/MessageBundleT.java index 62487dc3..00805f50 100644 --- a/protocol/java/src/solarxr_protocol/MessageBundleT.java +++ b/protocol/java/src/solarxr_protocol/MessageBundleT.java @@ -1,28 +1,34 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class MessageBundleT { - private solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs; - private solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs; - - public solarxr_protocol.data_feed.DataFeedMessageHeaderT[] getDataFeedMsgs() { return dataFeedMsgs; } - - public void setDataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs) { this.dataFeedMsgs = dataFeedMsgs; } - - public solarxr_protocol.rpc.RpcMessageHeaderT[] getRpcMsgs() { return rpcMsgs; } - - public void setRpcMsgs(solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs) { this.rpcMsgs = rpcMsgs; } - - - public MessageBundleT() { - this.dataFeedMsgs = null; - this.rpcMsgs = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class MessageBundleT { + private solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs; + private solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs; + private solarxr_protocol.pub_sub.PubSubHeaderT[] pubSubMsgs; + + public solarxr_protocol.data_feed.DataFeedMessageHeaderT[] getDataFeedMsgs() { return dataFeedMsgs; } + + public void setDataFeedMsgs(solarxr_protocol.data_feed.DataFeedMessageHeaderT[] dataFeedMsgs) { this.dataFeedMsgs = dataFeedMsgs; } + + public solarxr_protocol.rpc.RpcMessageHeaderT[] getRpcMsgs() { return rpcMsgs; } + + public void setRpcMsgs(solarxr_protocol.rpc.RpcMessageHeaderT[] rpcMsgs) { this.rpcMsgs = rpcMsgs; } + + public solarxr_protocol.pub_sub.PubSubHeaderT[] getPubSubMsgs() { return pubSubMsgs; } + + public void setPubSubMsgs(solarxr_protocol.pub_sub.PubSubHeaderT[] pubSubMsgs) { this.pubSubMsgs = pubSubMsgs; } + + + public MessageBundleT() { + this.dataFeedMsgs = null; + this.rpcMsgs = null; + this.pubSubMsgs = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/Bone.java b/protocol/java/src/solarxr_protocol/data_feed/Bone.java index acfef1ea..a111958a 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/Bone.java +++ b/protocol/java/src/solarxr_protocol/data_feed/Bone.java @@ -1,78 +1,78 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class Bone extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static Bone getRootAsBone(ByteBuffer _bb) { return getRootAsBone(_bb, new Bone()); } - public static Bone getRootAsBone(ByteBuffer _bb, Bone 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 Bone __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int bodyPart() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - /** - * The global rotation of the bone. - * - * Note that the identity rotation is where a bone's tail is towards -y (assuming - * the head of the bone is the origin) - */ - public solarxr_protocol.datatypes.math.Quat rotationG() { return rotationG(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat rotationG(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(6); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - public float boneLength() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - /** - * The global position of the head of this bone. - * - * The head of a bone is joint/node of the bone touching the parent bone. The - * parent is defined as the bone closer to the HMD. - */ - public solarxr_protocol.datatypes.math.Vec3f headPositionG() { return headPositionG(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f headPositionG(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - - public static void startBone(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addBodyPart(FlatBufferBuilder builder, int bodyPart) { builder.addByte(0, (byte) bodyPart, (byte) 0); } - public static void addRotationG(FlatBufferBuilder builder, int rotationGOffset) { builder.addStruct(1, rotationGOffset, 0); } - public static void addBoneLength(FlatBufferBuilder builder, float boneLength) { builder.addFloat(2, boneLength, 0.0f); } - public static void addHeadPositionG(FlatBufferBuilder builder, int headPositionGOffset) { builder.addStruct(3, headPositionGOffset, 0); } - public static int endBone(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 Bone get(int j) { return get(new Bone(), j); } - public Bone get(Bone obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public BoneT unpack() { - BoneT _o = new BoneT(); - unpackTo(_o); - return _o; - } - public void unpackTo(BoneT _o) { - int _oBodyPart = bodyPart(); - _o.setBodyPart(_oBodyPart); - if (rotationG() != null) rotationG().unpackTo(_o.getRotationG()); - else _o.setRotationG(null); - float _oBoneLength = boneLength(); - _o.setBoneLength(_oBoneLength); - if (headPositionG() != null) headPositionG().unpackTo(_o.getHeadPositionG()); - else _o.setHeadPositionG(null); - } - public static int pack(FlatBufferBuilder builder, BoneT _o) { - if (_o == null) return 0; - startBone(builder); - addBodyPart(builder, _o.getBodyPart()); - addRotationG(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationG())); - addBoneLength(builder, _o.getBoneLength()); - addHeadPositionG(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getHeadPositionG())); - return endBone(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class Bone extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static Bone getRootAsBone(ByteBuffer _bb) { return getRootAsBone(_bb, new Bone()); } + public static Bone getRootAsBone(ByteBuffer _bb, Bone 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 Bone __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int bodyPart() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * The global rotation of the bone. + * + * Note that the identity rotation is where a bone's tail is towards -y (assuming + * the head of the bone is the origin) + */ + public solarxr_protocol.datatypes.math.Quat rotationG() { return rotationG(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat rotationG(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(6); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + public float boneLength() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + /** + * The global position of the head of this bone. + * + * The head of a bone is joint/node of the bone touching the parent bone. The + * parent is defined as the bone closer to the HMD. + */ + public solarxr_protocol.datatypes.math.Vec3f headPositionG() { return headPositionG(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f headPositionG(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + + public static void startBone(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addBodyPart(FlatBufferBuilder builder, int bodyPart) { builder.addByte(0, (byte) bodyPart, (byte) 0); } + public static void addRotationG(FlatBufferBuilder builder, int rotationGOffset) { builder.addStruct(1, rotationGOffset, 0); } + public static void addBoneLength(FlatBufferBuilder builder, float boneLength) { builder.addFloat(2, boneLength, 0.0f); } + public static void addHeadPositionG(FlatBufferBuilder builder, int headPositionGOffset) { builder.addStruct(3, headPositionGOffset, 0); } + public static int endBone(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 Bone get(int j) { return get(new Bone(), j); } + public Bone get(Bone obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public BoneT unpack() { + BoneT _o = new BoneT(); + unpackTo(_o); + return _o; + } + public void unpackTo(BoneT _o) { + int _oBodyPart = bodyPart(); + _o.setBodyPart(_oBodyPart); + if (rotationG() != null) rotationG().unpackTo(_o.getRotationG()); + else _o.setRotationG(null); + float _oBoneLength = boneLength(); + _o.setBoneLength(_oBoneLength); + if (headPositionG() != null) headPositionG().unpackTo(_o.getHeadPositionG()); + else _o.setHeadPositionG(null); + } + public static int pack(FlatBufferBuilder builder, BoneT _o) { + if (_o == null) return 0; + startBone(builder); + addBodyPart(builder, _o.getBodyPart()); + addRotationG(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotationG())); + addBoneLength(builder, _o.getBoneLength()); + addHeadPositionG(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getHeadPositionG())); + return endBone(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/BoneT.java b/protocol/java/src/solarxr_protocol/data_feed/BoneT.java index 9955c284..a175e794 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/BoneT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/BoneT.java @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class BoneT { - private int bodyPart; - private solarxr_protocol.datatypes.math.QuatT rotationG; - private float boneLength; - private solarxr_protocol.datatypes.math.Vec3fT headPositionG; - - public int getBodyPart() { return bodyPart; } - - public void setBodyPart(int bodyPart) { this.bodyPart = bodyPart; } - - public solarxr_protocol.datatypes.math.QuatT getRotationG() { return rotationG; } - - public void setRotationG(solarxr_protocol.datatypes.math.QuatT rotationG) { this.rotationG = rotationG; } - - public float getBoneLength() { return boneLength; } - - public void setBoneLength(float boneLength) { this.boneLength = boneLength; } - - public solarxr_protocol.datatypes.math.Vec3fT getHeadPositionG() { return headPositionG; } - - public void setHeadPositionG(solarxr_protocol.datatypes.math.Vec3fT headPositionG) { this.headPositionG = headPositionG; } - - - public BoneT() { - this.bodyPart = 0; - this.rotationG = new solarxr_protocol.datatypes.math.QuatT(); - this.boneLength = 0.0f; - this.headPositionG = new solarxr_protocol.datatypes.math.Vec3fT(); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class BoneT { + private int bodyPart; + private solarxr_protocol.datatypes.math.QuatT rotationG; + private float boneLength; + private solarxr_protocol.datatypes.math.Vec3fT headPositionG; + + public int getBodyPart() { return bodyPart; } + + public void setBodyPart(int bodyPart) { this.bodyPart = bodyPart; } + + public solarxr_protocol.datatypes.math.QuatT getRotationG() { return rotationG; } + + public void setRotationG(solarxr_protocol.datatypes.math.QuatT rotationG) { this.rotationG = rotationG; } + + public float getBoneLength() { return boneLength; } + + public void setBoneLength(float boneLength) { this.boneLength = boneLength; } + + public solarxr_protocol.datatypes.math.Vec3fT getHeadPositionG() { return headPositionG; } + + public void setHeadPositionG(solarxr_protocol.datatypes.math.Vec3fT headPositionG) { this.headPositionG = headPositionG; } + + + public BoneT() { + this.bodyPart = 0; + this.rotationG = new solarxr_protocol.datatypes.math.QuatT(); + this.boneLength = 0.0f; + this.headPositionG = new solarxr_protocol.datatypes.math.Vec3fT(); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java index 413b9c65..120645df 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java @@ -1,89 +1,89 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * All information related to the configuration of a data feed. This may be sent - * as part of a `StartFeed`. - */ -@SuppressWarnings("unused") -public final class DataFeedConfig extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static DataFeedConfig getRootAsDataFeedConfig(ByteBuffer _bb) { return getRootAsDataFeedConfig(_bb, new DataFeedConfig()); } - public static DataFeedConfig getRootAsDataFeedConfig(ByteBuffer _bb, DataFeedConfig 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 DataFeedConfig __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * Minimum delay in milliseconds between new data updates. This value will be - * ignored when used for a `PollDataFeed`. - */ - public int minimumTimeSinceLast() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - public solarxr_protocol.data_feed.device_data.DeviceDataMask dataMask() { return dataMask(new solarxr_protocol.data_feed.device_data.DeviceDataMask()); } - public solarxr_protocol.data_feed.device_data.DeviceDataMask dataMask(solarxr_protocol.data_feed.device_data.DeviceDataMask obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.data_feed.tracker.TrackerDataMask syntheticTrackersMask() { return syntheticTrackersMask(new solarxr_protocol.data_feed.tracker.TrackerDataMask()); } - public solarxr_protocol.data_feed.tracker.TrackerDataMask syntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMask obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public boolean boneMask() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createDataFeedConfig(FlatBufferBuilder builder, - int minimumTimeSinceLast, - int dataMaskOffset, - int syntheticTrackersMaskOffset, - boolean boneMask) { - builder.startTable(4); - DataFeedConfig.addSyntheticTrackersMask(builder, syntheticTrackersMaskOffset); - DataFeedConfig.addDataMask(builder, dataMaskOffset); - DataFeedConfig.addMinimumTimeSinceLast(builder, minimumTimeSinceLast); - DataFeedConfig.addBoneMask(builder, boneMask); - return DataFeedConfig.endDataFeedConfig(builder); - } - - public static void startDataFeedConfig(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addMinimumTimeSinceLast(FlatBufferBuilder builder, int minimumTimeSinceLast) { builder.addShort(0, (short) minimumTimeSinceLast, (short) 0); } - public static void addDataMask(FlatBufferBuilder builder, int dataMaskOffset) { builder.addOffset(1, dataMaskOffset, 0); } - public static void addSyntheticTrackersMask(FlatBufferBuilder builder, int syntheticTrackersMaskOffset) { builder.addOffset(2, syntheticTrackersMaskOffset, 0); } - public static void addBoneMask(FlatBufferBuilder builder, boolean boneMask) { builder.addBoolean(3, boneMask, false); } - public static int endDataFeedConfig(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 DataFeedConfig get(int j) { return get(new DataFeedConfig(), j); } - public DataFeedConfig get(DataFeedConfig obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public DataFeedConfigT unpack() { - DataFeedConfigT _o = new DataFeedConfigT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DataFeedConfigT _o) { - int _oMinimumTimeSinceLast = minimumTimeSinceLast(); - _o.setMinimumTimeSinceLast(_oMinimumTimeSinceLast); - if (dataMask() != null) _o.setDataMask(dataMask().unpack()); - else _o.setDataMask(null); - if (syntheticTrackersMask() != null) _o.setSyntheticTrackersMask(syntheticTrackersMask().unpack()); - else _o.setSyntheticTrackersMask(null); - boolean _oBoneMask = boneMask(); - _o.setBoneMask(_oBoneMask); - } - public static int pack(FlatBufferBuilder builder, DataFeedConfigT _o) { - if (_o == null) return 0; - int _dataMask = _o.getDataMask() == null ? 0 : solarxr_protocol.data_feed.device_data.DeviceDataMask.pack(builder, _o.getDataMask()); - int _syntheticTrackersMask = _o.getSyntheticTrackersMask() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getSyntheticTrackersMask()); - return createDataFeedConfig( - builder, - _o.getMinimumTimeSinceLast(), - _dataMask, - _syntheticTrackersMask, - _o.getBoneMask()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * All information related to the configuration of a data feed. This may be sent + * as part of a `StartFeed`. + */ +@SuppressWarnings("unused") +public final class DataFeedConfig extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static DataFeedConfig getRootAsDataFeedConfig(ByteBuffer _bb) { return getRootAsDataFeedConfig(_bb, new DataFeedConfig()); } + public static DataFeedConfig getRootAsDataFeedConfig(ByteBuffer _bb, DataFeedConfig 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 DataFeedConfig __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Minimum delay in milliseconds between new data updates. This value will be + * ignored when used for a `PollDataFeed`. + */ + public int minimumTimeSinceLast() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + public solarxr_protocol.data_feed.device_data.DeviceDataMask dataMask() { return dataMask(new solarxr_protocol.data_feed.device_data.DeviceDataMask()); } + public solarxr_protocol.data_feed.device_data.DeviceDataMask dataMask(solarxr_protocol.data_feed.device_data.DeviceDataMask obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.data_feed.tracker.TrackerDataMask syntheticTrackersMask() { return syntheticTrackersMask(new solarxr_protocol.data_feed.tracker.TrackerDataMask()); } + public solarxr_protocol.data_feed.tracker.TrackerDataMask syntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMask obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public boolean boneMask() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createDataFeedConfig(FlatBufferBuilder builder, + int minimumTimeSinceLast, + int dataMaskOffset, + int syntheticTrackersMaskOffset, + boolean boneMask) { + builder.startTable(4); + DataFeedConfig.addSyntheticTrackersMask(builder, syntheticTrackersMaskOffset); + DataFeedConfig.addDataMask(builder, dataMaskOffset); + DataFeedConfig.addMinimumTimeSinceLast(builder, minimumTimeSinceLast); + DataFeedConfig.addBoneMask(builder, boneMask); + return DataFeedConfig.endDataFeedConfig(builder); + } + + public static void startDataFeedConfig(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addMinimumTimeSinceLast(FlatBufferBuilder builder, int minimumTimeSinceLast) { builder.addShort(0, (short) minimumTimeSinceLast, (short) 0); } + public static void addDataMask(FlatBufferBuilder builder, int dataMaskOffset) { builder.addOffset(1, dataMaskOffset, 0); } + public static void addSyntheticTrackersMask(FlatBufferBuilder builder, int syntheticTrackersMaskOffset) { builder.addOffset(2, syntheticTrackersMaskOffset, 0); } + public static void addBoneMask(FlatBufferBuilder builder, boolean boneMask) { builder.addBoolean(3, boneMask, false); } + public static int endDataFeedConfig(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 DataFeedConfig get(int j) { return get(new DataFeedConfig(), j); } + public DataFeedConfig get(DataFeedConfig obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DataFeedConfigT unpack() { + DataFeedConfigT _o = new DataFeedConfigT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DataFeedConfigT _o) { + int _oMinimumTimeSinceLast = minimumTimeSinceLast(); + _o.setMinimumTimeSinceLast(_oMinimumTimeSinceLast); + if (dataMask() != null) _o.setDataMask(dataMask().unpack()); + else _o.setDataMask(null); + if (syntheticTrackersMask() != null) _o.setSyntheticTrackersMask(syntheticTrackersMask().unpack()); + else _o.setSyntheticTrackersMask(null); + boolean _oBoneMask = boneMask(); + _o.setBoneMask(_oBoneMask); + } + public static int pack(FlatBufferBuilder builder, DataFeedConfigT _o) { + if (_o == null) return 0; + int _data_mask = _o.getDataMask() == null ? 0 : solarxr_protocol.data_feed.device_data.DeviceDataMask.pack(builder, _o.getDataMask()); + int _synthetic_trackers_mask = _o.getSyntheticTrackersMask() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getSyntheticTrackersMask()); + return createDataFeedConfig( + builder, + _o.getMinimumTimeSinceLast(), + _data_mask, + _synthetic_trackers_mask, + _o.getBoneMask()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java index 12f3ec55..ee6db767 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfigT.java @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class DataFeedConfigT { - private int minimumTimeSinceLast; - private solarxr_protocol.data_feed.device_data.DeviceDataMaskT dataMask; - private solarxr_protocol.data_feed.tracker.TrackerDataMaskT syntheticTrackersMask; - private boolean boneMask; - - public int getMinimumTimeSinceLast() { return minimumTimeSinceLast; } - - public void setMinimumTimeSinceLast(int minimumTimeSinceLast) { this.minimumTimeSinceLast = minimumTimeSinceLast; } - - public solarxr_protocol.data_feed.device_data.DeviceDataMaskT getDataMask() { return dataMask; } - - public void setDataMask(solarxr_protocol.data_feed.device_data.DeviceDataMaskT dataMask) { this.dataMask = dataMask; } - - public solarxr_protocol.data_feed.tracker.TrackerDataMaskT getSyntheticTrackersMask() { return syntheticTrackersMask; } - - public void setSyntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMaskT syntheticTrackersMask) { this.syntheticTrackersMask = syntheticTrackersMask; } - - public boolean getBoneMask() { return boneMask; } - - public void setBoneMask(boolean boneMask) { this.boneMask = boneMask; } - - - public DataFeedConfigT() { - this.minimumTimeSinceLast = 0; - this.dataMask = null; - this.syntheticTrackersMask = null; - this.boneMask = false; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DataFeedConfigT { + private int minimumTimeSinceLast; + private solarxr_protocol.data_feed.device_data.DeviceDataMaskT dataMask; + private solarxr_protocol.data_feed.tracker.TrackerDataMaskT syntheticTrackersMask; + private boolean boneMask; + + public int getMinimumTimeSinceLast() { return minimumTimeSinceLast; } + + public void setMinimumTimeSinceLast(int minimumTimeSinceLast) { this.minimumTimeSinceLast = minimumTimeSinceLast; } + + public solarxr_protocol.data_feed.device_data.DeviceDataMaskT getDataMask() { return dataMask; } + + public void setDataMask(solarxr_protocol.data_feed.device_data.DeviceDataMaskT dataMask) { this.dataMask = dataMask; } + + public solarxr_protocol.data_feed.tracker.TrackerDataMaskT getSyntheticTrackersMask() { return syntheticTrackersMask; } + + public void setSyntheticTrackersMask(solarxr_protocol.data_feed.tracker.TrackerDataMaskT syntheticTrackersMask) { this.syntheticTrackersMask = syntheticTrackersMask; } + + public boolean getBoneMask() { return boneMask; } + + public void setBoneMask(boolean boneMask) { this.boneMask = boneMask; } + + + public DataFeedConfigT() { + this.minimumTimeSinceLast = 0; + this.dataMask = null; + this.syntheticTrackersMask = null; + this.boneMask = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessage.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessage.java index 70633f5f..229b3a64 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessage.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessage.java @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -@SuppressWarnings("unused") -public final class DataFeedMessage { - private DataFeedMessage() { } - public static final byte NONE = 0; - public static final byte PollDataFeed = 1; - public static final byte StartDataFeed = 2; - public static final byte DataFeedUpdate = 3; - public static final byte DataFeedConfig = 4; - - public static final String[] names = { "NONE", "PollDataFeed", "StartDataFeed", "DataFeedUpdate", "DataFeedConfig", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +@SuppressWarnings("unused") +public final class DataFeedMessage { + private DataFeedMessage() { } + public static final byte NONE = 0; + public static final byte PollDataFeed = 1; + public static final byte StartDataFeed = 2; + public static final byte DataFeedUpdate = 3; + public static final byte DataFeedConfig = 4; + + public static final String[] names = { "NONE", "PollDataFeed", "StartDataFeed", "DataFeedUpdate", "DataFeedConfig", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeader.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeader.java index 1634edaf..52474a3b 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeader.java @@ -1,85 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class DataFeedMessageHeader extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static DataFeedMessageHeader getRootAsDataFeedMessageHeader(ByteBuffer _bb) { return getRootAsDataFeedMessageHeader(_bb, new DataFeedMessageHeader()); } - public static DataFeedMessageHeader getRootAsDataFeedMessageHeader(ByteBuffer _bb, DataFeedMessageHeader 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 DataFeedMessageHeader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public byte messageType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } - public Table message(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } - - public static int createDataFeedMessageHeader(FlatBufferBuilder builder, - byte messageType, - int messageOffset) { - builder.startTable(2); - DataFeedMessageHeader.addMessage(builder, messageOffset); - DataFeedMessageHeader.addMessageType(builder, messageType); - return DataFeedMessageHeader.endDataFeedMessageHeader(builder); - } - - public static void startDataFeedMessageHeader(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addMessageType(FlatBufferBuilder builder, byte messageType) { builder.addByte(0, messageType, 0); } - public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(1, messageOffset, 0); } - public static int endDataFeedMessageHeader(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 DataFeedMessageHeader get(int j) { return get(new DataFeedMessageHeader(), j); } - public DataFeedMessageHeader get(DataFeedMessageHeader obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public DataFeedMessageHeaderT unpack() { - DataFeedMessageHeaderT _o = new DataFeedMessageHeaderT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DataFeedMessageHeaderT _o) { - solarxr_protocol.data_feed.DataFeedMessageUnion _oMessage = new solarxr_protocol.data_feed.DataFeedMessageUnion(); - byte _oMessageType = messageType(); - _oMessage.setType(_oMessageType); - Table _oMessageValue; - switch (_oMessageType) { - case solarxr_protocol.data_feed.DataFeedMessage.PollDataFeed: - _oMessageValue = message(new solarxr_protocol.data_feed.PollDataFeed()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.PollDataFeed) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.data_feed.DataFeedMessage.StartDataFeed: - _oMessageValue = message(new solarxr_protocol.data_feed.StartDataFeed()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.StartDataFeed) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.data_feed.DataFeedMessage.DataFeedUpdate: - _oMessageValue = message(new solarxr_protocol.data_feed.DataFeedUpdate()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.DataFeedUpdate) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.data_feed.DataFeedMessage.DataFeedConfig: - _oMessageValue = message(new solarxr_protocol.data_feed.DataFeedConfig()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.DataFeedConfig) _oMessageValue).unpack() : null); - break; - default: break; - } - _o.setMessage(_oMessage); - } - public static int pack(FlatBufferBuilder builder, DataFeedMessageHeaderT _o) { - if (_o == null) return 0; - byte _messageType = _o.getMessage() == null ? solarxr_protocol.data_feed.DataFeedMessage.NONE : _o.getMessage().getType(); - int _message = _o.getMessage() == null ? 0 : solarxr_protocol.data_feed.DataFeedMessageUnion.pack(builder, _o.getMessage()); - return createDataFeedMessageHeader( - builder, - _messageType, - _message); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class DataFeedMessageHeader extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static DataFeedMessageHeader getRootAsDataFeedMessageHeader(ByteBuffer _bb) { return getRootAsDataFeedMessageHeader(_bb, new DataFeedMessageHeader()); } + public static DataFeedMessageHeader getRootAsDataFeedMessageHeader(ByteBuffer _bb, DataFeedMessageHeader 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 DataFeedMessageHeader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte messageType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table message(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createDataFeedMessageHeader(FlatBufferBuilder builder, + byte messageType, + int messageOffset) { + builder.startTable(2); + DataFeedMessageHeader.addMessage(builder, messageOffset); + DataFeedMessageHeader.addMessageType(builder, messageType); + return DataFeedMessageHeader.endDataFeedMessageHeader(builder); + } + + public static void startDataFeedMessageHeader(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addMessageType(FlatBufferBuilder builder, byte messageType) { builder.addByte(0, messageType, 0); } + public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(1, messageOffset, 0); } + public static int endDataFeedMessageHeader(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 DataFeedMessageHeader get(int j) { return get(new DataFeedMessageHeader(), j); } + public DataFeedMessageHeader get(DataFeedMessageHeader obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DataFeedMessageHeaderT unpack() { + DataFeedMessageHeaderT _o = new DataFeedMessageHeaderT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DataFeedMessageHeaderT _o) { + solarxr_protocol.data_feed.DataFeedMessageUnion _oMessage = new solarxr_protocol.data_feed.DataFeedMessageUnion(); + byte _oMessageType = messageType(); + _oMessage.setType(_oMessageType); + Table _oMessageValue; + switch (_oMessageType) { + case solarxr_protocol.data_feed.DataFeedMessage.PollDataFeed: + _oMessageValue = message(new solarxr_protocol.data_feed.PollDataFeed()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.PollDataFeed) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.data_feed.DataFeedMessage.StartDataFeed: + _oMessageValue = message(new solarxr_protocol.data_feed.StartDataFeed()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.StartDataFeed) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.data_feed.DataFeedMessage.DataFeedUpdate: + _oMessageValue = message(new solarxr_protocol.data_feed.DataFeedUpdate()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.DataFeedUpdate) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.data_feed.DataFeedMessage.DataFeedConfig: + _oMessageValue = message(new solarxr_protocol.data_feed.DataFeedConfig()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.data_feed.DataFeedConfig) _oMessageValue).unpack() : null); + break; + default: break; + } + _o.setMessage(_oMessage); + } + public static int pack(FlatBufferBuilder builder, DataFeedMessageHeaderT _o) { + if (_o == null) return 0; + byte _messageType = _o.getMessage() == null ? solarxr_protocol.data_feed.DataFeedMessage.NONE : _o.getMessage().getType(); + int _message = _o.getMessage() == null ? 0 : solarxr_protocol.data_feed.DataFeedMessageUnion.pack(builder, _o.getMessage()); + return createDataFeedMessageHeader( + builder, + _messageType, + _message); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeaderT.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeaderT.java index c94a3600..39d954f5 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeaderT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageHeaderT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class DataFeedMessageHeaderT { - private solarxr_protocol.data_feed.DataFeedMessageUnion message; - - public solarxr_protocol.data_feed.DataFeedMessageUnion getMessage() { return message; } - - public void setMessage(solarxr_protocol.data_feed.DataFeedMessageUnion message) { this.message = message; } - - - public DataFeedMessageHeaderT() { - this.message = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DataFeedMessageHeaderT { + private solarxr_protocol.data_feed.DataFeedMessageUnion message; + + public solarxr_protocol.data_feed.DataFeedMessageUnion getMessage() { return message; } + + public void setMessage(solarxr_protocol.data_feed.DataFeedMessageUnion message) { this.message = message; } + + + public DataFeedMessageHeaderT() { + this.message = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageUnion.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageUnion.java index 73ba956f..9fb58f3a 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedMessageUnion.java @@ -1,39 +1,39 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import com.google.flatbuffers.FlatBufferBuilder; - -public class DataFeedMessageUnion { - private byte type; - private Object value; - - public byte getType() { return type; } - - public void setType(byte type) { this.type = type; } - - public Object getValue() { return value; } - - public void setValue(Object value) { this.value = value; } - - public DataFeedMessageUnion() { - this.type = DataFeedMessage.NONE; - this.value = null; - } - - public solarxr_protocol.data_feed.PollDataFeedT asPollDataFeed() { return (solarxr_protocol.data_feed.PollDataFeedT) value; } - public solarxr_protocol.data_feed.StartDataFeedT asStartDataFeed() { return (solarxr_protocol.data_feed.StartDataFeedT) value; } - public solarxr_protocol.data_feed.DataFeedUpdateT asDataFeedUpdate() { return (solarxr_protocol.data_feed.DataFeedUpdateT) value; } - public solarxr_protocol.data_feed.DataFeedConfigT asDataFeedConfig() { return (solarxr_protocol.data_feed.DataFeedConfigT) value; } - - public static int pack(FlatBufferBuilder builder, DataFeedMessageUnion _o) { - switch (_o.type) { - case DataFeedMessage.PollDataFeed: return solarxr_protocol.data_feed.PollDataFeed.pack(builder, _o.asPollDataFeed()); - case DataFeedMessage.StartDataFeed: return solarxr_protocol.data_feed.StartDataFeed.pack(builder, _o.asStartDataFeed()); - case DataFeedMessage.DataFeedUpdate: return solarxr_protocol.data_feed.DataFeedUpdate.pack(builder, _o.asDataFeedUpdate()); - case DataFeedMessage.DataFeedConfig: return solarxr_protocol.data_feed.DataFeedConfig.pack(builder, _o.asDataFeedConfig()); - default: return 0; - } - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class DataFeedMessageUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public DataFeedMessageUnion() { + this.type = DataFeedMessage.NONE; + this.value = null; + } + + public solarxr_protocol.data_feed.PollDataFeedT asPollDataFeed() { return (solarxr_protocol.data_feed.PollDataFeedT) value; } + public solarxr_protocol.data_feed.StartDataFeedT asStartDataFeed() { return (solarxr_protocol.data_feed.StartDataFeedT) value; } + public solarxr_protocol.data_feed.DataFeedUpdateT asDataFeedUpdate() { return (solarxr_protocol.data_feed.DataFeedUpdateT) value; } + public solarxr_protocol.data_feed.DataFeedConfigT asDataFeedConfig() { return (solarxr_protocol.data_feed.DataFeedConfigT) value; } + + public static int pack(FlatBufferBuilder builder, DataFeedMessageUnion _o) { + switch (_o.type) { + case DataFeedMessage.PollDataFeed: return solarxr_protocol.data_feed.PollDataFeed.pack(builder, _o.asPollDataFeed()); + case DataFeedMessage.StartDataFeed: return solarxr_protocol.data_feed.StartDataFeed.pack(builder, _o.asStartDataFeed()); + case DataFeedMessage.DataFeedUpdate: return solarxr_protocol.data_feed.DataFeedUpdate.pack(builder, _o.asDataFeedUpdate()); + case DataFeedMessage.DataFeedConfig: return solarxr_protocol.data_feed.DataFeedConfig.pack(builder, _o.asDataFeedConfig()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java index 4066cb06..39c510f5 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdate.java @@ -1,124 +1,124 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * All of the data components related to a single data feed. A data feed is comprised - * of device data, and tracker data. - * - * A data feed might send data only when it changes/updates, and we should make no - * assumptions that the data is actually delivered. If you want to guarantee - * delivery and avoid dropped observations of data (such as a user-initiated - * button press), it is better to use the RPC system. - */ -@SuppressWarnings("unused") -public final class DataFeedUpdate extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static DataFeedUpdate getRootAsDataFeedUpdate(ByteBuffer _bb) { return getRootAsDataFeedUpdate(_bb, new DataFeedUpdate()); } - public static DataFeedUpdate getRootAsDataFeedUpdate(ByteBuffer _bb, DataFeedUpdate 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 DataFeedUpdate __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.data_feed.device_data.DeviceData devices(int j) { return devices(new solarxr_protocol.data_feed.device_data.DeviceData(), j); } - public solarxr_protocol.data_feed.device_data.DeviceData devices(solarxr_protocol.data_feed.device_data.DeviceData obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int devicesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.data_feed.device_data.DeviceData.Vector devicesVector() { return devicesVector(new solarxr_protocol.data_feed.device_data.DeviceData.Vector()); } - public solarxr_protocol.data_feed.device_data.DeviceData.Vector devicesVector(solarxr_protocol.data_feed.device_data.DeviceData.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - public solarxr_protocol.data_feed.tracker.TrackerData syntheticTrackers(int j) { return syntheticTrackers(new solarxr_protocol.data_feed.tracker.TrackerData(), j); } - public solarxr_protocol.data_feed.tracker.TrackerData syntheticTrackers(solarxr_protocol.data_feed.tracker.TrackerData obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int syntheticTrackersLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.data_feed.tracker.TrackerData.Vector syntheticTrackersVector() { return syntheticTrackersVector(new solarxr_protocol.data_feed.tracker.TrackerData.Vector()); } - public solarxr_protocol.data_feed.tracker.TrackerData.Vector syntheticTrackersVector(solarxr_protocol.data_feed.tracker.TrackerData.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - /** - * This must represent a set, where there is no more than one bone for a `BodyPart`. - */ - public solarxr_protocol.data_feed.Bone bones(int j) { return bones(new solarxr_protocol.data_feed.Bone(), j); } - public solarxr_protocol.data_feed.Bone bones(solarxr_protocol.data_feed.Bone obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int bonesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.data_feed.Bone.Vector bonesVector() { return bonesVector(new solarxr_protocol.data_feed.Bone.Vector()); } - public solarxr_protocol.data_feed.Bone.Vector bonesVector(solarxr_protocol.data_feed.Bone.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createDataFeedUpdate(FlatBufferBuilder builder, - int devicesOffset, - int syntheticTrackersOffset, - int bonesOffset) { - builder.startTable(3); - DataFeedUpdate.addBones(builder, bonesOffset); - DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackersOffset); - DataFeedUpdate.addDevices(builder, devicesOffset); - return DataFeedUpdate.endDataFeedUpdate(builder); - } - - public static void startDataFeedUpdate(FlatBufferBuilder builder) { builder.startTable(3); } - public static void addDevices(FlatBufferBuilder builder, int devicesOffset) { builder.addOffset(0, devicesOffset, 0); } - public static int createDevicesVector(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 startDevicesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static void addSyntheticTrackers(FlatBufferBuilder builder, int syntheticTrackersOffset) { builder.addOffset(1, syntheticTrackersOffset, 0); } - public static int createSyntheticTrackersVector(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 startSyntheticTrackersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static void addBones(FlatBufferBuilder builder, int bonesOffset) { builder.addOffset(2, bonesOffset, 0); } - public static int createBonesVector(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 startBonesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endDataFeedUpdate(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 DataFeedUpdate get(int j) { return get(new DataFeedUpdate(), j); } - public DataFeedUpdate get(DataFeedUpdate obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public DataFeedUpdateT unpack() { - DataFeedUpdateT _o = new DataFeedUpdateT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DataFeedUpdateT _o) { - solarxr_protocol.data_feed.device_data.DeviceDataT[] _oDevices = new solarxr_protocol.data_feed.device_data.DeviceDataT[devicesLength()]; - for (int _j = 0; _j < devicesLength(); ++_j) {_oDevices[_j] = (devices(_j) != null ? devices(_j).unpack() : null);} - _o.setDevices(_oDevices); - solarxr_protocol.data_feed.tracker.TrackerDataT[] _oSyntheticTrackers = new solarxr_protocol.data_feed.tracker.TrackerDataT[syntheticTrackersLength()]; - for (int _j = 0; _j < syntheticTrackersLength(); ++_j) {_oSyntheticTrackers[_j] = (syntheticTrackers(_j) != null ? syntheticTrackers(_j).unpack() : null);} - _o.setSyntheticTrackers(_oSyntheticTrackers); - solarxr_protocol.data_feed.BoneT[] _oBones = new solarxr_protocol.data_feed.BoneT[bonesLength()]; - for (int _j = 0; _j < bonesLength(); ++_j) {_oBones[_j] = (bones(_j) != null ? bones(_j).unpack() : null);} - _o.setBones(_oBones); - } - public static int pack(FlatBufferBuilder builder, DataFeedUpdateT _o) { - if (_o == null) return 0; - int _devices = 0; - if (_o.getDevices() != null) { - int[] __devices = new int[_o.getDevices().length]; - int _j = 0; - for (solarxr_protocol.data_feed.device_data.DeviceDataT _e : _o.getDevices()) { __devices[_j] = solarxr_protocol.data_feed.device_data.DeviceData.pack(builder, _e); _j++;} - _devices = createDevicesVector(builder, __devices); - } - int _syntheticTrackers = 0; - if (_o.getSyntheticTrackers() != null) { - int[] __syntheticTrackers = new int[_o.getSyntheticTrackers().length]; - int _j = 0; - for (solarxr_protocol.data_feed.tracker.TrackerDataT _e : _o.getSyntheticTrackers()) { __syntheticTrackers[_j] = solarxr_protocol.data_feed.tracker.TrackerData.pack(builder, _e); _j++;} - _syntheticTrackers = createSyntheticTrackersVector(builder, __syntheticTrackers); - } - int _bones = 0; - if (_o.getBones() != null) { - int[] __bones = new int[_o.getBones().length]; - int _j = 0; - for (solarxr_protocol.data_feed.BoneT _e : _o.getBones()) { __bones[_j] = solarxr_protocol.data_feed.Bone.pack(builder, _e); _j++;} - _bones = createBonesVector(builder, __bones); - } - return createDataFeedUpdate( - builder, - _devices, - _syntheticTrackers, - _bones); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * All of the data components related to a single data feed. A data feed is comprised + * of device data, and tracker data. + * + * A data feed might send data only when it changes/updates, and we should make no + * assumptions that the data is actually delivered. If you want to guarantee + * delivery and avoid dropped observations of data (such as a user-initiated + * button press), it is better to use the RPC system. + */ +@SuppressWarnings("unused") +public final class DataFeedUpdate extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static DataFeedUpdate getRootAsDataFeedUpdate(ByteBuffer _bb) { return getRootAsDataFeedUpdate(_bb, new DataFeedUpdate()); } + public static DataFeedUpdate getRootAsDataFeedUpdate(ByteBuffer _bb, DataFeedUpdate 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 DataFeedUpdate __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.data_feed.device_data.DeviceData devices(int j) { return devices(new solarxr_protocol.data_feed.device_data.DeviceData(), j); } + public solarxr_protocol.data_feed.device_data.DeviceData devices(solarxr_protocol.data_feed.device_data.DeviceData obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int devicesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.data_feed.device_data.DeviceData.Vector devicesVector() { return devicesVector(new solarxr_protocol.data_feed.device_data.DeviceData.Vector()); } + public solarxr_protocol.data_feed.device_data.DeviceData.Vector devicesVector(solarxr_protocol.data_feed.device_data.DeviceData.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public solarxr_protocol.data_feed.tracker.TrackerData syntheticTrackers(int j) { return syntheticTrackers(new solarxr_protocol.data_feed.tracker.TrackerData(), j); } + public solarxr_protocol.data_feed.tracker.TrackerData syntheticTrackers(solarxr_protocol.data_feed.tracker.TrackerData obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int syntheticTrackersLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.data_feed.tracker.TrackerData.Vector syntheticTrackersVector() { return syntheticTrackersVector(new solarxr_protocol.data_feed.tracker.TrackerData.Vector()); } + public solarxr_protocol.data_feed.tracker.TrackerData.Vector syntheticTrackersVector(solarxr_protocol.data_feed.tracker.TrackerData.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + /** + * This must represent a set, where there is no more than one bone for a `BodyPart`. + */ + public solarxr_protocol.data_feed.Bone bones(int j) { return bones(new solarxr_protocol.data_feed.Bone(), j); } + public solarxr_protocol.data_feed.Bone bones(solarxr_protocol.data_feed.Bone obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int bonesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.data_feed.Bone.Vector bonesVector() { return bonesVector(new solarxr_protocol.data_feed.Bone.Vector()); } + public solarxr_protocol.data_feed.Bone.Vector bonesVector(solarxr_protocol.data_feed.Bone.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createDataFeedUpdate(FlatBufferBuilder builder, + int devicesOffset, + int syntheticTrackersOffset, + int bonesOffset) { + builder.startTable(3); + DataFeedUpdate.addBones(builder, bonesOffset); + DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackersOffset); + DataFeedUpdate.addDevices(builder, devicesOffset); + return DataFeedUpdate.endDataFeedUpdate(builder); + } + + public static void startDataFeedUpdate(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addDevices(FlatBufferBuilder builder, int devicesOffset) { builder.addOffset(0, devicesOffset, 0); } + public static int createDevicesVector(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 startDevicesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addSyntheticTrackers(FlatBufferBuilder builder, int syntheticTrackersOffset) { builder.addOffset(1, syntheticTrackersOffset, 0); } + public static int createSyntheticTrackersVector(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 startSyntheticTrackersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addBones(FlatBufferBuilder builder, int bonesOffset) { builder.addOffset(2, bonesOffset, 0); } + public static int createBonesVector(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 startBonesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endDataFeedUpdate(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 DataFeedUpdate get(int j) { return get(new DataFeedUpdate(), j); } + public DataFeedUpdate get(DataFeedUpdate obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DataFeedUpdateT unpack() { + DataFeedUpdateT _o = new DataFeedUpdateT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DataFeedUpdateT _o) { + solarxr_protocol.data_feed.device_data.DeviceDataT[] _oDevices = new solarxr_protocol.data_feed.device_data.DeviceDataT[devicesLength()]; + for (int _j = 0; _j < devicesLength(); ++_j) {_oDevices[_j] = (devices(_j) != null ? devices(_j).unpack() : null);} + _o.setDevices(_oDevices); + solarxr_protocol.data_feed.tracker.TrackerDataT[] _oSyntheticTrackers = new solarxr_protocol.data_feed.tracker.TrackerDataT[syntheticTrackersLength()]; + for (int _j = 0; _j < syntheticTrackersLength(); ++_j) {_oSyntheticTrackers[_j] = (syntheticTrackers(_j) != null ? syntheticTrackers(_j).unpack() : null);} + _o.setSyntheticTrackers(_oSyntheticTrackers); + solarxr_protocol.data_feed.BoneT[] _oBones = new solarxr_protocol.data_feed.BoneT[bonesLength()]; + for (int _j = 0; _j < bonesLength(); ++_j) {_oBones[_j] = (bones(_j) != null ? bones(_j).unpack() : null);} + _o.setBones(_oBones); + } + public static int pack(FlatBufferBuilder builder, DataFeedUpdateT _o) { + if (_o == null) return 0; + int _devices = 0; + if (_o.getDevices() != null) { + int[] __devices = new int[_o.getDevices().length]; + int _j = 0; + for (solarxr_protocol.data_feed.device_data.DeviceDataT _e : _o.getDevices()) { __devices[_j] = solarxr_protocol.data_feed.device_data.DeviceData.pack(builder, _e); _j++;} + _devices = createDevicesVector(builder, __devices); + } + int _syntheticTrackers = 0; + if (_o.getSyntheticTrackers() != null) { + int[] __syntheticTrackers = new int[_o.getSyntheticTrackers().length]; + int _j = 0; + for (solarxr_protocol.data_feed.tracker.TrackerDataT _e : _o.getSyntheticTrackers()) { __syntheticTrackers[_j] = solarxr_protocol.data_feed.tracker.TrackerData.pack(builder, _e); _j++;} + _syntheticTrackers = createSyntheticTrackersVector(builder, __syntheticTrackers); + } + int _bones = 0; + if (_o.getBones() != null) { + int[] __bones = new int[_o.getBones().length]; + int _j = 0; + for (solarxr_protocol.data_feed.BoneT _e : _o.getBones()) { __bones[_j] = solarxr_protocol.data_feed.Bone.pack(builder, _e); _j++;} + _bones = createBonesVector(builder, __bones); + } + return createDataFeedUpdate( + builder, + _devices, + _syntheticTrackers, + _bones); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java index e52c7b1c..0f1eca25 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedUpdateT.java @@ -1,34 +1,34 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class DataFeedUpdateT { - private solarxr_protocol.data_feed.device_data.DeviceDataT[] devices; - private solarxr_protocol.data_feed.tracker.TrackerDataT[] syntheticTrackers; - private solarxr_protocol.data_feed.BoneT[] bones; - - public solarxr_protocol.data_feed.device_data.DeviceDataT[] getDevices() { return devices; } - - public void setDevices(solarxr_protocol.data_feed.device_data.DeviceDataT[] devices) { this.devices = devices; } - - public solarxr_protocol.data_feed.tracker.TrackerDataT[] getSyntheticTrackers() { return syntheticTrackers; } - - public void setSyntheticTrackers(solarxr_protocol.data_feed.tracker.TrackerDataT[] syntheticTrackers) { this.syntheticTrackers = syntheticTrackers; } - - public solarxr_protocol.data_feed.BoneT[] getBones() { return bones; } - - public void setBones(solarxr_protocol.data_feed.BoneT[] bones) { this.bones = bones; } - - - public DataFeedUpdateT() { - this.devices = null; - this.syntheticTrackers = null; - this.bones = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DataFeedUpdateT { + private solarxr_protocol.data_feed.device_data.DeviceDataT[] devices; + private solarxr_protocol.data_feed.tracker.TrackerDataT[] syntheticTrackers; + private solarxr_protocol.data_feed.BoneT[] bones; + + public solarxr_protocol.data_feed.device_data.DeviceDataT[] getDevices() { return devices; } + + public void setDevices(solarxr_protocol.data_feed.device_data.DeviceDataT[] devices) { this.devices = devices; } + + public solarxr_protocol.data_feed.tracker.TrackerDataT[] getSyntheticTrackers() { return syntheticTrackers; } + + public void setSyntheticTrackers(solarxr_protocol.data_feed.tracker.TrackerDataT[] syntheticTrackers) { this.syntheticTrackers = syntheticTrackers; } + + public solarxr_protocol.data_feed.BoneT[] getBones() { return bones; } + + public void setBones(solarxr_protocol.data_feed.BoneT[] bones) { this.bones = bones; } + + + public DataFeedUpdateT() { + this.devices = null; + this.syntheticTrackers = null; + this.bones = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/PollDataFeed.java b/protocol/java/src/solarxr_protocol/data_feed/PollDataFeed.java index 1634bd80..0c407d7d 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/PollDataFeed.java +++ b/protocol/java/src/solarxr_protocol/data_feed/PollDataFeed.java @@ -1,62 +1,62 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Requests for a single `Update` to be sent. This is helpful when getting - * initial info about the device. - */ -@SuppressWarnings("unused") -public final class PollDataFeed extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static PollDataFeed getRootAsPollDataFeed(ByteBuffer _bb) { return getRootAsPollDataFeed(_bb, new PollDataFeed()); } - public static PollDataFeed getRootAsPollDataFeed(ByteBuffer _bb, PollDataFeed 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 PollDataFeed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.data_feed.DataFeedConfig config() { return config(new solarxr_protocol.data_feed.DataFeedConfig()); } - public solarxr_protocol.data_feed.DataFeedConfig config(solarxr_protocol.data_feed.DataFeedConfig obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createPollDataFeed(FlatBufferBuilder builder, - int configOffset) { - builder.startTable(1); - PollDataFeed.addConfig(builder, configOffset); - return PollDataFeed.endPollDataFeed(builder); - } - - public static void startPollDataFeed(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addConfig(FlatBufferBuilder builder, int configOffset) { builder.addOffset(0, configOffset, 0); } - public static int endPollDataFeed(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 PollDataFeed get(int j) { return get(new PollDataFeed(), j); } - public PollDataFeed get(PollDataFeed obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public PollDataFeedT unpack() { - PollDataFeedT _o = new PollDataFeedT(); - unpackTo(_o); - return _o; - } - public void unpackTo(PollDataFeedT _o) { - if (config() != null) _o.setConfig(config().unpack()); - else _o.setConfig(null); - } - public static int pack(FlatBufferBuilder builder, PollDataFeedT _o) { - if (_o == null) return 0; - int _config = _o.getConfig() == null ? 0 : solarxr_protocol.data_feed.DataFeedConfig.pack(builder, _o.getConfig()); - return createPollDataFeed( - builder, - _config); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Requests for a single `Update` to be sent. This is helpful when getting + * initial info about the device. + */ +@SuppressWarnings("unused") +public final class PollDataFeed extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static PollDataFeed getRootAsPollDataFeed(ByteBuffer _bb) { return getRootAsPollDataFeed(_bb, new PollDataFeed()); } + public static PollDataFeed getRootAsPollDataFeed(ByteBuffer _bb, PollDataFeed 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 PollDataFeed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.data_feed.DataFeedConfig config() { return config(new solarxr_protocol.data_feed.DataFeedConfig()); } + public solarxr_protocol.data_feed.DataFeedConfig config(solarxr_protocol.data_feed.DataFeedConfig obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createPollDataFeed(FlatBufferBuilder builder, + int configOffset) { + builder.startTable(1); + PollDataFeed.addConfig(builder, configOffset); + return PollDataFeed.endPollDataFeed(builder); + } + + public static void startPollDataFeed(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addConfig(FlatBufferBuilder builder, int configOffset) { builder.addOffset(0, configOffset, 0); } + public static int endPollDataFeed(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 PollDataFeed get(int j) { return get(new PollDataFeed(), j); } + public PollDataFeed get(PollDataFeed obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public PollDataFeedT unpack() { + PollDataFeedT _o = new PollDataFeedT(); + unpackTo(_o); + return _o; + } + public void unpackTo(PollDataFeedT _o) { + if (config() != null) _o.setConfig(config().unpack()); + else _o.setConfig(null); + } + public static int pack(FlatBufferBuilder builder, PollDataFeedT _o) { + if (_o == null) return 0; + int _config = _o.getConfig() == null ? 0 : solarxr_protocol.data_feed.DataFeedConfig.pack(builder, _o.getConfig()); + return createPollDataFeed( + builder, + _config); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/PollDataFeedT.java b/protocol/java/src/solarxr_protocol/data_feed/PollDataFeedT.java index bfb21c9f..607aefe2 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/PollDataFeedT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/PollDataFeedT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class PollDataFeedT { - private solarxr_protocol.data_feed.DataFeedConfigT config; - - public solarxr_protocol.data_feed.DataFeedConfigT getConfig() { return config; } - - public void setConfig(solarxr_protocol.data_feed.DataFeedConfigT config) { this.config = config; } - - - public PollDataFeedT() { - this.config = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class PollDataFeedT { + private solarxr_protocol.data_feed.DataFeedConfigT config; + + public solarxr_protocol.data_feed.DataFeedConfigT getConfig() { return config; } + + public void setConfig(solarxr_protocol.data_feed.DataFeedConfigT config) { this.config = config; } + + + public PollDataFeedT() { + this.config = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/StartDataFeed.java b/protocol/java/src/solarxr_protocol/data_feed/StartDataFeed.java index 913b6a5e..f720d16c 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/StartDataFeed.java +++ b/protocol/java/src/solarxr_protocol/data_feed/StartDataFeed.java @@ -1,80 +1,80 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Requests for the other party to send `data_feeds`. - * For example, GUI requests for position data to be sent from server. - * - * When sending a new `StartFeed`, the old data feeds should stop being sent. - * We still support multiple data feeds at the same time, because `data_feeds` - * is a list. - * - * Multiple data feeds are useful to get data at different frequencies. - */ -@SuppressWarnings("unused") -public final class StartDataFeed extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static StartDataFeed getRootAsStartDataFeed(ByteBuffer _bb) { return getRootAsStartDataFeed(_bb, new StartDataFeed()); } - public static StartDataFeed getRootAsStartDataFeed(ByteBuffer _bb, StartDataFeed 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 StartDataFeed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.data_feed.DataFeedConfig dataFeeds(int j) { return dataFeeds(new solarxr_protocol.data_feed.DataFeedConfig(), j); } - public solarxr_protocol.data_feed.DataFeedConfig dataFeeds(solarxr_protocol.data_feed.DataFeedConfig obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int dataFeedsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.data_feed.DataFeedConfig.Vector dataFeedsVector() { return dataFeedsVector(new solarxr_protocol.data_feed.DataFeedConfig.Vector()); } - public solarxr_protocol.data_feed.DataFeedConfig.Vector dataFeedsVector(solarxr_protocol.data_feed.DataFeedConfig.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createStartDataFeed(FlatBufferBuilder builder, - int dataFeedsOffset) { - builder.startTable(1); - StartDataFeed.addDataFeeds(builder, dataFeedsOffset); - return StartDataFeed.endStartDataFeed(builder); - } - - public static void startStartDataFeed(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addDataFeeds(FlatBufferBuilder builder, int dataFeedsOffset) { builder.addOffset(0, dataFeedsOffset, 0); } - public static int createDataFeedsVector(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 startDataFeedsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endStartDataFeed(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 StartDataFeed get(int j) { return get(new StartDataFeed(), j); } - public StartDataFeed get(StartDataFeed obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public StartDataFeedT unpack() { - StartDataFeedT _o = new StartDataFeedT(); - unpackTo(_o); - return _o; - } - public void unpackTo(StartDataFeedT _o) { - solarxr_protocol.data_feed.DataFeedConfigT[] _oDataFeeds = new solarxr_protocol.data_feed.DataFeedConfigT[dataFeedsLength()]; - for (int _j = 0; _j < dataFeedsLength(); ++_j) {_oDataFeeds[_j] = (dataFeeds(_j) != null ? dataFeeds(_j).unpack() : null);} - _o.setDataFeeds(_oDataFeeds); - } - public static int pack(FlatBufferBuilder builder, StartDataFeedT _o) { - if (_o == null) return 0; - int _dataFeeds = 0; - if (_o.getDataFeeds() != null) { - int[] __dataFeeds = new int[_o.getDataFeeds().length]; - int _j = 0; - for (solarxr_protocol.data_feed.DataFeedConfigT _e : _o.getDataFeeds()) { __dataFeeds[_j] = solarxr_protocol.data_feed.DataFeedConfig.pack(builder, _e); _j++;} - _dataFeeds = createDataFeedsVector(builder, __dataFeeds); - } - return createStartDataFeed( - builder, - _dataFeeds); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Requests for the other party to send `data_feeds`. + * For example, GUI requests for position data to be sent from server. + * + * When sending a new `StartFeed`, the old data feeds should stop being sent. + * We still support multiple data feeds at the same time, because `data_feeds` + * is a list. + * + * Multiple data feeds are useful to get data at different frequencies. + */ +@SuppressWarnings("unused") +public final class StartDataFeed extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static StartDataFeed getRootAsStartDataFeed(ByteBuffer _bb) { return getRootAsStartDataFeed(_bb, new StartDataFeed()); } + public static StartDataFeed getRootAsStartDataFeed(ByteBuffer _bb, StartDataFeed 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 StartDataFeed __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.data_feed.DataFeedConfig dataFeeds(int j) { return dataFeeds(new solarxr_protocol.data_feed.DataFeedConfig(), j); } + public solarxr_protocol.data_feed.DataFeedConfig dataFeeds(solarxr_protocol.data_feed.DataFeedConfig obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int dataFeedsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.data_feed.DataFeedConfig.Vector dataFeedsVector() { return dataFeedsVector(new solarxr_protocol.data_feed.DataFeedConfig.Vector()); } + public solarxr_protocol.data_feed.DataFeedConfig.Vector dataFeedsVector(solarxr_protocol.data_feed.DataFeedConfig.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createStartDataFeed(FlatBufferBuilder builder, + int dataFeedsOffset) { + builder.startTable(1); + StartDataFeed.addDataFeeds(builder, dataFeedsOffset); + return StartDataFeed.endStartDataFeed(builder); + } + + public static void startStartDataFeed(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addDataFeeds(FlatBufferBuilder builder, int dataFeedsOffset) { builder.addOffset(0, dataFeedsOffset, 0); } + public static int createDataFeedsVector(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 startDataFeedsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endStartDataFeed(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 StartDataFeed get(int j) { return get(new StartDataFeed(), j); } + public StartDataFeed get(StartDataFeed obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StartDataFeedT unpack() { + StartDataFeedT _o = new StartDataFeedT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StartDataFeedT _o) { + solarxr_protocol.data_feed.DataFeedConfigT[] _oDataFeeds = new solarxr_protocol.data_feed.DataFeedConfigT[dataFeedsLength()]; + for (int _j = 0; _j < dataFeedsLength(); ++_j) {_oDataFeeds[_j] = (dataFeeds(_j) != null ? dataFeeds(_j).unpack() : null);} + _o.setDataFeeds(_oDataFeeds); + } + public static int pack(FlatBufferBuilder builder, StartDataFeedT _o) { + if (_o == null) return 0; + int _dataFeeds = 0; + if (_o.getDataFeeds() != null) { + int[] __dataFeeds = new int[_o.getDataFeeds().length]; + int _j = 0; + for (solarxr_protocol.data_feed.DataFeedConfigT _e : _o.getDataFeeds()) { __dataFeeds[_j] = solarxr_protocol.data_feed.DataFeedConfig.pack(builder, _e); _j++;} + _dataFeeds = createDataFeedsVector(builder, __dataFeeds); + } + return createStartDataFeed( + builder, + _dataFeeds); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/StartDataFeedT.java b/protocol/java/src/solarxr_protocol/data_feed/StartDataFeedT.java index c3cfa585..0e169ac7 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/StartDataFeedT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/StartDataFeedT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class StartDataFeedT { - private solarxr_protocol.data_feed.DataFeedConfigT[] dataFeeds; - - public solarxr_protocol.data_feed.DataFeedConfigT[] getDataFeeds() { return dataFeeds; } - - public void setDataFeeds(solarxr_protocol.data_feed.DataFeedConfigT[] dataFeeds) { this.dataFeeds = dataFeeds; } - - - public StartDataFeedT() { - this.dataFeeds = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class StartDataFeedT { + private solarxr_protocol.data_feed.DataFeedConfigT[] dataFeeds; + + public solarxr_protocol.data_feed.DataFeedConfigT[] getDataFeeds() { return dataFeeds; } + + public void setDataFeeds(solarxr_protocol.data_feed.DataFeedConfigT[] dataFeeds) { this.dataFeeds = dataFeeds; } + + + public StartDataFeedT() { + this.dataFeeds = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java index 9104d864..efaf97e0 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java +++ b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java @@ -1,109 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.device_data; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Describes all possible information about a hardware device. For example, a - * vive tracker is a single hardware device, and a slime tracker with two - * extensions is a single hardware device but two trackers. - */ -@SuppressWarnings("unused") -public final class DeviceData extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static DeviceData getRootAsDeviceData(ByteBuffer _bb) { return getRootAsDeviceData(_bb, new DeviceData()); } - public static DeviceData getRootAsDeviceData(ByteBuffer _bb, DeviceData 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 DeviceData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.datatypes.DeviceId id() { return id(new solarxr_protocol.datatypes.DeviceId()); } - public solarxr_protocol.datatypes.DeviceId id(solarxr_protocol.datatypes.DeviceId obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * The dynamically changeable name of the device. This might be set by the - * user to help them remember which tracker is which. - */ - public String customName() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer customNameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer customNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - /** - * Mostly-static info about the device hardware - */ - public solarxr_protocol.datatypes.hardware_info.HardwareInfo hardwareInfo() { return hardwareInfo(new solarxr_protocol.datatypes.hardware_info.HardwareInfo()); } - public solarxr_protocol.datatypes.hardware_info.HardwareInfo hardwareInfo(solarxr_protocol.datatypes.hardware_info.HardwareInfo obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - /** - * General info about the status of the device - */ - public solarxr_protocol.datatypes.hardware_info.HardwareStatus hardwareStatus() { return hardwareStatus(new solarxr_protocol.datatypes.hardware_info.HardwareStatus()); } - public solarxr_protocol.datatypes.hardware_info.HardwareStatus hardwareStatus(solarxr_protocol.datatypes.hardware_info.HardwareStatus obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - /** - * Info about all trackers attached to this device - */ - public solarxr_protocol.data_feed.tracker.TrackerData trackers(int j) { return trackers(new solarxr_protocol.data_feed.tracker.TrackerData(), j); } - public solarxr_protocol.data_feed.tracker.TrackerData trackers(solarxr_protocol.data_feed.tracker.TrackerData obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int trackersLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.data_feed.tracker.TrackerData.Vector trackersVector() { return trackersVector(new solarxr_protocol.data_feed.tracker.TrackerData.Vector()); } - public solarxr_protocol.data_feed.tracker.TrackerData.Vector trackersVector(solarxr_protocol.data_feed.tracker.TrackerData.Vector obj) { int o = __offset(12); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static void startDeviceData(FlatBufferBuilder builder) { builder.startTable(5); } - public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addStruct(0, idOffset, 0); } - public static void addCustomName(FlatBufferBuilder builder, int customNameOffset) { builder.addOffset(1, customNameOffset, 0); } - public static void addHardwareInfo(FlatBufferBuilder builder, int hardwareInfoOffset) { builder.addOffset(2, hardwareInfoOffset, 0); } - public static void addHardwareStatus(FlatBufferBuilder builder, int hardwareStatusOffset) { builder.addOffset(3, hardwareStatusOffset, 0); } - public static void addTrackers(FlatBufferBuilder builder, int trackersOffset) { builder.addOffset(4, trackersOffset, 0); } - public static int createTrackersVector(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 startTrackersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endDeviceData(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 DeviceData get(int j) { return get(new DeviceData(), j); } - public DeviceData get(DeviceData obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public DeviceDataT unpack() { - DeviceDataT _o = new DeviceDataT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DeviceDataT _o) { - if (id() != null) id().unpackTo(_o.getId()); - else _o.setId(null); - String _oCustomName = customName(); - _o.setCustomName(_oCustomName); - if (hardwareInfo() != null) _o.setHardwareInfo(hardwareInfo().unpack()); - else _o.setHardwareInfo(null); - if (hardwareStatus() != null) _o.setHardwareStatus(hardwareStatus().unpack()); - else _o.setHardwareStatus(null); - solarxr_protocol.data_feed.tracker.TrackerDataT[] _oTrackers = new solarxr_protocol.data_feed.tracker.TrackerDataT[trackersLength()]; - for (int _j = 0; _j < trackersLength(); ++_j) {_oTrackers[_j] = (trackers(_j) != null ? trackers(_j).unpack() : null);} - _o.setTrackers(_oTrackers); - } - public static int pack(FlatBufferBuilder builder, DeviceDataT _o) { - if (_o == null) return 0; - int _customName = _o.getCustomName() == null ? 0 : builder.createString(_o.getCustomName()); - int _hardwareInfo = _o.getHardwareInfo() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareInfo.pack(builder, _o.getHardwareInfo()); - int _hardwareStatus = _o.getHardwareStatus() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareStatus.pack(builder, _o.getHardwareStatus()); - int _trackers = 0; - if (_o.getTrackers() != null) { - int[] __trackers = new int[_o.getTrackers().length]; - int _j = 0; - for (solarxr_protocol.data_feed.tracker.TrackerDataT _e : _o.getTrackers()) { __trackers[_j] = solarxr_protocol.data_feed.tracker.TrackerData.pack(builder, _e); _j++;} - _trackers = createTrackersVector(builder, __trackers); - } - startDeviceData(builder); - addId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getId())); - addCustomName(builder, _customName); - addHardwareInfo(builder, _hardwareInfo); - addHardwareStatus(builder, _hardwareStatus); - addTrackers(builder, _trackers); - return endDeviceData(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.device_data; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Describes all possible information about a hardware device. For example, a + * vive tracker is a single hardware device, and a slime tracker with two + * extensions is a single hardware device but two trackers. + */ +@SuppressWarnings("unused") +public final class DeviceData extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static DeviceData getRootAsDeviceData(ByteBuffer _bb) { return getRootAsDeviceData(_bb, new DeviceData()); } + public static DeviceData getRootAsDeviceData(ByteBuffer _bb, DeviceData 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 DeviceData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.datatypes.DeviceId id() { return id(new solarxr_protocol.datatypes.DeviceId()); } + public solarxr_protocol.datatypes.DeviceId id(solarxr_protocol.datatypes.DeviceId obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * The dynamically changeable name of the device. This might be set by the + * user to help them remember which tracker is which. + */ + public String customName() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer customNameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer customNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + /** + * Mostly-static info about the device hardware + */ + public solarxr_protocol.datatypes.hardware_info.HardwareInfo hardwareInfo() { return hardwareInfo(new solarxr_protocol.datatypes.hardware_info.HardwareInfo()); } + public solarxr_protocol.datatypes.hardware_info.HardwareInfo hardwareInfo(solarxr_protocol.datatypes.hardware_info.HardwareInfo obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + /** + * General info about the status of the device + */ + public solarxr_protocol.datatypes.hardware_info.HardwareStatus hardwareStatus() { return hardwareStatus(new solarxr_protocol.datatypes.hardware_info.HardwareStatus()); } + public solarxr_protocol.datatypes.hardware_info.HardwareStatus hardwareStatus(solarxr_protocol.datatypes.hardware_info.HardwareStatus obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + /** + * Info about all trackers attached to this device + */ + public solarxr_protocol.data_feed.tracker.TrackerData trackers(int j) { return trackers(new solarxr_protocol.data_feed.tracker.TrackerData(), j); } + public solarxr_protocol.data_feed.tracker.TrackerData trackers(solarxr_protocol.data_feed.tracker.TrackerData obj, int j) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int trackersLength() { int o = __offset(12); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.data_feed.tracker.TrackerData.Vector trackersVector() { return trackersVector(new solarxr_protocol.data_feed.tracker.TrackerData.Vector()); } + public solarxr_protocol.data_feed.tracker.TrackerData.Vector trackersVector(solarxr_protocol.data_feed.tracker.TrackerData.Vector obj) { int o = __offset(12); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static void startDeviceData(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addStruct(0, idOffset, 0); } + public static void addCustomName(FlatBufferBuilder builder, int customNameOffset) { builder.addOffset(1, customNameOffset, 0); } + public static void addHardwareInfo(FlatBufferBuilder builder, int hardwareInfoOffset) { builder.addOffset(2, hardwareInfoOffset, 0); } + public static void addHardwareStatus(FlatBufferBuilder builder, int hardwareStatusOffset) { builder.addOffset(3, hardwareStatusOffset, 0); } + public static void addTrackers(FlatBufferBuilder builder, int trackersOffset) { builder.addOffset(4, trackersOffset, 0); } + public static int createTrackersVector(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 startTrackersVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endDeviceData(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 DeviceData get(int j) { return get(new DeviceData(), j); } + public DeviceData get(DeviceData obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DeviceDataT unpack() { + DeviceDataT _o = new DeviceDataT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DeviceDataT _o) { + if (id() != null) id().unpackTo(_o.getId()); + else _o.setId(null); + String _oCustomName = customName(); + _o.setCustomName(_oCustomName); + if (hardwareInfo() != null) _o.setHardwareInfo(hardwareInfo().unpack()); + else _o.setHardwareInfo(null); + if (hardwareStatus() != null) _o.setHardwareStatus(hardwareStatus().unpack()); + else _o.setHardwareStatus(null); + solarxr_protocol.data_feed.tracker.TrackerDataT[] _oTrackers = new solarxr_protocol.data_feed.tracker.TrackerDataT[trackersLength()]; + for (int _j = 0; _j < trackersLength(); ++_j) {_oTrackers[_j] = (trackers(_j) != null ? trackers(_j).unpack() : null);} + _o.setTrackers(_oTrackers); + } + public static int pack(FlatBufferBuilder builder, DeviceDataT _o) { + if (_o == null) return 0; + int _customName = _o.getCustomName() == null ? 0 : builder.createString(_o.getCustomName()); + int _hardware_info = _o.getHardwareInfo() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareInfo.pack(builder, _o.getHardwareInfo()); + int _hardware_status = _o.getHardwareStatus() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareStatus.pack(builder, _o.getHardwareStatus()); + int _trackers = 0; + if (_o.getTrackers() != null) { + int[] __trackers = new int[_o.getTrackers().length]; + int _j = 0; + for (solarxr_protocol.data_feed.tracker.TrackerDataT _e : _o.getTrackers()) { __trackers[_j] = solarxr_protocol.data_feed.tracker.TrackerData.pack(builder, _e); _j++;} + _trackers = createTrackersVector(builder, __trackers); + } + startDeviceData(builder); + addId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getId())); + addCustomName(builder, _customName); + addHardwareInfo(builder, _hardware_info); + addHardwareStatus(builder, _hardware_status); + addTrackers(builder, _trackers); + return endDeviceData(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java index eb6b657b..c727f337 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java +++ b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java @@ -1,79 +1,79 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.device_data; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * A mask of values to be reported in subsequent DeviceStatus. Values set to `false` - * or `null` will not reported. By default, all fields are false/null. - * - * If you set a value to `true`, it is not guaranteed that the sender actually has - * such a value to send. In this case, they will probably send `null`, and the receiver - * has the choice to disconnect due to missing data. - */ -@SuppressWarnings("unused") -public final class DeviceDataMask extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static DeviceDataMask getRootAsDeviceDataMask(ByteBuffer _bb) { return getRootAsDeviceDataMask(_bb, new DeviceDataMask()); } - public static DeviceDataMask getRootAsDeviceDataMask(ByteBuffer _bb, DeviceDataMask 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 DeviceDataMask __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * Which tracker data should be sent in this data feed - */ - public solarxr_protocol.data_feed.tracker.TrackerDataMask trackerData() { return trackerData(new solarxr_protocol.data_feed.tracker.TrackerDataMask()); } - public solarxr_protocol.data_feed.tracker.TrackerDataMask trackerData(solarxr_protocol.data_feed.tracker.TrackerDataMask obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - /** - * true if device data should be sent in this data feed - */ - public boolean deviceData() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createDeviceDataMask(FlatBufferBuilder builder, - int trackerDataOffset, - boolean deviceData) { - builder.startTable(2); - DeviceDataMask.addTrackerData(builder, trackerDataOffset); - DeviceDataMask.addDeviceData(builder, deviceData); - return DeviceDataMask.endDeviceDataMask(builder); - } - - public static void startDeviceDataMask(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addTrackerData(FlatBufferBuilder builder, int trackerDataOffset) { builder.addOffset(0, trackerDataOffset, 0); } - public static void addDeviceData(FlatBufferBuilder builder, boolean deviceData) { builder.addBoolean(1, deviceData, false); } - public static int endDeviceDataMask(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 DeviceDataMask get(int j) { return get(new DeviceDataMask(), j); } - public DeviceDataMask get(DeviceDataMask obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public DeviceDataMaskT unpack() { - DeviceDataMaskT _o = new DeviceDataMaskT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DeviceDataMaskT _o) { - if (trackerData() != null) _o.setTrackerData(trackerData().unpack()); - else _o.setTrackerData(null); - boolean _oDeviceData = deviceData(); - _o.setDeviceData(_oDeviceData); - } - public static int pack(FlatBufferBuilder builder, DeviceDataMaskT _o) { - if (_o == null) return 0; - int _trackerData = _o.getTrackerData() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getTrackerData()); - return createDeviceDataMask( - builder, - _trackerData, - _o.getDeviceData()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.device_data; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A mask of values to be reported in subsequent DeviceStatus. Values set to `false` + * or `null` will not reported. By default, all fields are false/null. + * + * If you set a value to `true`, it is not guaranteed that the sender actually has + * such a value to send. In this case, they will probably send `null`, and the receiver + * has the choice to disconnect due to missing data. + */ +@SuppressWarnings("unused") +public final class DeviceDataMask extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static DeviceDataMask getRootAsDeviceDataMask(ByteBuffer _bb) { return getRootAsDeviceDataMask(_bb, new DeviceDataMask()); } + public static DeviceDataMask getRootAsDeviceDataMask(ByteBuffer _bb, DeviceDataMask 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 DeviceDataMask __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * Which tracker data should be sent in this data feed + */ + public solarxr_protocol.data_feed.tracker.TrackerDataMask trackerData() { return trackerData(new solarxr_protocol.data_feed.tracker.TrackerDataMask()); } + public solarxr_protocol.data_feed.tracker.TrackerDataMask trackerData(solarxr_protocol.data_feed.tracker.TrackerDataMask obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + /** + * true if device data should be sent in this data feed + */ + public boolean deviceData() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createDeviceDataMask(FlatBufferBuilder builder, + int trackerDataOffset, + boolean deviceData) { + builder.startTable(2); + DeviceDataMask.addTrackerData(builder, trackerDataOffset); + DeviceDataMask.addDeviceData(builder, deviceData); + return DeviceDataMask.endDeviceDataMask(builder); + } + + public static void startDeviceDataMask(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addTrackerData(FlatBufferBuilder builder, int trackerDataOffset) { builder.addOffset(0, trackerDataOffset, 0); } + public static void addDeviceData(FlatBufferBuilder builder, boolean deviceData) { builder.addBoolean(1, deviceData, false); } + public static int endDeviceDataMask(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 DeviceDataMask get(int j) { return get(new DeviceDataMask(), j); } + public DeviceDataMask get(DeviceDataMask obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DeviceDataMaskT unpack() { + DeviceDataMaskT _o = new DeviceDataMaskT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DeviceDataMaskT _o) { + if (trackerData() != null) _o.setTrackerData(trackerData().unpack()); + else _o.setTrackerData(null); + boolean _oDeviceData = deviceData(); + _o.setDeviceData(_oDeviceData); + } + public static int pack(FlatBufferBuilder builder, DeviceDataMaskT _o) { + if (_o == null) return 0; + int _tracker_data = _o.getTrackerData() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getTrackerData()); + return createDeviceDataMask( + builder, + _tracker_data, + _o.getDeviceData()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMaskT.java b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMaskT.java index 94bfac28..3e8f8e68 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMaskT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMaskT.java @@ -1,28 +1,28 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.device_data; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class DeviceDataMaskT { - private solarxr_protocol.data_feed.tracker.TrackerDataMaskT trackerData; - private boolean deviceData; - - public solarxr_protocol.data_feed.tracker.TrackerDataMaskT getTrackerData() { return trackerData; } - - public void setTrackerData(solarxr_protocol.data_feed.tracker.TrackerDataMaskT trackerData) { this.trackerData = trackerData; } - - public boolean getDeviceData() { return deviceData; } - - public void setDeviceData(boolean deviceData) { this.deviceData = deviceData; } - - - public DeviceDataMaskT() { - this.trackerData = null; - this.deviceData = false; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.device_data; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DeviceDataMaskT { + private solarxr_protocol.data_feed.tracker.TrackerDataMaskT trackerData; + private boolean deviceData; + + public solarxr_protocol.data_feed.tracker.TrackerDataMaskT getTrackerData() { return trackerData; } + + public void setTrackerData(solarxr_protocol.data_feed.tracker.TrackerDataMaskT trackerData) { this.trackerData = trackerData; } + + public boolean getDeviceData() { return deviceData; } + + public void setDeviceData(boolean deviceData) { this.deviceData = deviceData; } + + + public DeviceDataMaskT() { + this.trackerData = null; + this.deviceData = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataT.java b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataT.java index 20c1c573..071bc66a 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataT.java @@ -1,46 +1,46 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.device_data; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class DeviceDataT { - private solarxr_protocol.datatypes.DeviceIdT id; - private String customName; - private solarxr_protocol.datatypes.hardware_info.HardwareInfoT hardwareInfo; - private solarxr_protocol.datatypes.hardware_info.HardwareStatusT hardwareStatus; - private solarxr_protocol.data_feed.tracker.TrackerDataT[] trackers; - - public solarxr_protocol.datatypes.DeviceIdT getId() { return id; } - - public void setId(solarxr_protocol.datatypes.DeviceIdT id) { this.id = id; } - - public String getCustomName() { return customName; } - - public void setCustomName(String customName) { this.customName = customName; } - - public solarxr_protocol.datatypes.hardware_info.HardwareInfoT getHardwareInfo() { return hardwareInfo; } - - public void setHardwareInfo(solarxr_protocol.datatypes.hardware_info.HardwareInfoT hardwareInfo) { this.hardwareInfo = hardwareInfo; } - - public solarxr_protocol.datatypes.hardware_info.HardwareStatusT getHardwareStatus() { return hardwareStatus; } - - public void setHardwareStatus(solarxr_protocol.datatypes.hardware_info.HardwareStatusT hardwareStatus) { this.hardwareStatus = hardwareStatus; } - - public solarxr_protocol.data_feed.tracker.TrackerDataT[] getTrackers() { return trackers; } - - public void setTrackers(solarxr_protocol.data_feed.tracker.TrackerDataT[] trackers) { this.trackers = trackers; } - - - public DeviceDataT() { - this.id = new solarxr_protocol.datatypes.DeviceIdT(); - this.customName = null; - this.hardwareInfo = null; - this.hardwareStatus = null; - this.trackers = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.device_data; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DeviceDataT { + private solarxr_protocol.datatypes.DeviceIdT id; + private String customName; + private solarxr_protocol.datatypes.hardware_info.HardwareInfoT hardwareInfo; + private solarxr_protocol.datatypes.hardware_info.HardwareStatusT hardwareStatus; + private solarxr_protocol.data_feed.tracker.TrackerDataT[] trackers; + + public solarxr_protocol.datatypes.DeviceIdT getId() { return id; } + + public void setId(solarxr_protocol.datatypes.DeviceIdT id) { this.id = id; } + + public String getCustomName() { return customName; } + + public void setCustomName(String customName) { this.customName = customName; } + + public solarxr_protocol.datatypes.hardware_info.HardwareInfoT getHardwareInfo() { return hardwareInfo; } + + public void setHardwareInfo(solarxr_protocol.datatypes.hardware_info.HardwareInfoT hardwareInfo) { this.hardwareInfo = hardwareInfo; } + + public solarxr_protocol.datatypes.hardware_info.HardwareStatusT getHardwareStatus() { return hardwareStatus; } + + public void setHardwareStatus(solarxr_protocol.datatypes.hardware_info.HardwareStatusT hardwareStatus) { this.hardwareStatus = hardwareStatus; } + + public solarxr_protocol.data_feed.tracker.TrackerDataT[] getTrackers() { return trackers; } + + public void setTrackers(solarxr_protocol.data_feed.tracker.TrackerDataT[] trackers) { this.trackers = trackers; } + + + public DeviceDataT() { + this.id = new solarxr_protocol.datatypes.DeviceIdT(); + this.customName = null; + this.hardwareInfo = null; + this.hardwareStatus = null; + this.trackers = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java index 77b6fa6d..aa6c5727 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java @@ -1,112 +1,112 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Describes all possible information about a tracker. A tracker is anything that - * provides kinematic data about a particular body part. - * - * Trackers may be synthetic/computed or instead part of an actual hardware device. - * There can be multiple trackers per hardware device. - */ -@SuppressWarnings("unused") -public final class TrackerData extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static TrackerData getRootAsTrackerData(ByteBuffer _bb) { return getRootAsTrackerData(_bb, new TrackerData()); } - public static TrackerData getRootAsTrackerData(ByteBuffer _bb, TrackerData 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 TrackerData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.datatypes.TrackerId trackerId() { return trackerId(new solarxr_protocol.datatypes.TrackerId()); } - public solarxr_protocol.datatypes.TrackerId trackerId(solarxr_protocol.datatypes.TrackerId obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.data_feed.tracker.TrackerInfo info() { return info(new solarxr_protocol.data_feed.tracker.TrackerInfo()); } - public solarxr_protocol.data_feed.tracker.TrackerInfo info(solarxr_protocol.data_feed.tracker.TrackerInfo obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public int status() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public solarxr_protocol.datatypes.math.Quat rotation() { return rotation(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat rotation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Position, in meters - */ - public solarxr_protocol.datatypes.math.Vec3f position() { return position(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f position(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Raw rotational velocity, in euler angles - */ - public solarxr_protocol.datatypes.math.Vec3f rawRotVel() { return rawRotVel(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f rawRotVel(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(14); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Raw translational acceleration, in m/s^2 - */ - public solarxr_protocol.datatypes.math.Vec3f rawTransAccel() { return rawTransAccel(new solarxr_protocol.datatypes.math.Vec3f()); } - public solarxr_protocol.datatypes.math.Vec3f rawTransAccel(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * Temperature in degrees celsius - */ - public solarxr_protocol.datatypes.Temperature temp() { return temp(new solarxr_protocol.datatypes.Temperature()); } - public solarxr_protocol.datatypes.Temperature temp(solarxr_protocol.datatypes.Temperature obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - - public static void startTrackerData(FlatBufferBuilder builder) { builder.startTable(8); } - public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } - public static void addInfo(FlatBufferBuilder builder, int infoOffset) { builder.addOffset(1, infoOffset, 0); } - public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(2, (byte) status, (byte) 0); } - public static void addRotation(FlatBufferBuilder builder, int rotationOffset) { builder.addStruct(3, rotationOffset, 0); } - public static void addPosition(FlatBufferBuilder builder, int positionOffset) { builder.addStruct(4, positionOffset, 0); } - public static void addRawRotVel(FlatBufferBuilder builder, int rawRotVelOffset) { builder.addStruct(5, rawRotVelOffset, 0); } - public static void addRawTransAccel(FlatBufferBuilder builder, int rawTransAccelOffset) { builder.addStruct(6, rawTransAccelOffset, 0); } - public static void addTemp(FlatBufferBuilder builder, int tempOffset) { builder.addStruct(7, tempOffset, 0); } - public static int endTrackerData(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 TrackerData get(int j) { return get(new TrackerData(), j); } - public TrackerData get(TrackerData obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TrackerDataT unpack() { - TrackerDataT _o = new TrackerDataT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TrackerDataT _o) { - if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); - else _o.setTrackerId(null); - if (info() != null) _o.setInfo(info().unpack()); - else _o.setInfo(null); - int _oStatus = status(); - _o.setStatus(_oStatus); - if (rotation() != null) rotation().unpackTo(_o.getRotation()); - else _o.setRotation(null); - if (position() != null) position().unpackTo(_o.getPosition()); - else _o.setPosition(null); - if (rawRotVel() != null) rawRotVel().unpackTo(_o.getRawRotVel()); - else _o.setRawRotVel(null); - if (rawTransAccel() != null) rawTransAccel().unpackTo(_o.getRawTransAccel()); - else _o.setRawTransAccel(null); - if (temp() != null) temp().unpackTo(_o.getTemp()); - else _o.setTemp(null); - } - public static int pack(FlatBufferBuilder builder, TrackerDataT _o) { - if (_o == null) return 0; - int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); - int _info = _o.getInfo() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerInfo.pack(builder, _o.getInfo()); - startTrackerData(builder); - addTrackerId(builder, _trackerId); - addInfo(builder, _info); - addStatus(builder, _o.getStatus()); - addRotation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotation())); - addPosition(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getPosition())); - addRawRotVel(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawRotVel())); - addRawTransAccel(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawTransAccel())); - addTemp(builder, solarxr_protocol.datatypes.Temperature.pack(builder, _o.getTemp())); - return endTrackerData(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Describes all possible information about a tracker. A tracker is anything that + * provides kinematic data about a particular body part. + * + * Trackers may be synthetic/computed or instead part of an actual hardware device. + * There can be multiple trackers per hardware device. + */ +@SuppressWarnings("unused") +public final class TrackerData extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TrackerData getRootAsTrackerData(ByteBuffer _bb) { return getRootAsTrackerData(_bb, new TrackerData()); } + public static TrackerData getRootAsTrackerData(ByteBuffer _bb, TrackerData 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 TrackerData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.datatypes.TrackerId trackerId() { return trackerId(new solarxr_protocol.datatypes.TrackerId()); } + public solarxr_protocol.datatypes.TrackerId trackerId(solarxr_protocol.datatypes.TrackerId obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.data_feed.tracker.TrackerInfo info() { return info(new solarxr_protocol.data_feed.tracker.TrackerInfo()); } + public solarxr_protocol.data_feed.tracker.TrackerInfo info(solarxr_protocol.data_feed.tracker.TrackerInfo obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public int status() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public solarxr_protocol.datatypes.math.Quat rotation() { return rotation(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat rotation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Position, in meters + */ + public solarxr_protocol.datatypes.math.Vec3f position() { return position(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f position(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(12); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Raw rotational velocity, in euler angles + */ + public solarxr_protocol.datatypes.math.Vec3f rawRotVel() { return rawRotVel(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f rawRotVel(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(14); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Raw translational acceleration, in m/s^2 + */ + public solarxr_protocol.datatypes.math.Vec3f rawTransAccel() { return rawTransAccel(new solarxr_protocol.datatypes.math.Vec3f()); } + public solarxr_protocol.datatypes.math.Vec3f rawTransAccel(solarxr_protocol.datatypes.math.Vec3f obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * Temperature in degrees celsius + */ + public solarxr_protocol.datatypes.Temperature temp() { return temp(new solarxr_protocol.datatypes.Temperature()); } + public solarxr_protocol.datatypes.Temperature temp(solarxr_protocol.datatypes.Temperature obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + + public static void startTrackerData(FlatBufferBuilder builder) { builder.startTable(8); } + public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } + public static void addInfo(FlatBufferBuilder builder, int infoOffset) { builder.addOffset(1, infoOffset, 0); } + public static void addStatus(FlatBufferBuilder builder, int status) { builder.addByte(2, (byte) status, (byte) 0); } + public static void addRotation(FlatBufferBuilder builder, int rotationOffset) { builder.addStruct(3, rotationOffset, 0); } + public static void addPosition(FlatBufferBuilder builder, int positionOffset) { builder.addStruct(4, positionOffset, 0); } + public static void addRawRotVel(FlatBufferBuilder builder, int rawRotVelOffset) { builder.addStruct(5, rawRotVelOffset, 0); } + public static void addRawTransAccel(FlatBufferBuilder builder, int rawTransAccelOffset) { builder.addStruct(6, rawTransAccelOffset, 0); } + public static void addTemp(FlatBufferBuilder builder, int tempOffset) { builder.addStruct(7, tempOffset, 0); } + public static int endTrackerData(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 TrackerData get(int j) { return get(new TrackerData(), j); } + public TrackerData get(TrackerData obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackerDataT unpack() { + TrackerDataT _o = new TrackerDataT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackerDataT _o) { + if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); + else _o.setTrackerId(null); + if (info() != null) _o.setInfo(info().unpack()); + else _o.setInfo(null); + int _oStatus = status(); + _o.setStatus(_oStatus); + if (rotation() != null) rotation().unpackTo(_o.getRotation()); + else _o.setRotation(null); + if (position() != null) position().unpackTo(_o.getPosition()); + else _o.setPosition(null); + if (rawRotVel() != null) rawRotVel().unpackTo(_o.getRawRotVel()); + else _o.setRawRotVel(null); + if (rawTransAccel() != null) rawTransAccel().unpackTo(_o.getRawTransAccel()); + else _o.setRawTransAccel(null); + if (temp() != null) temp().unpackTo(_o.getTemp()); + else _o.setTemp(null); + } + public static int pack(FlatBufferBuilder builder, TrackerDataT _o) { + if (_o == null) return 0; + int _tracker_id = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + int _info = _o.getInfo() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerInfo.pack(builder, _o.getInfo()); + startTrackerData(builder); + addTrackerId(builder, _tracker_id); + addInfo(builder, _info); + addStatus(builder, _o.getStatus()); + addRotation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotation())); + addPosition(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getPosition())); + addRawRotVel(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawRotVel())); + addRawTransAccel(builder, solarxr_protocol.datatypes.math.Vec3f.pack(builder, _o.getRawTransAccel())); + addTemp(builder, solarxr_protocol.datatypes.Temperature.pack(builder, _o.getTemp())); + return endTrackerData(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java index 1e33caf6..7eeffb73 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMask.java @@ -1,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * A mask of the different components in `TrackerComponent` - */ -@SuppressWarnings("unused") -public final class TrackerDataMask extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static TrackerDataMask getRootAsTrackerDataMask(ByteBuffer _bb) { return getRootAsTrackerDataMask(_bb, new TrackerDataMask()); } - public static TrackerDataMask getRootAsTrackerDataMask(ByteBuffer _bb, TrackerDataMask 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 TrackerDataMask __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean info() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean status() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rotation() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean position() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rawRotVel() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rawTransAccel() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean temp() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createTrackerDataMask(FlatBufferBuilder builder, - boolean info, - boolean status, - boolean rotation, - boolean position, - boolean rawRotVel, - boolean rawTransAccel, - boolean temp) { - builder.startTable(7); - TrackerDataMask.addTemp(builder, temp); - TrackerDataMask.addRawTransAccel(builder, rawTransAccel); - TrackerDataMask.addRawRotVel(builder, rawRotVel); - TrackerDataMask.addPosition(builder, position); - TrackerDataMask.addRotation(builder, rotation); - TrackerDataMask.addStatus(builder, status); - TrackerDataMask.addInfo(builder, info); - return TrackerDataMask.endTrackerDataMask(builder); - } - - public static void startTrackerDataMask(FlatBufferBuilder builder) { builder.startTable(7); } - public static void addInfo(FlatBufferBuilder builder, boolean info) { builder.addBoolean(0, info, false); } - public static void addStatus(FlatBufferBuilder builder, boolean status) { builder.addBoolean(1, status, false); } - public static void addRotation(FlatBufferBuilder builder, boolean rotation) { builder.addBoolean(2, rotation, false); } - public static void addPosition(FlatBufferBuilder builder, boolean position) { builder.addBoolean(3, position, false); } - public static void addRawRotVel(FlatBufferBuilder builder, boolean rawRotVel) { builder.addBoolean(4, rawRotVel, false); } - public static void addRawTransAccel(FlatBufferBuilder builder, boolean rawTransAccel) { builder.addBoolean(5, rawTransAccel, false); } - public static void addTemp(FlatBufferBuilder builder, boolean temp) { builder.addBoolean(6, temp, false); } - public static int endTrackerDataMask(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 TrackerDataMask get(int j) { return get(new TrackerDataMask(), j); } - public TrackerDataMask get(TrackerDataMask obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TrackerDataMaskT unpack() { - TrackerDataMaskT _o = new TrackerDataMaskT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TrackerDataMaskT _o) { - boolean _oInfo = info(); - _o.setInfo(_oInfo); - boolean _oStatus = status(); - _o.setStatus(_oStatus); - boolean _oRotation = rotation(); - _o.setRotation(_oRotation); - boolean _oPosition = position(); - _o.setPosition(_oPosition); - boolean _oRawRotVel = rawRotVel(); - _o.setRawRotVel(_oRawRotVel); - boolean _oRawTransAccel = rawTransAccel(); - _o.setRawTransAccel(_oRawTransAccel); - boolean _oTemp = temp(); - _o.setTemp(_oTemp); - } - public static int pack(FlatBufferBuilder builder, TrackerDataMaskT _o) { - if (_o == null) return 0; - return createTrackerDataMask( - builder, - _o.getInfo(), - _o.getStatus(), - _o.getRotation(), - _o.getPosition(), - _o.getRawRotVel(), - _o.getRawTransAccel(), - _o.getTemp()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A mask of the different components in `TrackerComponent` + */ +@SuppressWarnings("unused") +public final class TrackerDataMask extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TrackerDataMask getRootAsTrackerDataMask(ByteBuffer _bb) { return getRootAsTrackerDataMask(_bb, new TrackerDataMask()); } + public static TrackerDataMask getRootAsTrackerDataMask(ByteBuffer _bb, TrackerDataMask 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 TrackerDataMask __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean info() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean status() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rotation() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean position() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rawRotVel() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rawTransAccel() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean temp() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createTrackerDataMask(FlatBufferBuilder builder, + boolean info, + boolean status, + boolean rotation, + boolean position, + boolean rawRotVel, + boolean rawTransAccel, + boolean temp) { + builder.startTable(7); + TrackerDataMask.addTemp(builder, temp); + TrackerDataMask.addRawTransAccel(builder, rawTransAccel); + TrackerDataMask.addRawRotVel(builder, rawRotVel); + TrackerDataMask.addPosition(builder, position); + TrackerDataMask.addRotation(builder, rotation); + TrackerDataMask.addStatus(builder, status); + TrackerDataMask.addInfo(builder, info); + return TrackerDataMask.endTrackerDataMask(builder); + } + + public static void startTrackerDataMask(FlatBufferBuilder builder) { builder.startTable(7); } + public static void addInfo(FlatBufferBuilder builder, boolean info) { builder.addBoolean(0, info, false); } + public static void addStatus(FlatBufferBuilder builder, boolean status) { builder.addBoolean(1, status, false); } + public static void addRotation(FlatBufferBuilder builder, boolean rotation) { builder.addBoolean(2, rotation, false); } + public static void addPosition(FlatBufferBuilder builder, boolean position) { builder.addBoolean(3, position, false); } + public static void addRawRotVel(FlatBufferBuilder builder, boolean rawRotVel) { builder.addBoolean(4, rawRotVel, false); } + public static void addRawTransAccel(FlatBufferBuilder builder, boolean rawTransAccel) { builder.addBoolean(5, rawTransAccel, false); } + public static void addTemp(FlatBufferBuilder builder, boolean temp) { builder.addBoolean(6, temp, false); } + public static int endTrackerDataMask(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 TrackerDataMask get(int j) { return get(new TrackerDataMask(), j); } + public TrackerDataMask get(TrackerDataMask obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackerDataMaskT unpack() { + TrackerDataMaskT _o = new TrackerDataMaskT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackerDataMaskT _o) { + boolean _oInfo = info(); + _o.setInfo(_oInfo); + boolean _oStatus = status(); + _o.setStatus(_oStatus); + boolean _oRotation = rotation(); + _o.setRotation(_oRotation); + boolean _oPosition = position(); + _o.setPosition(_oPosition); + boolean _oRawRotVel = rawRotVel(); + _o.setRawRotVel(_oRawRotVel); + boolean _oRawTransAccel = rawTransAccel(); + _o.setRawTransAccel(_oRawTransAccel); + boolean _oTemp = temp(); + _o.setTemp(_oTemp); + } + public static int pack(FlatBufferBuilder builder, TrackerDataMaskT _o) { + if (_o == null) return 0; + return createTrackerDataMask( + builder, + _o.getInfo(), + _o.getStatus(), + _o.getRotation(), + _o.getPosition(), + _o.getRawRotVel(), + _o.getRawTransAccel(), + _o.getTemp()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java index 50a9c021..066b27f0 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataMaskT.java @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class TrackerDataMaskT { - private boolean info; - private boolean status; - private boolean rotation; - private boolean position; - private boolean rawRotVel; - private boolean rawTransAccel; - private boolean temp; - - public boolean getInfo() { return info; } - - public void setInfo(boolean info) { this.info = info; } - - public boolean getStatus() { return status; } - - public void setStatus(boolean status) { this.status = status; } - - public boolean getRotation() { return rotation; } - - public void setRotation(boolean rotation) { this.rotation = rotation; } - - public boolean getPosition() { return position; } - - public void setPosition(boolean position) { this.position = position; } - - public boolean getRawRotVel() { return rawRotVel; } - - public void setRawRotVel(boolean rawRotVel) { this.rawRotVel = rawRotVel; } - - public boolean getRawTransAccel() { return rawTransAccel; } - - public void setRawTransAccel(boolean rawTransAccel) { this.rawTransAccel = rawTransAccel; } - - public boolean getTemp() { return temp; } - - public void setTemp(boolean temp) { this.temp = temp; } - - - public TrackerDataMaskT() { - this.info = false; - this.status = false; - this.rotation = false; - this.position = false; - this.rawRotVel = false; - this.rawTransAccel = false; - this.temp = false; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackerDataMaskT { + private boolean info; + private boolean status; + private boolean rotation; + private boolean position; + private boolean rawRotVel; + private boolean rawTransAccel; + private boolean temp; + + public boolean getInfo() { return info; } + + public void setInfo(boolean info) { this.info = info; } + + public boolean getStatus() { return status; } + + public void setStatus(boolean status) { this.status = status; } + + public boolean getRotation() { return rotation; } + + public void setRotation(boolean rotation) { this.rotation = rotation; } + + public boolean getPosition() { return position; } + + public void setPosition(boolean position) { this.position = position; } + + public boolean getRawRotVel() { return rawRotVel; } + + public void setRawRotVel(boolean rawRotVel) { this.rawRotVel = rawRotVel; } + + public boolean getRawTransAccel() { return rawTransAccel; } + + public void setRawTransAccel(boolean rawTransAccel) { this.rawTransAccel = rawTransAccel; } + + public boolean getTemp() { return temp; } + + public void setTemp(boolean temp) { this.temp = temp; } + + + public TrackerDataMaskT() { + this.info = false; + this.status = false; + this.rotation = false; + this.position = false; + this.rawRotVel = false; + this.rawTransAccel = false; + this.temp = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java index c60dd702..ca01f360 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerDataT.java @@ -1,64 +1,64 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class TrackerDataT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - private solarxr_protocol.data_feed.tracker.TrackerInfoT info; - private int status; - private solarxr_protocol.datatypes.math.QuatT rotation; - private solarxr_protocol.datatypes.math.Vec3fT position; - private solarxr_protocol.datatypes.math.Vec3fT rawRotVel; - private solarxr_protocol.datatypes.math.Vec3fT rawTransAccel; - private solarxr_protocol.datatypes.TemperatureT temp; - - public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } - - public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } - - public solarxr_protocol.data_feed.tracker.TrackerInfoT getInfo() { return info; } - - public void setInfo(solarxr_protocol.data_feed.tracker.TrackerInfoT info) { this.info = info; } - - public int getStatus() { return status; } - - public void setStatus(int status) { this.status = status; } - - public solarxr_protocol.datatypes.math.QuatT getRotation() { return rotation; } - - public void setRotation(solarxr_protocol.datatypes.math.QuatT rotation) { this.rotation = rotation; } - - public solarxr_protocol.datatypes.math.Vec3fT getPosition() { return position; } - - public void setPosition(solarxr_protocol.datatypes.math.Vec3fT position) { this.position = position; } - - public solarxr_protocol.datatypes.math.Vec3fT getRawRotVel() { return rawRotVel; } - - public void setRawRotVel(solarxr_protocol.datatypes.math.Vec3fT rawRotVel) { this.rawRotVel = rawRotVel; } - - public solarxr_protocol.datatypes.math.Vec3fT getRawTransAccel() { return rawTransAccel; } - - public void setRawTransAccel(solarxr_protocol.datatypes.math.Vec3fT rawTransAccel) { this.rawTransAccel = rawTransAccel; } - - public solarxr_protocol.datatypes.TemperatureT getTemp() { return temp; } - - public void setTemp(solarxr_protocol.datatypes.TemperatureT temp) { this.temp = temp; } - - - public TrackerDataT() { - this.trackerId = null; - this.info = null; - this.status = 0; - this.rotation = new solarxr_protocol.datatypes.math.QuatT(); - this.position = new solarxr_protocol.datatypes.math.Vec3fT(); - this.rawRotVel = new solarxr_protocol.datatypes.math.Vec3fT(); - this.rawTransAccel = new solarxr_protocol.datatypes.math.Vec3fT(); - this.temp = new solarxr_protocol.datatypes.TemperatureT(); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackerDataT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + private solarxr_protocol.data_feed.tracker.TrackerInfoT info; + private int status; + private solarxr_protocol.datatypes.math.QuatT rotation; + private solarxr_protocol.datatypes.math.Vec3fT position; + private solarxr_protocol.datatypes.math.Vec3fT rawRotVel; + private solarxr_protocol.datatypes.math.Vec3fT rawTransAccel; + private solarxr_protocol.datatypes.TemperatureT temp; + + public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } + + public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } + + public solarxr_protocol.data_feed.tracker.TrackerInfoT getInfo() { return info; } + + public void setInfo(solarxr_protocol.data_feed.tracker.TrackerInfoT info) { this.info = info; } + + public int getStatus() { return status; } + + public void setStatus(int status) { this.status = status; } + + public solarxr_protocol.datatypes.math.QuatT getRotation() { return rotation; } + + public void setRotation(solarxr_protocol.datatypes.math.QuatT rotation) { this.rotation = rotation; } + + public solarxr_protocol.datatypes.math.Vec3fT getPosition() { return position; } + + public void setPosition(solarxr_protocol.datatypes.math.Vec3fT position) { this.position = position; } + + public solarxr_protocol.datatypes.math.Vec3fT getRawRotVel() { return rawRotVel; } + + public void setRawRotVel(solarxr_protocol.datatypes.math.Vec3fT rawRotVel) { this.rawRotVel = rawRotVel; } + + public solarxr_protocol.datatypes.math.Vec3fT getRawTransAccel() { return rawTransAccel; } + + public void setRawTransAccel(solarxr_protocol.datatypes.math.Vec3fT rawTransAccel) { this.rawTransAccel = rawTransAccel; } + + public solarxr_protocol.datatypes.TemperatureT getTemp() { return temp; } + + public void setTemp(solarxr_protocol.datatypes.TemperatureT temp) { this.temp = temp; } + + + public TrackerDataT() { + this.trackerId = null; + this.info = null; + this.status = 0; + this.rotation = new solarxr_protocol.datatypes.math.QuatT(); + this.position = new solarxr_protocol.datatypes.math.Vec3fT(); + this.rawRotVel = new solarxr_protocol.datatypes.math.Vec3fT(); + this.rawTransAccel = new solarxr_protocol.datatypes.math.Vec3fT(); + this.temp = new solarxr_protocol.datatypes.TemperatureT(); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfo.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfo.java index 0e66a29a..f6e1f885 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfo.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfo.java @@ -1,110 +1,110 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Static description of a tracker - */ -@SuppressWarnings("unused") -public final class TrackerInfo extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static TrackerInfo getRootAsTrackerInfo(ByteBuffer _bb) { return getRootAsTrackerInfo(_bb, new TrackerInfo()); } - public static TrackerInfo getRootAsTrackerInfo(ByteBuffer _bb, TrackerInfo 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 TrackerInfo __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int imuType() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - /** - * The user-assigned role of the tracker. - */ - public int bodyPart() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - /** - * average samples per second - */ - public solarxr_protocol.datatypes.HzF32 pollRate() { return pollRate(new solarxr_protocol.datatypes.HzF32()); } - public solarxr_protocol.datatypes.HzF32 pollRate(solarxr_protocol.datatypes.HzF32 obj) { int o = __offset(8); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * The orientation of the tracker when mounted on the body - */ - public solarxr_protocol.datatypes.math.Quat mountingOrientation() { return mountingOrientation(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat mountingOrientation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - public boolean editable() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean computed() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - /** - * A human-friendly name to display as the name of the tracker. - */ - public String displayName() { int o = __offset(16); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(16, 1); } - public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 16, 1); } - /** - * name to display as the name of the tracker set by the user - */ - public String customName() { int o = __offset(18); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer customNameAsByteBuffer() { return __vector_as_bytebuffer(18, 1); } - public ByteBuffer customNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); } - - public static void startTrackerInfo(FlatBufferBuilder builder) { builder.startTable(8); } - public static void addImuType(FlatBufferBuilder builder, int imuType) { builder.addShort(0, (short) imuType, (short) 0); } - public static void addBodyPart(FlatBufferBuilder builder, int bodyPart) { builder.addByte(1, (byte) bodyPart, (byte) 0); } - public static void addPollRate(FlatBufferBuilder builder, int pollRateOffset) { builder.addStruct(2, pollRateOffset, 0); } - public static void addMountingOrientation(FlatBufferBuilder builder, int mountingOrientationOffset) { builder.addStruct(3, mountingOrientationOffset, 0); } - public static void addEditable(FlatBufferBuilder builder, boolean editable) { builder.addBoolean(4, editable, false); } - public static void addComputed(FlatBufferBuilder builder, boolean computed) { builder.addBoolean(5, computed, false); } - public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(6, displayNameOffset, 0); } - public static void addCustomName(FlatBufferBuilder builder, int customNameOffset) { builder.addOffset(7, customNameOffset, 0); } - public static int endTrackerInfo(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 TrackerInfo get(int j) { return get(new TrackerInfo(), j); } - public TrackerInfo get(TrackerInfo obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TrackerInfoT unpack() { - TrackerInfoT _o = new TrackerInfoT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TrackerInfoT _o) { - int _oImuType = imuType(); - _o.setImuType(_oImuType); - int _oBodyPart = bodyPart(); - _o.setBodyPart(_oBodyPart); - if (pollRate() != null) pollRate().unpackTo(_o.getPollRate()); - else _o.setPollRate(null); - if (mountingOrientation() != null) mountingOrientation().unpackTo(_o.getMountingOrientation()); - else _o.setMountingOrientation(null); - boolean _oEditable = editable(); - _o.setEditable(_oEditable); - boolean _oComputed = computed(); - _o.setComputed(_oComputed); - String _oDisplayName = displayName(); - _o.setDisplayName(_oDisplayName); - String _oCustomName = customName(); - _o.setCustomName(_oCustomName); - } - public static int pack(FlatBufferBuilder builder, TrackerInfoT _o) { - if (_o == null) return 0; - int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); - int _customName = _o.getCustomName() == null ? 0 : builder.createString(_o.getCustomName()); - startTrackerInfo(builder); - addImuType(builder, _o.getImuType()); - addBodyPart(builder, _o.getBodyPart()); - addPollRate(builder, solarxr_protocol.datatypes.HzF32.pack(builder, _o.getPollRate())); - addMountingOrientation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingOrientation())); - addEditable(builder, _o.getEditable()); - addComputed(builder, _o.getComputed()); - addDisplayName(builder, _displayName); - addCustomName(builder, _customName); - return endTrackerInfo(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Static description of a tracker + */ +@SuppressWarnings("unused") +public final class TrackerInfo extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TrackerInfo getRootAsTrackerInfo(ByteBuffer _bb) { return getRootAsTrackerInfo(_bb, new TrackerInfo()); } + public static TrackerInfo getRootAsTrackerInfo(ByteBuffer _bb, TrackerInfo 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 TrackerInfo __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int imuType() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + /** + * The user-assigned role of the tracker. + */ + public int bodyPart() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * average samples per second + */ + public solarxr_protocol.datatypes.HzF32 pollRate() { return pollRate(new solarxr_protocol.datatypes.HzF32()); } + public solarxr_protocol.datatypes.HzF32 pollRate(solarxr_protocol.datatypes.HzF32 obj) { int o = __offset(8); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * The orientation of the tracker when mounted on the body + */ + public solarxr_protocol.datatypes.math.Quat mountingOrientation() { return mountingOrientation(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat mountingOrientation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(10); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + public boolean editable() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean computed() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + /** + * A human-friendly name to display as the name of the tracker. + */ + public String displayName() { int o = __offset(16); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(16, 1); } + public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 16, 1); } + /** + * name to display as the name of the tracker set by the user + */ + public String customName() { int o = __offset(18); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer customNameAsByteBuffer() { return __vector_as_bytebuffer(18, 1); } + public ByteBuffer customNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 18, 1); } + + public static void startTrackerInfo(FlatBufferBuilder builder) { builder.startTable(8); } + public static void addImuType(FlatBufferBuilder builder, int imuType) { builder.addShort(0, (short) imuType, (short) 0); } + public static void addBodyPart(FlatBufferBuilder builder, int bodyPart) { builder.addByte(1, (byte) bodyPart, (byte) 0); } + public static void addPollRate(FlatBufferBuilder builder, int pollRateOffset) { builder.addStruct(2, pollRateOffset, 0); } + public static void addMountingOrientation(FlatBufferBuilder builder, int mountingOrientationOffset) { builder.addStruct(3, mountingOrientationOffset, 0); } + public static void addEditable(FlatBufferBuilder builder, boolean editable) { builder.addBoolean(4, editable, false); } + public static void addComputed(FlatBufferBuilder builder, boolean computed) { builder.addBoolean(5, computed, false); } + public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(6, displayNameOffset, 0); } + public static void addCustomName(FlatBufferBuilder builder, int customNameOffset) { builder.addOffset(7, customNameOffset, 0); } + public static int endTrackerInfo(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 TrackerInfo get(int j) { return get(new TrackerInfo(), j); } + public TrackerInfo get(TrackerInfo obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackerInfoT unpack() { + TrackerInfoT _o = new TrackerInfoT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackerInfoT _o) { + int _oImuType = imuType(); + _o.setImuType(_oImuType); + int _oBodyPart = bodyPart(); + _o.setBodyPart(_oBodyPart); + if (pollRate() != null) pollRate().unpackTo(_o.getPollRate()); + else _o.setPollRate(null); + if (mountingOrientation() != null) mountingOrientation().unpackTo(_o.getMountingOrientation()); + else _o.setMountingOrientation(null); + boolean _oEditable = editable(); + _o.setEditable(_oEditable); + boolean _oComputed = computed(); + _o.setComputed(_oComputed); + String _oDisplayName = displayName(); + _o.setDisplayName(_oDisplayName); + String _oCustomName = customName(); + _o.setCustomName(_oCustomName); + } + public static int pack(FlatBufferBuilder builder, TrackerInfoT _o) { + if (_o == null) return 0; + int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); + int _customName = _o.getCustomName() == null ? 0 : builder.createString(_o.getCustomName()); + startTrackerInfo(builder); + addImuType(builder, _o.getImuType()); + addBodyPart(builder, _o.getBodyPart()); + addPollRate(builder, solarxr_protocol.datatypes.HzF32.pack(builder, _o.getPollRate())); + addMountingOrientation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingOrientation())); + addEditable(builder, _o.getEditable()); + addComputed(builder, _o.getComputed()); + addDisplayName(builder, _displayName); + addCustomName(builder, _customName); + return endTrackerInfo(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfoT.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfoT.java index 937e3bfb..d7b74b67 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfoT.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerInfoT.java @@ -1,64 +1,64 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.data_feed.tracker; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class TrackerInfoT { - private int imuType; - private int bodyPart; - private solarxr_protocol.datatypes.HzF32T pollRate; - private solarxr_protocol.datatypes.math.QuatT mountingOrientation; - private boolean editable; - private boolean computed; - private String displayName; - private String customName; - - public int getImuType() { return imuType; } - - public void setImuType(int imuType) { this.imuType = imuType; } - - public int getBodyPart() { return bodyPart; } - - public void setBodyPart(int bodyPart) { this.bodyPart = bodyPart; } - - public solarxr_protocol.datatypes.HzF32T getPollRate() { return pollRate; } - - public void setPollRate(solarxr_protocol.datatypes.HzF32T pollRate) { this.pollRate = pollRate; } - - public solarxr_protocol.datatypes.math.QuatT getMountingOrientation() { return mountingOrientation; } - - public void setMountingOrientation(solarxr_protocol.datatypes.math.QuatT mountingOrientation) { this.mountingOrientation = mountingOrientation; } - - public boolean getEditable() { return editable; } - - public void setEditable(boolean editable) { this.editable = editable; } - - public boolean getComputed() { return computed; } - - public void setComputed(boolean computed) { this.computed = computed; } - - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { this.displayName = displayName; } - - public String getCustomName() { return customName; } - - public void setCustomName(String customName) { this.customName = customName; } - - - public TrackerInfoT() { - this.imuType = 0; - this.bodyPart = 0; - this.pollRate = new solarxr_protocol.datatypes.HzF32T(); - this.mountingOrientation = new solarxr_protocol.datatypes.math.QuatT(); - this.editable = false; - this.computed = false; - this.displayName = null; - this.customName = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.data_feed.tracker; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackerInfoT { + private int imuType; + private int bodyPart; + private solarxr_protocol.datatypes.HzF32T pollRate; + private solarxr_protocol.datatypes.math.QuatT mountingOrientation; + private boolean editable; + private boolean computed; + private String displayName; + private String customName; + + public int getImuType() { return imuType; } + + public void setImuType(int imuType) { this.imuType = imuType; } + + public int getBodyPart() { return bodyPart; } + + public void setBodyPart(int bodyPart) { this.bodyPart = bodyPart; } + + public solarxr_protocol.datatypes.HzF32T getPollRate() { return pollRate; } + + public void setPollRate(solarxr_protocol.datatypes.HzF32T pollRate) { this.pollRate = pollRate; } + + public solarxr_protocol.datatypes.math.QuatT getMountingOrientation() { return mountingOrientation; } + + public void setMountingOrientation(solarxr_protocol.datatypes.math.QuatT mountingOrientation) { this.mountingOrientation = mountingOrientation; } + + public boolean getEditable() { return editable; } + + public void setEditable(boolean editable) { this.editable = editable; } + + public boolean getComputed() { return computed; } + + public void setComputed(boolean computed) { this.computed = computed; } + + public String getDisplayName() { return displayName; } + + public void setDisplayName(String displayName) { this.displayName = displayName; } + + public String getCustomName() { return customName; } + + public void setCustomName(String customName) { this.customName = customName; } + + + public TrackerInfoT() { + this.imuType = 0; + this.bodyPart = 0; + this.pollRate = new solarxr_protocol.datatypes.HzF32T(); + this.mountingOrientation = new solarxr_protocol.datatypes.math.QuatT(); + this.editable = false; + this.computed = false; + this.displayName = null; + this.customName = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java b/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java index 668ce692..eff51726 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java +++ b/protocol/java/src/solarxr_protocol/datatypes/BodyPart.java @@ -1,39 +1,39 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -/** - * Different parts of the body. Roughly maps to each possible bone in the skeleton. - * These are *NOT* the trackers. - */ -@SuppressWarnings("unused") -public final class BodyPart { - private BodyPart() { } - public static final int NONE = 0; - public static final int HEAD = 1; - public static final int NECK = 2; - public static final int CHEST = 3; - public static final int WAIST = 4; - public static final int HIP = 5; - public static final int LEFT_UPPER_LEG = 6; - public static final int RIGHT_UPPER_LEG = 7; - public static final int LEFT_LOWER_LEG = 8; - public static final int RIGHT_LOWER_LEG = 9; - public static final int LEFT_FOOT = 10; - public static final int RIGHT_FOOT = 11; - public static final int LEFT_CONTROLLER = 12; - public static final int RIGHT_CONTROLLER = 13; - public static final int LEFT_LOWER_ARM = 14; - public static final int RIGHT_LOWER_ARM = 15; - public static final int LEFT_UPPER_ARM = 16; - public static final int RIGHT_UPPER_ARM = 17; - public static final int LEFT_HAND = 18; - public static final int RIGHT_HAND = 19; - public static final int LEFT_SHOULDER = 20; - public static final int RIGHT_SHOULDER = 21; - - public static final String[] names = { "NONE", "HEAD", "NECK", "CHEST", "WAIST", "HIP", "LEFT_UPPER_LEG", "RIGHT_UPPER_LEG", "LEFT_LOWER_LEG", "RIGHT_LOWER_LEG", "LEFT_FOOT", "RIGHT_FOOT", "LEFT_CONTROLLER", "RIGHT_CONTROLLER", "LEFT_LOWER_ARM", "RIGHT_LOWER_ARM", "LEFT_UPPER_ARM", "RIGHT_UPPER_ARM", "LEFT_HAND", "RIGHT_HAND", "LEFT_SHOULDER", "RIGHT_SHOULDER", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +/** + * Different parts of the body. Roughly maps to each possible bone in the skeleton. + * These are *NOT* the trackers. + */ +@SuppressWarnings("unused") +public final class BodyPart { + private BodyPart() { } + public static final int NONE = 0; + public static final int HEAD = 1; + public static final int NECK = 2; + public static final int CHEST = 3; + public static final int WAIST = 4; + public static final int HIP = 5; + public static final int LEFT_UPPER_LEG = 6; + public static final int RIGHT_UPPER_LEG = 7; + public static final int LEFT_LOWER_LEG = 8; + public static final int RIGHT_LOWER_LEG = 9; + public static final int LEFT_FOOT = 10; + public static final int RIGHT_FOOT = 11; + public static final int LEFT_CONTROLLER = 12; + public static final int RIGHT_CONTROLLER = 13; + public static final int LEFT_LOWER_ARM = 14; + public static final int RIGHT_LOWER_ARM = 15; + public static final int LEFT_UPPER_ARM = 16; + public static final int RIGHT_UPPER_ARM = 17; + public static final int LEFT_HAND = 18; + public static final int RIGHT_HAND = 19; + public static final int LEFT_SHOULDER = 20; + public static final int RIGHT_SHOULDER = 21; + + public static final String[] names = { "NONE", "HEAD", "NECK", "CHEST", "WAIST", "HIP", "LEFT_UPPER_LEG", "RIGHT_UPPER_LEG", "LEFT_LOWER_LEG", "RIGHT_LOWER_LEG", "LEFT_FOOT", "RIGHT_FOOT", "LEFT_CONTROLLER", "RIGHT_CONTROLLER", "LEFT_LOWER_ARM", "RIGHT_LOWER_ARM", "LEFT_UPPER_ARM", "RIGHT_UPPER_ARM", "LEFT_HAND", "RIGHT_HAND", "LEFT_SHOULDER", "RIGHT_SHOULDER", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/Bytes.java b/protocol/java/src/solarxr_protocol/datatypes/Bytes.java new file mode 100644 index 00000000..2b2869db --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/Bytes.java @@ -0,0 +1,72 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class Bytes extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static Bytes getRootAsBytes(ByteBuffer _bb) { return getRootAsBytes(_bb, new Bytes()); } + public static Bytes getRootAsBytes(ByteBuffer _bb, Bytes 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 Bytes __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int b(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int bLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector bVector() { return bVector(new ByteVector()); } + public ByteVector bVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer bAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer bInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createBytes(FlatBufferBuilder builder, + int bOffset) { + builder.startTable(1); + Bytes.addB(builder, bOffset); + return Bytes.endBytes(builder); + } + + public static void startBytes(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addB(FlatBufferBuilder builder, int bOffset) { builder.addOffset(0, bOffset, 0); } + public static int createBVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createBVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startBVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endBytes(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 Bytes get(int j) { return get(new Bytes(), j); } + public Bytes get(Bytes obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public BytesT unpack() { + BytesT _o = new BytesT(); + unpackTo(_o); + return _o; + } + public void unpackTo(BytesT _o) { + int[] _oB = new int[bLength()]; + for (int _j = 0; _j < bLength(); ++_j) {_oB[_j] = b(_j);} + _o.setB(_oB); + } + public static int pack(FlatBufferBuilder builder, BytesT _o) { + if (_o == null) return 0; + int _b = 0; + if (_o.getB() != null) { + byte[] __b = new byte[_o.getB().length]; + int _j = 0; + for (int _e : _o.getB()) { __b[_j] = (byte) _e; _j++;} + _b = createBVector(builder, __b); + } + return createBytes( + builder, + _b); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/BytesT.java b/protocol/java/src/solarxr_protocol/datatypes/BytesT.java new file mode 100644 index 00000000..5d757e8f --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/BytesT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class BytesT { + private int[] b; + + public int[] getB() { return b; } + + public void setB(int[] b) { this.b = b; } + + + public BytesT() { + this.b = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/DeviceId.java b/protocol/java/src/solarxr_protocol/datatypes/DeviceId.java index 64fd0931..3a0f7b18 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/DeviceId.java +++ b/protocol/java/src/solarxr_protocol/datatypes/DeviceId.java @@ -1,49 +1,49 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * A unique ID for the device. IDs are not guaranteed to be the same after - * the connection is terminated. - */ -@SuppressWarnings("unused") -public final class DeviceId extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public DeviceId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int id() { return bb.get(bb_pos + 0) & 0xFF; } - - public static int createDeviceId(FlatBufferBuilder builder, int id) { - builder.prep(1, 1); - builder.putByte((byte) id); - return builder.offset(); - } - - 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 DeviceId get(int j) { return get(new DeviceId(), j); } - public DeviceId get(DeviceId obj, int j) { return obj.__assign(__element(j), bb); } - } - public DeviceIdT unpack() { - DeviceIdT _o = new DeviceIdT(); - unpackTo(_o); - return _o; - } - public void unpackTo(DeviceIdT _o) { - int _oId = id(); - _o.setId(_oId); - } - public static int pack(FlatBufferBuilder builder, DeviceIdT _o) { - if (_o == null) return 0; - return createDeviceId( - builder, - _o.getId()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A unique ID for the device. IDs are not guaranteed to be the same after + * the connection is terminated. + */ +@SuppressWarnings("unused") +public final class DeviceId extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DeviceId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int id() { return bb.get(bb_pos + 0) & 0xFF; } + + public static int createDeviceId(FlatBufferBuilder builder, int id) { + builder.prep(1, 1); + builder.putByte((byte) id); + return builder.offset(); + } + + 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 DeviceId get(int j) { return get(new DeviceId(), j); } + public DeviceId get(DeviceId obj, int j) { return obj.__assign(__element(j), bb); } + } + public DeviceIdT unpack() { + DeviceIdT _o = new DeviceIdT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DeviceIdT _o) { + int _oId = id(); + _o.setId(_oId); + } + public static int pack(FlatBufferBuilder builder, DeviceIdT _o) { + if (_o == null) return 0; + return createDeviceId( + builder, + _o.getId()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/DeviceIdT.java b/protocol/java/src/solarxr_protocol/datatypes/DeviceIdT.java index f51817b0..2901e01e 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/DeviceIdT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/DeviceIdT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class DeviceIdT { - private int id; - - public int getId() { return id; } - - public void setId(int id) { this.id = id; } - - - public DeviceIdT() { - this.id = 0; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class DeviceIdT { + private int id; + + public int getId() { return id; } + + public void setId(int id) { this.id = id; } + + + public DeviceIdT() { + this.id = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java b/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java index e267cf6e..e7975bae 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/FilteringType.java @@ -1,19 +1,19 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -/** - * Used for filtering tracker rotations in software - */ -@SuppressWarnings("unused") -public final class FilteringType { - private FilteringType() { } - public static final int NONE = 0; - public static final int SMOOTHING = 1; - public static final int PREDICTION = 2; - - public static final String[] names = { "NONE", "SMOOTHING", "PREDICTION", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +/** + * Used for filtering tracker rotations in software + */ +@SuppressWarnings("unused") +public final class FilteringType { + private FilteringType() { } + public static final int NONE = 0; + public static final int SMOOTHING = 1; + public static final int PREDICTION = 2; + + public static final String[] names = { "NONE", "SMOOTHING", "PREDICTION", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/FirmwareErrorCode.java b/protocol/java/src/solarxr_protocol/datatypes/FirmwareErrorCode.java index 3398b4d5..797a1f80 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/FirmwareErrorCode.java +++ b/protocol/java/src/solarxr_protocol/datatypes/FirmwareErrorCode.java @@ -1,20 +1,20 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -/** - * A list of error codes for error conditions on the device - */ -@SuppressWarnings("unused") -public final class FirmwareErrorCode { - private FirmwareErrorCode() { } - public static final int Other = 0; - public static final int Disconnected = 1; - public static final int Occluded = 2; - public static final int ImuError = 3; - - public static final String[] names = { "Other", "Disconnected", "Occluded", "ImuError", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +/** + * A list of error codes for error conditions on the device + */ +@SuppressWarnings("unused") +public final class FirmwareErrorCode { + private FirmwareErrorCode() { } + public static final int Other = 0; + public static final int Disconnected = 1; + public static final int Occluded = 2; + public static final int ImuError = 3; + + public static final String[] names = { "Other", "Disconnected", "Occluded", "ImuError", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/HzF32.java b/protocol/java/src/solarxr_protocol/datatypes/HzF32.java index 2391d1f3..4d0a31bc 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/HzF32.java +++ b/protocol/java/src/solarxr_protocol/datatypes/HzF32.java @@ -1,48 +1,48 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Frequency as 32 bit float - */ -@SuppressWarnings("unused") -public final class HzF32 extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public HzF32 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public float f() { return bb.getFloat(bb_pos + 0); } - - public static int createHzF32(FlatBufferBuilder builder, float f) { - builder.prep(4, 4); - builder.putFloat(f); - return builder.offset(); - } - - 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 HzF32 get(int j) { return get(new HzF32(), j); } - public HzF32 get(HzF32 obj, int j) { return obj.__assign(__element(j), bb); } - } - public HzF32T unpack() { - HzF32T _o = new HzF32T(); - unpackTo(_o); - return _o; - } - public void unpackTo(HzF32T _o) { - float _oF = f(); - _o.setF(_oF); - } - public static int pack(FlatBufferBuilder builder, HzF32T _o) { - if (_o == null) return 0; - return createHzF32( - builder, - _o.getF()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Frequency as 32 bit float + */ +@SuppressWarnings("unused") +public final class HzF32 extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public HzF32 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float f() { return bb.getFloat(bb_pos + 0); } + + public static int createHzF32(FlatBufferBuilder builder, float f) { + builder.prep(4, 4); + builder.putFloat(f); + return builder.offset(); + } + + 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 HzF32 get(int j) { return get(new HzF32(), j); } + public HzF32 get(HzF32 obj, int j) { return obj.__assign(__element(j), bb); } + } + public HzF32T unpack() { + HzF32T _o = new HzF32T(); + unpackTo(_o); + return _o; + } + public void unpackTo(HzF32T _o) { + float _oF = f(); + _o.setF(_oF); + } + public static int pack(FlatBufferBuilder builder, HzF32T _o) { + if (_o == null) return 0; + return createHzF32( + builder, + _o.getF()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/HzF32T.java b/protocol/java/src/solarxr_protocol/datatypes/HzF32T.java index b6c6e170..5455f534 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/HzF32T.java +++ b/protocol/java/src/solarxr_protocol/datatypes/HzF32T.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class HzF32T { - private float f; - - public float getF() { return f; } - - public void setF(float f) { this.f = f; } - - - public HzF32T() { - this.f = 0.0f; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class HzF32T { + private float f; + + public float getF() { return f; } + + public void setF(float f) { this.f = f; } + + + public HzF32T() { + this.f = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/LogData.java b/protocol/java/src/solarxr_protocol/datatypes/LogData.java index 63267d25..c0ce1907 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/LogData.java +++ b/protocol/java/src/solarxr_protocol/datatypes/LogData.java @@ -1,85 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * General purpose logging datatype - */ -@SuppressWarnings("unused") -public final class LogData extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static LogData getRootAsLogData(ByteBuffer _bb) { return getRootAsLogData(_bb, new LogData()); } - public static LogData getRootAsLogData(ByteBuffer _bb, LogData 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 LogData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String message() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer messageAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer messageInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - public int data(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } - public int dataLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } - public ByteVector dataVector() { return dataVector(new ByteVector()); } - public ByteVector dataVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } - public ByteBuffer dataAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer dataInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - - public static int createLogData(FlatBufferBuilder builder, - int messageOffset, - int dataOffset) { - builder.startTable(2); - LogData.addData(builder, dataOffset); - LogData.addMessage(builder, messageOffset); - return LogData.endLogData(builder); - } - - public static void startLogData(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(0, messageOffset, 0); } - public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(1, dataOffset, 0); } - public static int createDataVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } - public static int createDataVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } - public static void startDataVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } - public static int endLogData(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 LogData get(int j) { return get(new LogData(), j); } - public LogData get(LogData obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public LogDataT unpack() { - LogDataT _o = new LogDataT(); - unpackTo(_o); - return _o; - } - public void unpackTo(LogDataT _o) { - String _oMessage = message(); - _o.setMessage(_oMessage); - int[] _oData = new int[dataLength()]; - for (int _j = 0; _j < dataLength(); ++_j) {_oData[_j] = data(_j);} - _o.setData(_oData); - } - public static int pack(FlatBufferBuilder builder, LogDataT _o) { - if (_o == null) return 0; - int _message = _o.getMessage() == null ? 0 : builder.createString(_o.getMessage()); - int _data = 0; - if (_o.getData() != null) { - byte[] __data = new byte[_o.getData().length]; - int _j = 0; - for (int _e : _o.getData()) { __data[_j] = (byte) _e; _j++;} - _data = createDataVector(builder, __data); - } - return createLogData( - builder, - _message, - _data); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * General purpose logging datatype + */ +@SuppressWarnings("unused") +public final class LogData extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static LogData getRootAsLogData(ByteBuffer _bb) { return getRootAsLogData(_bb, new LogData()); } + public static LogData getRootAsLogData(ByteBuffer _bb, LogData 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 LogData __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String message() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer messageAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer messageInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public int data(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int dataLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteVector dataVector() { return dataVector(new ByteVector()); } + public ByteVector dataVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer dataAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer dataInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createLogData(FlatBufferBuilder builder, + int messageOffset, + int dataOffset) { + builder.startTable(2); + LogData.addData(builder, dataOffset); + LogData.addMessage(builder, messageOffset); + return LogData.endLogData(builder); + } + + public static void startLogData(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(0, messageOffset, 0); } + public static void addData(FlatBufferBuilder builder, int dataOffset) { builder.addOffset(1, dataOffset, 0); } + public static int createDataVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createDataVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startDataVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endLogData(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 LogData get(int j) { return get(new LogData(), j); } + public LogData get(LogData obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public LogDataT unpack() { + LogDataT _o = new LogDataT(); + unpackTo(_o); + return _o; + } + public void unpackTo(LogDataT _o) { + String _oMessage = message(); + _o.setMessage(_oMessage); + int[] _oData = new int[dataLength()]; + for (int _j = 0; _j < dataLength(); ++_j) {_oData[_j] = data(_j);} + _o.setData(_oData); + } + public static int pack(FlatBufferBuilder builder, LogDataT _o) { + if (_o == null) return 0; + int _message = _o.getMessage() == null ? 0 : builder.createString(_o.getMessage()); + int _data = 0; + if (_o.getData() != null) { + byte[] __data = new byte[_o.getData().length]; + int _j = 0; + for (int _e : _o.getData()) { __data[_j] = (byte) _e; _j++;} + _data = createDataVector(builder, __data); + } + return createLogData( + builder, + _message, + _data); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/LogDataT.java b/protocol/java/src/solarxr_protocol/datatypes/LogDataT.java index 8d244ba9..64ee8e53 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/LogDataT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/LogDataT.java @@ -1,28 +1,28 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class LogDataT { - private String message; - private int[] data; - - public String getMessage() { return message; } - - public void setMessage(String message) { this.message = message; } - - public int[] getData() { return data; } - - public void setData(int[] data) { this.data = data; } - - - public LogDataT() { - this.message = null; - this.data = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class LogDataT { + private String message; + private int[] data; + + public String getMessage() { return message; } + + public void setMessage(String message) { this.message = message; } + + public int[] getData() { return data; } + + public void setData(int[] data) { this.data = data; } + + + public LogDataT() { + this.message = null; + this.data = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/String.java b/protocol/java/src/solarxr_protocol/datatypes/String.java new file mode 100644 index 00000000..69699fd3 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/String.java @@ -0,0 +1,59 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class String extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static String getRootAsString(ByteBuffer _bb) { return getRootAsString(_bb, new String()); } + public static String getRootAsString(ByteBuffer _bb, String 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 String __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String s() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer sAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer sInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createString(FlatBufferBuilder builder, + int sOffset) { + builder.startTable(1); + String.addS(builder, sOffset); + return String.endString(builder); + } + + public static void startString(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addS(FlatBufferBuilder builder, int sOffset) { builder.addOffset(0, sOffset, 0); } + public static int endString(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 String get(int j) { return get(new String(), j); } + public String get(String obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StringT unpack() { + StringT _o = new StringT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StringT _o) { + String _oS = s(); + _o.setS(_oS); + } + public static int pack(FlatBufferBuilder builder, StringT _o) { + if (_o == null) return 0; + int _s = _o.getS() == null ? 0 : builder.createString(_o.getS()); + return createString( + builder, + _s); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/StringT.java b/protocol/java/src/solarxr_protocol/datatypes/StringT.java new file mode 100644 index 00000000..a46ae1f3 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/datatypes/StringT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class StringT { + private String s; + + public String getS() { return s; } + + public void setS(String s) { this.s = s; } + + + public StringT() { + this.s = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/Temperature.java b/protocol/java/src/solarxr_protocol/datatypes/Temperature.java index c6022374..917142b7 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/Temperature.java +++ b/protocol/java/src/solarxr_protocol/datatypes/Temperature.java @@ -1,48 +1,48 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Temperature in degrees celsius - */ -@SuppressWarnings("unused") -public final class Temperature extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public Temperature __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public float temp() { return bb.getFloat(bb_pos + 0); } - - public static int createTemperature(FlatBufferBuilder builder, float temp) { - builder.prep(4, 4); - builder.putFloat(temp); - return builder.offset(); - } - - 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 Temperature get(int j) { return get(new Temperature(), j); } - public Temperature get(Temperature obj, int j) { return obj.__assign(__element(j), bb); } - } - public TemperatureT unpack() { - TemperatureT _o = new TemperatureT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TemperatureT _o) { - float _oTemp = temp(); - _o.setTemp(_oTemp); - } - public static int pack(FlatBufferBuilder builder, TemperatureT _o) { - if (_o == null) return 0; - return createTemperature( - builder, - _o.getTemp()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Temperature in degrees celsius + */ +@SuppressWarnings("unused") +public final class Temperature extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Temperature __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float temp() { return bb.getFloat(bb_pos + 0); } + + public static int createTemperature(FlatBufferBuilder builder, float temp) { + builder.prep(4, 4); + builder.putFloat(temp); + return builder.offset(); + } + + 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 Temperature get(int j) { return get(new Temperature(), j); } + public Temperature get(Temperature obj, int j) { return obj.__assign(__element(j), bb); } + } + public TemperatureT unpack() { + TemperatureT _o = new TemperatureT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TemperatureT _o) { + float _oTemp = temp(); + _o.setTemp(_oTemp); + } + public static int pack(FlatBufferBuilder builder, TemperatureT _o) { + if (_o == null) return 0; + return createTemperature( + builder, + _o.getTemp()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TemperatureT.java b/protocol/java/src/solarxr_protocol/datatypes/TemperatureT.java index 379ec613..7d1d8268 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TemperatureT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TemperatureT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class TemperatureT { - private float temp; - - public float getTemp() { return temp; } - - public void setTemp(float temp) { this.temp = temp; } - - - public TemperatureT() { - this.temp = 0.0f; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TemperatureT { + private float temp; + + public float getTemp() { return temp; } + + public void setTemp(float temp) { this.temp = temp; } + + + public TemperatureT() { + this.temp = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TrackerId.java b/protocol/java/src/solarxr_protocol/datatypes/TrackerId.java index 7494807c..b4e63931 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TrackerId.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TrackerId.java @@ -1,62 +1,62 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class TrackerId extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static TrackerId getRootAsTrackerId(ByteBuffer _bb) { return getRootAsTrackerId(_bb, new TrackerId()); } - public static TrackerId getRootAsTrackerId(ByteBuffer _bb, TrackerId 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 TrackerId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * The device the tracker is associated with. If there is no hardware device it is - * associated with, this should be `null`. - */ - public solarxr_protocol.datatypes.DeviceId deviceId() { return deviceId(new solarxr_protocol.datatypes.DeviceId()); } - public solarxr_protocol.datatypes.DeviceId deviceId(solarxr_protocol.datatypes.DeviceId obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - /** - * There are possibly multiple trackers per device. This identifies which one. - */ - public int trackerNum() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - - public static void startTrackerId(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addDeviceId(FlatBufferBuilder builder, int deviceIdOffset) { builder.addStruct(0, deviceIdOffset, 0); } - public static void addTrackerNum(FlatBufferBuilder builder, int trackerNum) { builder.addByte(1, (byte) trackerNum, (byte) 0); } - public static int endTrackerId(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 TrackerId get(int j) { return get(new TrackerId(), j); } - public TrackerId get(TrackerId obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TrackerIdT unpack() { - TrackerIdT _o = new TrackerIdT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TrackerIdT _o) { - if (deviceId() != null) deviceId().unpackTo(_o.getDeviceId()); - else _o.setDeviceId(null); - int _oTrackerNum = trackerNum(); - _o.setTrackerNum(_oTrackerNum); - } - public static int pack(FlatBufferBuilder builder, TrackerIdT _o) { - if (_o == null) return 0; - startTrackerId(builder); - addDeviceId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getDeviceId())); - addTrackerNum(builder, _o.getTrackerNum()); - return endTrackerId(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class TrackerId extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TrackerId getRootAsTrackerId(ByteBuffer _bb) { return getRootAsTrackerId(_bb, new TrackerId()); } + public static TrackerId getRootAsTrackerId(ByteBuffer _bb, TrackerId 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 TrackerId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * The device the tracker is associated with. If there is no hardware device it is + * associated with, this should be `null`. + */ + public solarxr_protocol.datatypes.DeviceId deviceId() { return deviceId(new solarxr_protocol.datatypes.DeviceId()); } + public solarxr_protocol.datatypes.DeviceId deviceId(solarxr_protocol.datatypes.DeviceId obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + /** + * There are possibly multiple trackers per device. This identifies which one. + */ + public int trackerNum() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static void startTrackerId(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addDeviceId(FlatBufferBuilder builder, int deviceIdOffset) { builder.addStruct(0, deviceIdOffset, 0); } + public static void addTrackerNum(FlatBufferBuilder builder, int trackerNum) { builder.addByte(1, (byte) trackerNum, (byte) 0); } + public static int endTrackerId(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 TrackerId get(int j) { return get(new TrackerId(), j); } + public TrackerId get(TrackerId obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TrackerIdT unpack() { + TrackerIdT _o = new TrackerIdT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TrackerIdT _o) { + if (deviceId() != null) deviceId().unpackTo(_o.getDeviceId()); + else _o.setDeviceId(null); + int _oTrackerNum = trackerNum(); + _o.setTrackerNum(_oTrackerNum); + } + public static int pack(FlatBufferBuilder builder, TrackerIdT _o) { + if (_o == null) return 0; + startTrackerId(builder); + addDeviceId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getDeviceId())); + addTrackerNum(builder, _o.getTrackerNum()); + return endTrackerId(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TrackerIdT.java b/protocol/java/src/solarxr_protocol/datatypes/TrackerIdT.java index 3296c563..35ad561e 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TrackerIdT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TrackerIdT.java @@ -1,28 +1,28 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class TrackerIdT { - private solarxr_protocol.datatypes.DeviceIdT deviceId; - private int trackerNum; - - public solarxr_protocol.datatypes.DeviceIdT getDeviceId() { return deviceId; } - - public void setDeviceId(solarxr_protocol.datatypes.DeviceIdT deviceId) { this.deviceId = deviceId; } - - public int getTrackerNum() { return trackerNum; } - - public void setTrackerNum(int trackerNum) { this.trackerNum = trackerNum; } - - - public TrackerIdT() { - this.deviceId = new solarxr_protocol.datatypes.DeviceIdT(); - this.trackerNum = 0; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TrackerIdT { + private solarxr_protocol.datatypes.DeviceIdT deviceId; + private int trackerNum; + + public solarxr_protocol.datatypes.DeviceIdT getDeviceId() { return deviceId; } + + public void setDeviceId(solarxr_protocol.datatypes.DeviceIdT deviceId) { this.deviceId = deviceId; } + + public int getTrackerNum() { return trackerNum; } + + public void setTrackerNum(int trackerNum) { this.trackerNum = trackerNum; } + + + public TrackerIdT() { + this.deviceId = new solarxr_protocol.datatypes.DeviceIdT(); + this.trackerNum = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TrackerRole.java b/protocol/java/src/solarxr_protocol/datatypes/TrackerRole.java index d0a4774f..65202716 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TrackerRole.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TrackerRole.java @@ -1,41 +1,41 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -/** - * Possible tracker roles - * They're not perfect match for SteamVR tracker roles, - * because we support more possible roles. Host can - * chose how to map it to their supported role. - */ -@SuppressWarnings("unused") -public final class TrackerRole { - private TrackerRole() { } - public static final int NONE = 0; - public static final int WAIST = 1; - public static final int LEFT_FOOT = 2; - public static final int RIGHT_FOOT = 3; - public static final int CHEST = 4; - public static final int LEFT_KNEE = 5; - public static final int RIGHT_KNEE = 6; - public static final int LEFT_ELBOW = 7; - public static final int RIGHT_ELBOW = 8; - public static final int LEFT_SHOULDER = 9; - public static final int RIGHT_SHOULDER = 10; - public static final int LEFT_HAND = 11; - public static final int RIGHT_HAND = 12; - public static final int LEFT_CONTROLLER = 13; - public static final int RIGHT_CONTROLLER = 14; - public static final int HEAD = 15; - public static final int NECK = 16; - public static final int CAMERA = 17; - public static final int KEYBOARD = 18; - public static final int HMD = 19; - public static final int BEACON = 20; - public static final int GENERIC_CONTROLLER = 21; - - public static final String[] names = { "NONE", "WAIST", "LEFT_FOOT", "RIGHT_FOOT", "CHEST", "LEFT_KNEE", "RIGHT_KNEE", "LEFT_ELBOW", "RIGHT_ELBOW", "LEFT_SHOULDER", "RIGHT_SHOULDER", "LEFT_HAND", "RIGHT_HAND", "LEFT_CONTROLLER", "RIGHT_CONTROLLER", "HEAD", "NECK", "CAMERA", "KEYBOARD", "HMD", "BEACON", "GENERIC_CONTROLLER", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +/** + * Possible tracker roles + * They're not perfect match for SteamVR tracker roles, + * because we support more possible roles. Host can + * chose how to map it to their supported role. + */ +@SuppressWarnings("unused") +public final class TrackerRole { + private TrackerRole() { } + public static final int NONE = 0; + public static final int WAIST = 1; + public static final int LEFT_FOOT = 2; + public static final int RIGHT_FOOT = 3; + public static final int CHEST = 4; + public static final int LEFT_KNEE = 5; + public static final int RIGHT_KNEE = 6; + public static final int LEFT_ELBOW = 7; + public static final int RIGHT_ELBOW = 8; + public static final int LEFT_SHOULDER = 9; + public static final int RIGHT_SHOULDER = 10; + public static final int LEFT_HAND = 11; + public static final int RIGHT_HAND = 12; + public static final int LEFT_CONTROLLER = 13; + public static final int RIGHT_CONTROLLER = 14; + public static final int HEAD = 15; + public static final int NECK = 16; + public static final int CAMERA = 17; + public static final int KEYBOARD = 18; + public static final int HMD = 19; + public static final int BEACON = 20; + public static final int GENERIC_CONTROLLER = 21; + + public static final String[] names = { "NONE", "WAIST", "LEFT_FOOT", "RIGHT_FOOT", "CHEST", "LEFT_KNEE", "RIGHT_KNEE", "LEFT_ELBOW", "RIGHT_ELBOW", "LEFT_SHOULDER", "RIGHT_SHOULDER", "LEFT_HAND", "RIGHT_HAND", "LEFT_CONTROLLER", "RIGHT_CONTROLLER", "HEAD", "NECK", "CAMERA", "KEYBOARD", "HMD", "BEACON", "GENERIC_CONTROLLER", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java b/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java index 0dae547a..0babf123 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TrackerStatus.java @@ -1,19 +1,19 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -@SuppressWarnings("unused") -public final class TrackerStatus { - private TrackerStatus() { } - public static final int NONE = 0; - public static final int DISCONNECTED = 1; - public static final int OK = 2; - public static final int BUSY = 3; - public static final int ERROR = 4; - public static final int OCCLUDED = 5; - - public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +@SuppressWarnings("unused") +public final class TrackerStatus { + private TrackerStatus() { } + public static final int NONE = 0; + public static final int DISCONNECTED = 1; + public static final int OK = 2; + public static final int BUSY = 3; + public static final int ERROR = 4; + public static final int OCCLUDED = 5; + + public static final String[] names = { "NONE", "DISCONNECTED", "OK", "BUSY", "ERROR", "OCCLUDED", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TransactionId.java b/protocol/java/src/solarxr_protocol/datatypes/TransactionId.java index 54dfb2e1..7699e024 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TransactionId.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TransactionId.java @@ -1,48 +1,48 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class TransactionId extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public TransactionId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * This is expected to overflow, networking logic should handle this case. - */ - public long id() { return (long)bb.getInt(bb_pos + 0) & 0xFFFFFFFFL; } - - public static int createTransactionId(FlatBufferBuilder builder, long id) { - builder.prep(4, 4); - builder.putInt((int) id); - return builder.offset(); - } - - 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 TransactionId get(int j) { return get(new TransactionId(), j); } - public TransactionId get(TransactionId obj, int j) { return obj.__assign(__element(j), bb); } - } - public TransactionIdT unpack() { - TransactionIdT _o = new TransactionIdT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TransactionIdT _o) { - long _oId = id(); - _o.setId(_oId); - } - public static int pack(FlatBufferBuilder builder, TransactionIdT _o) { - if (_o == null) return 0; - return createTransactionId( - builder, - _o.getId()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class TransactionId extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public TransactionId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * This is expected to overflow, networking logic should handle this case. + */ + public long id() { return (long)bb.getInt(bb_pos + 0) & 0xFFFFFFFFL; } + + public static int createTransactionId(FlatBufferBuilder builder, long id) { + builder.prep(4, 4); + builder.putInt((int) id); + return builder.offset(); + } + + 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 TransactionId get(int j) { return get(new TransactionId(), j); } + public TransactionId get(TransactionId obj, int j) { return obj.__assign(__element(j), bb); } + } + public TransactionIdT unpack() { + TransactionIdT _o = new TransactionIdT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TransactionIdT _o) { + long _oId = id(); + _o.setId(_oId); + } + public static int pack(FlatBufferBuilder builder, TransactionIdT _o) { + if (_o == null) return 0; + return createTransactionId( + builder, + _o.getId()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/TransactionIdT.java b/protocol/java/src/solarxr_protocol/datatypes/TransactionIdT.java index 73f64ff8..0bbfd947 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/TransactionIdT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/TransactionIdT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class TransactionIdT { - private long id; - - public long getId() { return id; } - - public void setId(long id) { this.id = id; } - - - public TransactionIdT() { - this.id = 0L; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TransactionIdT { + private long id; + + public long getId() { return id; } + + public void setId(long id) { this.id = id; } + + + public TransactionIdT() { + this.id = 0L; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.java index e1d9d873..3e456322 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMask.java @@ -1,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * A mask of the data in `FirmwareStatus` - */ -@SuppressWarnings("unused") -public final class FirmwareStatusMask extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static FirmwareStatusMask getRootAsFirmwareStatusMask(ByteBuffer _bb) { return getRootAsFirmwareStatusMask(_bb, new FirmwareStatusMask()); } - public static FirmwareStatusMask getRootAsFirmwareStatusMask(ByteBuffer _bb, FirmwareStatusMask 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 FirmwareStatusMask __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean errorStatus() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean tps() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean ping() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean rssi() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean mcuTemp() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean batteryVoltage() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean batteryPctEstimate() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createFirmwareStatusMask(FlatBufferBuilder builder, - boolean errorStatus, - boolean tps, - boolean ping, - boolean rssi, - boolean mcuTemp, - boolean batteryVoltage, - boolean batteryPctEstimate) { - builder.startTable(7); - FirmwareStatusMask.addBatteryPctEstimate(builder, batteryPctEstimate); - FirmwareStatusMask.addBatteryVoltage(builder, batteryVoltage); - FirmwareStatusMask.addMcuTemp(builder, mcuTemp); - FirmwareStatusMask.addRssi(builder, rssi); - FirmwareStatusMask.addPing(builder, ping); - FirmwareStatusMask.addTps(builder, tps); - FirmwareStatusMask.addErrorStatus(builder, errorStatus); - return FirmwareStatusMask.endFirmwareStatusMask(builder); - } - - public static void startFirmwareStatusMask(FlatBufferBuilder builder) { builder.startTable(7); } - public static void addErrorStatus(FlatBufferBuilder builder, boolean errorStatus) { builder.addBoolean(0, errorStatus, false); } - public static void addTps(FlatBufferBuilder builder, boolean tps) { builder.addBoolean(1, tps, false); } - public static void addPing(FlatBufferBuilder builder, boolean ping) { builder.addBoolean(2, ping, false); } - public static void addRssi(FlatBufferBuilder builder, boolean rssi) { builder.addBoolean(3, rssi, false); } - public static void addMcuTemp(FlatBufferBuilder builder, boolean mcuTemp) { builder.addBoolean(4, mcuTemp, false); } - public static void addBatteryVoltage(FlatBufferBuilder builder, boolean batteryVoltage) { builder.addBoolean(5, batteryVoltage, false); } - public static void addBatteryPctEstimate(FlatBufferBuilder builder, boolean batteryPctEstimate) { builder.addBoolean(6, batteryPctEstimate, false); } - public static int endFirmwareStatusMask(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 FirmwareStatusMask get(int j) { return get(new FirmwareStatusMask(), j); } - public FirmwareStatusMask get(FirmwareStatusMask obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public FirmwareStatusMaskT unpack() { - FirmwareStatusMaskT _o = new FirmwareStatusMaskT(); - unpackTo(_o); - return _o; - } - public void unpackTo(FirmwareStatusMaskT _o) { - boolean _oErrorStatus = errorStatus(); - _o.setErrorStatus(_oErrorStatus); - boolean _oTps = tps(); - _o.setTps(_oTps); - boolean _oPing = ping(); - _o.setPing(_oPing); - boolean _oRssi = rssi(); - _o.setRssi(_oRssi); - boolean _oMcuTemp = mcuTemp(); - _o.setMcuTemp(_oMcuTemp); - boolean _oBatteryVoltage = batteryVoltage(); - _o.setBatteryVoltage(_oBatteryVoltage); - boolean _oBatteryPctEstimate = batteryPctEstimate(); - _o.setBatteryPctEstimate(_oBatteryPctEstimate); - } - public static int pack(FlatBufferBuilder builder, FirmwareStatusMaskT _o) { - if (_o == null) return 0; - return createFirmwareStatusMask( - builder, - _o.getErrorStatus(), - _o.getTps(), - _o.getPing(), - _o.getRssi(), - _o.getMcuTemp(), - _o.getBatteryVoltage(), - _o.getBatteryPctEstimate()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A mask of the data in `FirmwareStatus` + */ +@SuppressWarnings("unused") +public final class FirmwareStatusMask extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static FirmwareStatusMask getRootAsFirmwareStatusMask(ByteBuffer _bb) { return getRootAsFirmwareStatusMask(_bb, new FirmwareStatusMask()); } + public static FirmwareStatusMask getRootAsFirmwareStatusMask(ByteBuffer _bb, FirmwareStatusMask 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 FirmwareStatusMask __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean errorStatus() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean tps() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean ping() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean rssi() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean mcuTemp() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean batteryVoltage() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean batteryPctEstimate() { int o = __offset(16); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createFirmwareStatusMask(FlatBufferBuilder builder, + boolean errorStatus, + boolean tps, + boolean ping, + boolean rssi, + boolean mcuTemp, + boolean batteryVoltage, + boolean batteryPctEstimate) { + builder.startTable(7); + FirmwareStatusMask.addBatteryPctEstimate(builder, batteryPctEstimate); + FirmwareStatusMask.addBatteryVoltage(builder, batteryVoltage); + FirmwareStatusMask.addMcuTemp(builder, mcuTemp); + FirmwareStatusMask.addRssi(builder, rssi); + FirmwareStatusMask.addPing(builder, ping); + FirmwareStatusMask.addTps(builder, tps); + FirmwareStatusMask.addErrorStatus(builder, errorStatus); + return FirmwareStatusMask.endFirmwareStatusMask(builder); + } + + public static void startFirmwareStatusMask(FlatBufferBuilder builder) { builder.startTable(7); } + public static void addErrorStatus(FlatBufferBuilder builder, boolean errorStatus) { builder.addBoolean(0, errorStatus, false); } + public static void addTps(FlatBufferBuilder builder, boolean tps) { builder.addBoolean(1, tps, false); } + public static void addPing(FlatBufferBuilder builder, boolean ping) { builder.addBoolean(2, ping, false); } + public static void addRssi(FlatBufferBuilder builder, boolean rssi) { builder.addBoolean(3, rssi, false); } + public static void addMcuTemp(FlatBufferBuilder builder, boolean mcuTemp) { builder.addBoolean(4, mcuTemp, false); } + public static void addBatteryVoltage(FlatBufferBuilder builder, boolean batteryVoltage) { builder.addBoolean(5, batteryVoltage, false); } + public static void addBatteryPctEstimate(FlatBufferBuilder builder, boolean batteryPctEstimate) { builder.addBoolean(6, batteryPctEstimate, false); } + public static int endFirmwareStatusMask(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 FirmwareStatusMask get(int j) { return get(new FirmwareStatusMask(), j); } + public FirmwareStatusMask get(FirmwareStatusMask obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FirmwareStatusMaskT unpack() { + FirmwareStatusMaskT _o = new FirmwareStatusMaskT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FirmwareStatusMaskT _o) { + boolean _oErrorStatus = errorStatus(); + _o.setErrorStatus(_oErrorStatus); + boolean _oTps = tps(); + _o.setTps(_oTps); + boolean _oPing = ping(); + _o.setPing(_oPing); + boolean _oRssi = rssi(); + _o.setRssi(_oRssi); + boolean _oMcuTemp = mcuTemp(); + _o.setMcuTemp(_oMcuTemp); + boolean _oBatteryVoltage = batteryVoltage(); + _o.setBatteryVoltage(_oBatteryVoltage); + boolean _oBatteryPctEstimate = batteryPctEstimate(); + _o.setBatteryPctEstimate(_oBatteryPctEstimate); + } + public static int pack(FlatBufferBuilder builder, FirmwareStatusMaskT _o) { + if (_o == null) return 0; + return createFirmwareStatusMask( + builder, + _o.getErrorStatus(), + _o.getTps(), + _o.getPing(), + _o.getRssi(), + _o.getMcuTemp(), + _o.getBatteryVoltage(), + _o.getBatteryPctEstimate()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMaskT.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMaskT.java index ff0d2dfc..48d8f157 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMaskT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/FirmwareStatusMaskT.java @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class FirmwareStatusMaskT { - private boolean errorStatus; - private boolean tps; - private boolean ping; - private boolean rssi; - private boolean mcuTemp; - private boolean batteryVoltage; - private boolean batteryPctEstimate; - - public boolean getErrorStatus() { return errorStatus; } - - public void setErrorStatus(boolean errorStatus) { this.errorStatus = errorStatus; } - - public boolean getTps() { return tps; } - - public void setTps(boolean tps) { this.tps = tps; } - - public boolean getPing() { return ping; } - - public void setPing(boolean ping) { this.ping = ping; } - - public boolean getRssi() { return rssi; } - - public void setRssi(boolean rssi) { this.rssi = rssi; } - - public boolean getMcuTemp() { return mcuTemp; } - - public void setMcuTemp(boolean mcuTemp) { this.mcuTemp = mcuTemp; } - - public boolean getBatteryVoltage() { return batteryVoltage; } - - public void setBatteryVoltage(boolean batteryVoltage) { this.batteryVoltage = batteryVoltage; } - - public boolean getBatteryPctEstimate() { return batteryPctEstimate; } - - public void setBatteryPctEstimate(boolean batteryPctEstimate) { this.batteryPctEstimate = batteryPctEstimate; } - - - public FirmwareStatusMaskT() { - this.errorStatus = false; - this.tps = false; - this.ping = false; - this.rssi = false; - this.mcuTemp = false; - this.batteryVoltage = false; - this.batteryPctEstimate = false; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class FirmwareStatusMaskT { + private boolean errorStatus; + private boolean tps; + private boolean ping; + private boolean rssi; + private boolean mcuTemp; + private boolean batteryVoltage; + private boolean batteryPctEstimate; + + public boolean getErrorStatus() { return errorStatus; } + + public void setErrorStatus(boolean errorStatus) { this.errorStatus = errorStatus; } + + public boolean getTps() { return tps; } + + public void setTps(boolean tps) { this.tps = tps; } + + public boolean getPing() { return ping; } + + public void setPing(boolean ping) { this.ping = ping; } + + public boolean getRssi() { return rssi; } + + public void setRssi(boolean rssi) { this.rssi = rssi; } + + public boolean getMcuTemp() { return mcuTemp; } + + public void setMcuTemp(boolean mcuTemp) { this.mcuTemp = mcuTemp; } + + public boolean getBatteryVoltage() { return batteryVoltage; } + + public void setBatteryVoltage(boolean batteryVoltage) { this.batteryVoltage = batteryVoltage; } + + public boolean getBatteryPctEstimate() { return batteryPctEstimate; } + + public void setBatteryPctEstimate(boolean batteryPctEstimate) { this.batteryPctEstimate = batteryPctEstimate; } + + + public FirmwareStatusMaskT() { + this.errorStatus = false; + this.tps = false; + this.ping = false; + this.rssi = false; + this.mcuTemp = false; + this.batteryVoltage = false; + this.batteryPctEstimate = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.java index 3bf72605..101fc32e 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddress.java @@ -1,50 +1,50 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * A MAC address or a bluetooth address, or some other uniquely identifying address - * associated with the endpoint that we are communicating with. If it doesn't take - * up the full set of bytes, it is aligned towards the least significant bits. - */ -@SuppressWarnings("unused") -public final class HardwareAddress extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public HardwareAddress __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public long addr() { return bb.getLong(bb_pos + 0); } - - public static int createHardwareAddress(FlatBufferBuilder builder, long addr) { - builder.prep(8, 8); - builder.putLong(addr); - return builder.offset(); - } - - 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 HardwareAddress get(int j) { return get(new HardwareAddress(), j); } - public HardwareAddress get(HardwareAddress obj, int j) { return obj.__assign(__element(j), bb); } - } - public HardwareAddressT unpack() { - HardwareAddressT _o = new HardwareAddressT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HardwareAddressT _o) { - long _oAddr = addr(); - _o.setAddr(_oAddr); - } - public static int pack(FlatBufferBuilder builder, HardwareAddressT _o) { - if (_o == null) return 0; - return createHardwareAddress( - builder, - _o.getAddr()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A MAC address or a bluetooth address, or some other uniquely identifying address + * associated with the endpoint that we are communicating with. If it doesn't take + * up the full set of bytes, it is aligned towards the least significant bits. + */ +@SuppressWarnings("unused") +public final class HardwareAddress extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public HardwareAddress __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long addr() { return bb.getLong(bb_pos + 0); } + + public static int createHardwareAddress(FlatBufferBuilder builder, long addr) { + builder.prep(8, 8); + builder.putLong(addr); + return builder.offset(); + } + + 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 HardwareAddress get(int j) { return get(new HardwareAddress(), j); } + public HardwareAddress get(HardwareAddress obj, int j) { return obj.__assign(__element(j), bb); } + } + public HardwareAddressT unpack() { + HardwareAddressT _o = new HardwareAddressT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HardwareAddressT _o) { + long _oAddr = addr(); + _o.setAddr(_oAddr); + } + public static int pack(FlatBufferBuilder builder, HardwareAddressT _o) { + if (_o == null) return 0; + return createHardwareAddress( + builder, + _o.getAddr()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddressT.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddressT.java index 335a65bd..621d89a5 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddressT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareAddressT.java @@ -1,22 +1,22 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class HardwareAddressT { - private long addr; - - public long getAddr() { return addr; } - - public void setAddr(long addr) { this.addr = addr; } - - - public HardwareAddressT() { - this.addr = 0L; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class HardwareAddressT { + private long addr; + + public long getAddr() { return addr; } + + public void setAddr(long addr) { this.addr = addr; } + + + public HardwareAddressT() { + this.addr = 0L; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java index 505e8a24..de0c10a0 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfo.java @@ -1,119 +1,119 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Mostly static info about the device's hardware/firmware. - */ -@SuppressWarnings("unused") -public final class HardwareInfo extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static HardwareInfo getRootAsHardwareInfo(ByteBuffer _bb) { return getRootAsHardwareInfo(_bb, new HardwareInfo()); } - public static HardwareInfo getRootAsHardwareInfo(ByteBuffer _bb, HardwareInfo 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 HardwareInfo __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int mcuId() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - /** - * A human-friendly name to display as the name of the device. - */ - public String displayName() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - /** - * A human-friendly string for the device model. - */ - public String model() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer modelAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } - public ByteBuffer modelInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } - /** - * A human-friendly string for the manufacturer of the device. - */ - public String manufacturer() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer manufacturerAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } - public ByteBuffer manufacturerInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } - /** - * The hardware version of the device. For example, pcb version. - */ - public String hardwareRevision() { int o = __offset(12); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer hardwareRevisionAsByteBuffer() { return __vector_as_bytebuffer(12, 1); } - public ByteBuffer hardwareRevisionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); } - /** - * The version of the slimevr firmware that the device is running. - */ - public String firmwareVersion() { int o = __offset(14); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer firmwareVersionAsByteBuffer() { return __vector_as_bytebuffer(14, 1); } - public ByteBuffer firmwareVersionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } - public solarxr_protocol.datatypes.hardware_info.HardwareAddress hardwareAddress() { return hardwareAddress(new solarxr_protocol.datatypes.hardware_info.HardwareAddress()); } - public solarxr_protocol.datatypes.hardware_info.HardwareAddress hardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddress obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - public solarxr_protocol.datatypes.Ipv4Address ipAddress() { return ipAddress(new solarxr_protocol.datatypes.Ipv4Address()); } - public solarxr_protocol.datatypes.Ipv4Address ipAddress(solarxr_protocol.datatypes.Ipv4Address obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - - public static void startHardwareInfo(FlatBufferBuilder builder) { builder.startTable(8); } - public static void addMcuId(FlatBufferBuilder builder, int mcuId) { builder.addShort(0, (short) mcuId, (short) 0); } - public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(1, displayNameOffset, 0); } - public static void addModel(FlatBufferBuilder builder, int modelOffset) { builder.addOffset(2, modelOffset, 0); } - public static void addManufacturer(FlatBufferBuilder builder, int manufacturerOffset) { builder.addOffset(3, manufacturerOffset, 0); } - public static void addHardwareRevision(FlatBufferBuilder builder, int hardwareRevisionOffset) { builder.addOffset(4, hardwareRevisionOffset, 0); } - public static void addFirmwareVersion(FlatBufferBuilder builder, int firmwareVersionOffset) { builder.addOffset(5, firmwareVersionOffset, 0); } - public static void addHardwareAddress(FlatBufferBuilder builder, int hardwareAddressOffset) { builder.addStruct(6, hardwareAddressOffset, 0); } - public static void addIpAddress(FlatBufferBuilder builder, int ipAddressOffset) { builder.addStruct(7, ipAddressOffset, 0); } - public static int endHardwareInfo(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 HardwareInfo get(int j) { return get(new HardwareInfo(), j); } - public HardwareInfo get(HardwareInfo obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public HardwareInfoT unpack() { - HardwareInfoT _o = new HardwareInfoT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HardwareInfoT _o) { - int _oMcuId = mcuId(); - _o.setMcuId(_oMcuId); - String _oDisplayName = displayName(); - _o.setDisplayName(_oDisplayName); - String _oModel = model(); - _o.setModel(_oModel); - String _oManufacturer = manufacturer(); - _o.setManufacturer(_oManufacturer); - String _oHardwareRevision = hardwareRevision(); - _o.setHardwareRevision(_oHardwareRevision); - String _oFirmwareVersion = firmwareVersion(); - _o.setFirmwareVersion(_oFirmwareVersion); - if (hardwareAddress() != null) hardwareAddress().unpackTo(_o.getHardwareAddress()); - else _o.setHardwareAddress(null); - if (ipAddress() != null) ipAddress().unpackTo(_o.getIpAddress()); - else _o.setIpAddress(null); - } - public static int pack(FlatBufferBuilder builder, HardwareInfoT _o) { - if (_o == null) return 0; - int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); - int _model = _o.getModel() == null ? 0 : builder.createString(_o.getModel()); - int _manufacturer = _o.getManufacturer() == null ? 0 : builder.createString(_o.getManufacturer()); - int _hardwareRevision = _o.getHardwareRevision() == null ? 0 : builder.createString(_o.getHardwareRevision()); - int _firmwareVersion = _o.getFirmwareVersion() == null ? 0 : builder.createString(_o.getFirmwareVersion()); - startHardwareInfo(builder); - addMcuId(builder, _o.getMcuId()); - addDisplayName(builder, _displayName); - addModel(builder, _model); - addManufacturer(builder, _manufacturer); - addHardwareRevision(builder, _hardwareRevision); - addFirmwareVersion(builder, _firmwareVersion); - addHardwareAddress(builder, solarxr_protocol.datatypes.hardware_info.HardwareAddress.pack(builder, _o.getHardwareAddress())); - addIpAddress(builder, solarxr_protocol.datatypes.Ipv4Address.pack(builder, _o.getIpAddress())); - return endHardwareInfo(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Mostly static info about the device's hardware/firmware. + */ +@SuppressWarnings("unused") +public final class HardwareInfo extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static HardwareInfo getRootAsHardwareInfo(ByteBuffer _bb) { return getRootAsHardwareInfo(_bb, new HardwareInfo()); } + public static HardwareInfo getRootAsHardwareInfo(ByteBuffer _bb, HardwareInfo 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 HardwareInfo __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int mcuId() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + /** + * A human-friendly name to display as the name of the device. + */ + public String displayName() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + /** + * A human-friendly string for the device model. + */ + public String model() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer modelAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer modelInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + /** + * A human-friendly string for the manufacturer of the device. + */ + public String manufacturer() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer manufacturerAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } + public ByteBuffer manufacturerInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } + /** + * The hardware version of the device. For example, pcb version. + */ + public String hardwareRevision() { int o = __offset(12); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer hardwareRevisionAsByteBuffer() { return __vector_as_bytebuffer(12, 1); } + public ByteBuffer hardwareRevisionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 12, 1); } + /** + * The version of the slimevr firmware that the device is running. + */ + public String firmwareVersion() { int o = __offset(14); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer firmwareVersionAsByteBuffer() { return __vector_as_bytebuffer(14, 1); } + public ByteBuffer firmwareVersionInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 14, 1); } + public solarxr_protocol.datatypes.hardware_info.HardwareAddress hardwareAddress() { return hardwareAddress(new solarxr_protocol.datatypes.hardware_info.HardwareAddress()); } + public solarxr_protocol.datatypes.hardware_info.HardwareAddress hardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddress obj) { int o = __offset(16); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + public solarxr_protocol.datatypes.Ipv4Address ipAddress() { return ipAddress(new solarxr_protocol.datatypes.Ipv4Address()); } + public solarxr_protocol.datatypes.Ipv4Address ipAddress(solarxr_protocol.datatypes.Ipv4Address obj) { int o = __offset(18); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + + public static void startHardwareInfo(FlatBufferBuilder builder) { builder.startTable(8); } + public static void addMcuId(FlatBufferBuilder builder, int mcuId) { builder.addShort(0, (short) mcuId, (short) 0); } + public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(1, displayNameOffset, 0); } + public static void addModel(FlatBufferBuilder builder, int modelOffset) { builder.addOffset(2, modelOffset, 0); } + public static void addManufacturer(FlatBufferBuilder builder, int manufacturerOffset) { builder.addOffset(3, manufacturerOffset, 0); } + public static void addHardwareRevision(FlatBufferBuilder builder, int hardwareRevisionOffset) { builder.addOffset(4, hardwareRevisionOffset, 0); } + public static void addFirmwareVersion(FlatBufferBuilder builder, int firmwareVersionOffset) { builder.addOffset(5, firmwareVersionOffset, 0); } + public static void addHardwareAddress(FlatBufferBuilder builder, int hardwareAddressOffset) { builder.addStruct(6, hardwareAddressOffset, 0); } + public static void addIpAddress(FlatBufferBuilder builder, int ipAddressOffset) { builder.addStruct(7, ipAddressOffset, 0); } + public static int endHardwareInfo(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 HardwareInfo get(int j) { return get(new HardwareInfo(), j); } + public HardwareInfo get(HardwareInfo obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public HardwareInfoT unpack() { + HardwareInfoT _o = new HardwareInfoT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HardwareInfoT _o) { + int _oMcuId = mcuId(); + _o.setMcuId(_oMcuId); + String _oDisplayName = displayName(); + _o.setDisplayName(_oDisplayName); + String _oModel = model(); + _o.setModel(_oModel); + String _oManufacturer = manufacturer(); + _o.setManufacturer(_oManufacturer); + String _oHardwareRevision = hardwareRevision(); + _o.setHardwareRevision(_oHardwareRevision); + String _oFirmwareVersion = firmwareVersion(); + _o.setFirmwareVersion(_oFirmwareVersion); + if (hardwareAddress() != null) hardwareAddress().unpackTo(_o.getHardwareAddress()); + else _o.setHardwareAddress(null); + if (ipAddress() != null) ipAddress().unpackTo(_o.getIpAddress()); + else _o.setIpAddress(null); + } + public static int pack(FlatBufferBuilder builder, HardwareInfoT _o) { + if (_o == null) return 0; + int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); + int _model = _o.getModel() == null ? 0 : builder.createString(_o.getModel()); + int _manufacturer = _o.getManufacturer() == null ? 0 : builder.createString(_o.getManufacturer()); + int _hardwareRevision = _o.getHardwareRevision() == null ? 0 : builder.createString(_o.getHardwareRevision()); + int _firmwareVersion = _o.getFirmwareVersion() == null ? 0 : builder.createString(_o.getFirmwareVersion()); + startHardwareInfo(builder); + addMcuId(builder, _o.getMcuId()); + addDisplayName(builder, _displayName); + addModel(builder, _model); + addManufacturer(builder, _manufacturer); + addHardwareRevision(builder, _hardwareRevision); + addFirmwareVersion(builder, _firmwareVersion); + addHardwareAddress(builder, solarxr_protocol.datatypes.hardware_info.HardwareAddress.pack(builder, _o.getHardwareAddress())); + addIpAddress(builder, solarxr_protocol.datatypes.Ipv4Address.pack(builder, _o.getIpAddress())); + return endHardwareInfo(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java index a7db6f56..7c5c0855 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareInfoT.java @@ -1,64 +1,64 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class HardwareInfoT { - private int mcuId; - private String displayName; - private String model; - private String manufacturer; - private String hardwareRevision; - private String firmwareVersion; - private solarxr_protocol.datatypes.hardware_info.HardwareAddressT hardwareAddress; - private solarxr_protocol.datatypes.Ipv4AddressT ipAddress; - - public int getMcuId() { return mcuId; } - - public void setMcuId(int mcuId) { this.mcuId = mcuId; } - - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { this.displayName = displayName; } - - public String getModel() { return model; } - - public void setModel(String model) { this.model = model; } - - public String getManufacturer() { return manufacturer; } - - public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } - - public String getHardwareRevision() { return hardwareRevision; } - - public void setHardwareRevision(String hardwareRevision) { this.hardwareRevision = hardwareRevision; } - - public String getFirmwareVersion() { return firmwareVersion; } - - public void setFirmwareVersion(String firmwareVersion) { this.firmwareVersion = firmwareVersion; } - - public solarxr_protocol.datatypes.hardware_info.HardwareAddressT getHardwareAddress() { return hardwareAddress; } - - public void setHardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddressT hardwareAddress) { this.hardwareAddress = hardwareAddress; } - - public solarxr_protocol.datatypes.Ipv4AddressT getIpAddress() { return ipAddress; } - - public void setIpAddress(solarxr_protocol.datatypes.Ipv4AddressT ipAddress) { this.ipAddress = ipAddress; } - - - public HardwareInfoT() { - this.mcuId = 0; - this.displayName = null; - this.model = null; - this.manufacturer = null; - this.hardwareRevision = null; - this.firmwareVersion = null; - this.hardwareAddress = new solarxr_protocol.datatypes.hardware_info.HardwareAddressT(); - this.ipAddress = new solarxr_protocol.datatypes.Ipv4AddressT(); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class HardwareInfoT { + private int mcuId; + private String displayName; + private String model; + private String manufacturer; + private String hardwareRevision; + private String firmwareVersion; + private solarxr_protocol.datatypes.hardware_info.HardwareAddressT hardwareAddress; + private solarxr_protocol.datatypes.Ipv4AddressT ipAddress; + + public int getMcuId() { return mcuId; } + + public void setMcuId(int mcuId) { this.mcuId = mcuId; } + + public String getDisplayName() { return displayName; } + + public void setDisplayName(String displayName) { this.displayName = displayName; } + + public String getModel() { return model; } + + public void setModel(String model) { this.model = model; } + + public String getManufacturer() { return manufacturer; } + + public void setManufacturer(String manufacturer) { this.manufacturer = manufacturer; } + + public String getHardwareRevision() { return hardwareRevision; } + + public void setHardwareRevision(String hardwareRevision) { this.hardwareRevision = hardwareRevision; } + + public String getFirmwareVersion() { return firmwareVersion; } + + public void setFirmwareVersion(String firmwareVersion) { this.firmwareVersion = firmwareVersion; } + + public solarxr_protocol.datatypes.hardware_info.HardwareAddressT getHardwareAddress() { return hardwareAddress; } + + public void setHardwareAddress(solarxr_protocol.datatypes.hardware_info.HardwareAddressT hardwareAddress) { this.hardwareAddress = hardwareAddress; } + + public solarxr_protocol.datatypes.Ipv4AddressT getIpAddress() { return ipAddress; } + + public void setIpAddress(solarxr_protocol.datatypes.Ipv4AddressT ipAddress) { this.ipAddress = ipAddress; } + + + public HardwareInfoT() { + this.mcuId = 0; + this.displayName = null; + this.model = null; + this.manufacturer = null; + this.hardwareRevision = null; + this.firmwareVersion = null; + this.hardwareAddress = new solarxr_protocol.datatypes.hardware_info.HardwareAddressT(); + this.ipAddress = new solarxr_protocol.datatypes.Ipv4AddressT(); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java index af04beaa..49d44e23 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java @@ -1,123 +1,123 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Mostly-dynamic status info about a tracked device's firmware - */ -@SuppressWarnings("unused") -public final class HardwareStatus extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static HardwareStatus getRootAsHardwareStatus(ByteBuffer _bb) { return getRootAsHardwareStatus(_bb, new HardwareStatus()); } - public static HardwareStatus getRootAsHardwareStatus(ByteBuffer _bb, HardwareStatus 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 HardwareStatus __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasErrorStatus() { return 0 != __offset(4); } - public int errorStatus() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public boolean hasTps() { return 0 != __offset(6); } - public int tps() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public boolean hasPing() { return 0 != __offset(8); } - public int ping() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } - /** - * “Received Signal Strength Indicator" between device and wifi adapter in dBm - */ - public boolean hasRssi() { return 0 != __offset(10); } - public short rssi() { int o = __offset(10); return o != 0 ? bb.getShort(o + bb_pos) : 0; } - /** - * Temperature in degrees celsius - */ - public boolean hasMcuTemp() { return 0 != __offset(12); } - public float mcuTemp() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasBatteryVoltage() { return 0 != __offset(14); } - public float batteryVoltage() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasBatteryPctEstimate() { return 0 != __offset(16); } - public int batteryPctEstimate() { int o = __offset(16); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public solarxr_protocol.datatypes.LogData logData() { return logData(new solarxr_protocol.datatypes.LogData()); } - public solarxr_protocol.datatypes.LogData logData(solarxr_protocol.datatypes.LogData obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createHardwareStatus(FlatBufferBuilder builder, - int errorStatus, - int tps, - int ping, - short rssi, - float mcuTemp, - float batteryVoltage, - int batteryPctEstimate, - int logDataOffset) { - builder.startTable(8); - HardwareStatus.addLogData(builder, logDataOffset); - HardwareStatus.addBatteryVoltage(builder, batteryVoltage); - HardwareStatus.addMcuTemp(builder, mcuTemp); - HardwareStatus.addRssi(builder, rssi); - HardwareStatus.addPing(builder, ping); - HardwareStatus.addBatteryPctEstimate(builder, batteryPctEstimate); - HardwareStatus.addTps(builder, tps); - HardwareStatus.addErrorStatus(builder, errorStatus); - return HardwareStatus.endHardwareStatus(builder); - } - - public static void startHardwareStatus(FlatBufferBuilder builder) { builder.startTable(8); } - public static void addErrorStatus(FlatBufferBuilder builder, int errorStatus) { builder.addByte(0, (byte) errorStatus, (byte) 0); } - public static void addTps(FlatBufferBuilder builder, int tps) { builder.addByte(1, (byte) tps, (byte) 0); } - public static void addPing(FlatBufferBuilder builder, int ping) { builder.addShort(2, (short) ping, (short) 0); } - public static void addRssi(FlatBufferBuilder builder, short rssi) { builder.addShort(3, rssi, 0); } - public static void addMcuTemp(FlatBufferBuilder builder, float mcuTemp) { builder.addFloat(4, mcuTemp, 0f); } - public static void addBatteryVoltage(FlatBufferBuilder builder, float batteryVoltage) { builder.addFloat(5, batteryVoltage, 0f); } - public static void addBatteryPctEstimate(FlatBufferBuilder builder, int batteryPctEstimate) { builder.addByte(6, (byte) batteryPctEstimate, (byte) 0); } - public static void addLogData(FlatBufferBuilder builder, int logDataOffset) { builder.addOffset(7, logDataOffset, 0); } - public static int endHardwareStatus(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 HardwareStatus get(int j) { return get(new HardwareStatus(), j); } - public HardwareStatus get(HardwareStatus obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public HardwareStatusT unpack() { - HardwareStatusT _o = new HardwareStatusT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HardwareStatusT _o) { - Integer _oErrorStatus = hasErrorStatus() ? errorStatus() : null; - _o.setErrorStatus(_oErrorStatus); - Integer _oTps = hasTps() ? tps() : null; - _o.setTps(_oTps); - Integer _oPing = hasPing() ? ping() : null; - _o.setPing(_oPing); - Short _oRssi = hasRssi() ? rssi() : null; - _o.setRssi(_oRssi); - Float _oMcuTemp = hasMcuTemp() ? mcuTemp() : null; - _o.setMcuTemp(_oMcuTemp); - Float _oBatteryVoltage = hasBatteryVoltage() ? batteryVoltage() : null; - _o.setBatteryVoltage(_oBatteryVoltage); - Integer _oBatteryPctEstimate = hasBatteryPctEstimate() ? batteryPctEstimate() : null; - _o.setBatteryPctEstimate(_oBatteryPctEstimate); - if (logData() != null) _o.setLogData(logData().unpack()); - else _o.setLogData(null); - } - public static int pack(FlatBufferBuilder builder, HardwareStatusT _o) { - if (_o == null) return 0; - int _logData = _o.getLogData() == null ? 0 : solarxr_protocol.datatypes.LogData.pack(builder, _o.getLogData()); - return createHardwareStatus( - builder, - _o.getErrorStatus(), - _o.getTps(), - _o.getPing(), - _o.getRssi(), - _o.getMcuTemp(), - _o.getBatteryVoltage(), - _o.getBatteryPctEstimate(), - _logData); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Mostly-dynamic status info about a tracked device's firmware + */ +@SuppressWarnings("unused") +public final class HardwareStatus extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static HardwareStatus getRootAsHardwareStatus(ByteBuffer _bb) { return getRootAsHardwareStatus(_bb, new HardwareStatus()); } + public static HardwareStatus getRootAsHardwareStatus(ByteBuffer _bb, HardwareStatus 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 HardwareStatus __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasErrorStatus() { return 0 != __offset(4); } + public int errorStatus() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public boolean hasTps() { return 0 != __offset(6); } + public int tps() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public boolean hasPing() { return 0 != __offset(8); } + public int ping() { int o = __offset(8); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + /** + * “Received Signal Strength Indicator" between device and wifi adapter in dBm + */ + public boolean hasRssi() { return 0 != __offset(10); } + public short rssi() { int o = __offset(10); return o != 0 ? bb.getShort(o + bb_pos) : 0; } + /** + * Temperature in degrees celsius + */ + public boolean hasMcuTemp() { return 0 != __offset(12); } + public float mcuTemp() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasBatteryVoltage() { return 0 != __offset(14); } + public float batteryVoltage() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasBatteryPctEstimate() { return 0 != __offset(16); } + public int batteryPctEstimate() { int o = __offset(16); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public solarxr_protocol.datatypes.LogData logData() { return logData(new solarxr_protocol.datatypes.LogData()); } + public solarxr_protocol.datatypes.LogData logData(solarxr_protocol.datatypes.LogData obj) { int o = __offset(18); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createHardwareStatus(FlatBufferBuilder builder, + int errorStatus, + int tps, + int ping, + short rssi, + float mcuTemp, + float batteryVoltage, + int batteryPctEstimate, + int logDataOffset) { + builder.startTable(8); + HardwareStatus.addLogData(builder, logDataOffset); + HardwareStatus.addBatteryVoltage(builder, batteryVoltage); + HardwareStatus.addMcuTemp(builder, mcuTemp); + HardwareStatus.addRssi(builder, rssi); + HardwareStatus.addPing(builder, ping); + HardwareStatus.addBatteryPctEstimate(builder, batteryPctEstimate); + HardwareStatus.addTps(builder, tps); + HardwareStatus.addErrorStatus(builder, errorStatus); + return HardwareStatus.endHardwareStatus(builder); + } + + public static void startHardwareStatus(FlatBufferBuilder builder) { builder.startTable(8); } + public static void addErrorStatus(FlatBufferBuilder builder, int errorStatus) { builder.addByte(0, (byte) errorStatus, (byte) 0); } + public static void addTps(FlatBufferBuilder builder, int tps) { builder.addByte(1, (byte) tps, (byte) 0); } + public static void addPing(FlatBufferBuilder builder, int ping) { builder.addShort(2, (short) ping, (short) 0); } + public static void addRssi(FlatBufferBuilder builder, short rssi) { builder.addShort(3, rssi, 0); } + public static void addMcuTemp(FlatBufferBuilder builder, float mcuTemp) { builder.addFloat(4, mcuTemp, 0f); } + public static void addBatteryVoltage(FlatBufferBuilder builder, float batteryVoltage) { builder.addFloat(5, batteryVoltage, 0f); } + public static void addBatteryPctEstimate(FlatBufferBuilder builder, int batteryPctEstimate) { builder.addByte(6, (byte) batteryPctEstimate, (byte) 0); } + public static void addLogData(FlatBufferBuilder builder, int logDataOffset) { builder.addOffset(7, logDataOffset, 0); } + public static int endHardwareStatus(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 HardwareStatus get(int j) { return get(new HardwareStatus(), j); } + public HardwareStatus get(HardwareStatus obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public HardwareStatusT unpack() { + HardwareStatusT _o = new HardwareStatusT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HardwareStatusT _o) { + Integer _oErrorStatus = hasErrorStatus() ? errorStatus() : null; + _o.setErrorStatus(_oErrorStatus); + Integer _oTps = hasTps() ? tps() : null; + _o.setTps(_oTps); + Integer _oPing = hasPing() ? ping() : null; + _o.setPing(_oPing); + Short _oRssi = hasRssi() ? rssi() : null; + _o.setRssi(_oRssi); + Float _oMcuTemp = hasMcuTemp() ? mcuTemp() : null; + _o.setMcuTemp(_oMcuTemp); + Float _oBatteryVoltage = hasBatteryVoltage() ? batteryVoltage() : null; + _o.setBatteryVoltage(_oBatteryVoltage); + Integer _oBatteryPctEstimate = hasBatteryPctEstimate() ? batteryPctEstimate() : null; + _o.setBatteryPctEstimate(_oBatteryPctEstimate); + if (logData() != null) _o.setLogData(logData().unpack()); + else _o.setLogData(null); + } + public static int pack(FlatBufferBuilder builder, HardwareStatusT _o) { + if (_o == null) return 0; + int _log_data = _o.getLogData() == null ? 0 : solarxr_protocol.datatypes.LogData.pack(builder, _o.getLogData()); + return createHardwareStatus( + builder, + _o.getErrorStatus(), + _o.getTps(), + _o.getPing(), + _o.getRssi(), + _o.getMcuTemp(), + _o.getBatteryVoltage(), + _o.getBatteryPctEstimate(), + _log_data); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatusT.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatusT.java index 51bbce4c..5b4c85e5 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatusT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatusT.java @@ -1,64 +1,64 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class HardwareStatusT { - private Integer errorStatus; - private Integer tps; - private Integer ping; - private Short rssi; - private Float mcuTemp; - private Float batteryVoltage; - private Integer batteryPctEstimate; - private solarxr_protocol.datatypes.LogDataT logData; - - public Integer getErrorStatus() { return errorStatus; } - - public void setErrorStatus(Integer errorStatus) { this.errorStatus = errorStatus; } - - public Integer getTps() { return tps; } - - public void setTps(Integer tps) { this.tps = tps; } - - public Integer getPing() { return ping; } - - public void setPing(Integer ping) { this.ping = ping; } - - public Short getRssi() { return rssi; } - - public void setRssi(Short rssi) { this.rssi = rssi; } - - public Float getMcuTemp() { return mcuTemp; } - - public void setMcuTemp(Float mcuTemp) { this.mcuTemp = mcuTemp; } - - public Float getBatteryVoltage() { return batteryVoltage; } - - public void setBatteryVoltage(Float batteryVoltage) { this.batteryVoltage = batteryVoltage; } - - public Integer getBatteryPctEstimate() { return batteryPctEstimate; } - - public void setBatteryPctEstimate(Integer batteryPctEstimate) { this.batteryPctEstimate = batteryPctEstimate; } - - public solarxr_protocol.datatypes.LogDataT getLogData() { return logData; } - - public void setLogData(solarxr_protocol.datatypes.LogDataT logData) { this.logData = logData; } - - - public HardwareStatusT() { - this.errorStatus = null; - this.tps = null; - this.ping = null; - this.rssi = null; - this.mcuTemp = null; - this.batteryVoltage = null; - this.batteryPctEstimate = null; - this.logData = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class HardwareStatusT { + private Integer errorStatus; + private Integer tps; + private Integer ping; + private Short rssi; + private Float mcuTemp; + private Float batteryVoltage; + private Integer batteryPctEstimate; + private solarxr_protocol.datatypes.LogDataT logData; + + public Integer getErrorStatus() { return errorStatus; } + + public void setErrorStatus(Integer errorStatus) { this.errorStatus = errorStatus; } + + public Integer getTps() { return tps; } + + public void setTps(Integer tps) { this.tps = tps; } + + public Integer getPing() { return ping; } + + public void setPing(Integer ping) { this.ping = ping; } + + public Short getRssi() { return rssi; } + + public void setRssi(Short rssi) { this.rssi = rssi; } + + public Float getMcuTemp() { return mcuTemp; } + + public void setMcuTemp(Float mcuTemp) { this.mcuTemp = mcuTemp; } + + public Float getBatteryVoltage() { return batteryVoltage; } + + public void setBatteryVoltage(Float batteryVoltage) { this.batteryVoltage = batteryVoltage; } + + public Integer getBatteryPctEstimate() { return batteryPctEstimate; } + + public void setBatteryPctEstimate(Integer batteryPctEstimate) { this.batteryPctEstimate = batteryPctEstimate; } + + public solarxr_protocol.datatypes.LogDataT getLogData() { return logData; } + + public void setLogData(solarxr_protocol.datatypes.LogDataT logData) { this.logData = logData; } + + + public HardwareStatusT() { + this.errorStatus = null; + this.tps = null; + this.ping = null; + this.rssi = null; + this.mcuTemp = null; + this.batteryVoltage = null; + this.batteryPctEstimate = null; + this.logData = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java index ef43f9b3..9191d6f6 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/ImuType.java @@ -1,19 +1,19 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -@SuppressWarnings("unused") -public final class ImuType { - private ImuType() { } - public static final int Other = 0; - public static final int BNO085 = 1; - public static final int BNO080 = 2; - public static final int MPU6050 = 3; - public static final int MPU9250 = 4; - public static final int MPU6500 = 5; - - public static final String[] names = { "Other", "BNO085", "BNO080", "MPU6050", "MPU9250", "MPU6500", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +@SuppressWarnings("unused") +public final class ImuType { + private ImuType() { } + public static final int Other = 0; + public static final int BNO085 = 1; + public static final int BNO080 = 2; + public static final int MPU6050 = 3; + public static final int MPU9250 = 4; + public static final int MPU6500 = 5; + + public static final String[] names = { "Other", "BNO085", "BNO080", "MPU6050", "MPU9250", "MPU6500", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java index 1932bdee..060204c5 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/McuType.java @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.hardware_info; - -@SuppressWarnings("unused") -public final class McuType { - private McuType() { } - public static final int Other = 0; - public static final int ESP8266 = 1; - public static final int ESP32_S2 = 2; - public static final int ESP32_S3 = 3; - public static final int ESP32_C3 = 4; - - public static final String[] names = { "Other", "ESP8266", "ESP32_S2", "ESP32_S3", "ESP32_C3", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.hardware_info; + +@SuppressWarnings("unused") +public final class McuType { + private McuType() { } + public static final int Other = 0; + public static final int ESP8266 = 1; + public static final int ESP32_S2 = 2; + public static final int ESP32_S3 = 3; + public static final int ESP32_C3 = 4; + + public static final String[] names = { "Other", "ESP8266", "ESP32_S2", "ESP32_S3", "ESP32_C3", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/math/Quat.java b/protocol/java/src/solarxr_protocol/datatypes/math/Quat.java index 5e4f88ab..3f51df79 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/math/Quat.java +++ b/protocol/java/src/solarxr_protocol/datatypes/math/Quat.java @@ -1,60 +1,60 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.math; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class Quat extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public Quat __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public float x() { return bb.getFloat(bb_pos + 0); } - public float y() { return bb.getFloat(bb_pos + 4); } - public float z() { return bb.getFloat(bb_pos + 8); } - public float w() { return bb.getFloat(bb_pos + 12); } - - public static int createQuat(FlatBufferBuilder builder, float x, float y, float z, float w) { - builder.prep(4, 16); - builder.putFloat(w); - builder.putFloat(z); - builder.putFloat(y); - builder.putFloat(x); - return builder.offset(); - } - - 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 Quat get(int j) { return get(new Quat(), j); } - public Quat get(Quat obj, int j) { return obj.__assign(__element(j), bb); } - } - public QuatT unpack() { - QuatT _o = new QuatT(); - unpackTo(_o); - return _o; - } - public void unpackTo(QuatT _o) { - float _oX = x(); - _o.setX(_oX); - float _oY = y(); - _o.setY(_oY); - float _oZ = z(); - _o.setZ(_oZ); - float _oW = w(); - _o.setW(_oW); - } - public static int pack(FlatBufferBuilder builder, QuatT _o) { - if (_o == null) return 0; - return createQuat( - builder, - _o.getX(), - _o.getY(), - _o.getZ(), - _o.getW()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.math; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class Quat extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Quat __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float x() { return bb.getFloat(bb_pos + 0); } + public float y() { return bb.getFloat(bb_pos + 4); } + public float z() { return bb.getFloat(bb_pos + 8); } + public float w() { return bb.getFloat(bb_pos + 12); } + + public static int createQuat(FlatBufferBuilder builder, float x, float y, float z, float w) { + builder.prep(4, 16); + builder.putFloat(w); + builder.putFloat(z); + builder.putFloat(y); + builder.putFloat(x); + return builder.offset(); + } + + 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 Quat get(int j) { return get(new Quat(), j); } + public Quat get(Quat obj, int j) { return obj.__assign(__element(j), bb); } + } + public QuatT unpack() { + QuatT _o = new QuatT(); + unpackTo(_o); + return _o; + } + public void unpackTo(QuatT _o) { + float _oX = x(); + _o.setX(_oX); + float _oY = y(); + _o.setY(_oY); + float _oZ = z(); + _o.setZ(_oZ); + float _oW = w(); + _o.setW(_oW); + } + public static int pack(FlatBufferBuilder builder, QuatT _o) { + if (_o == null) return 0; + return createQuat( + builder, + _o.getX(), + _o.getY(), + _o.getZ(), + _o.getW()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/math/QuatT.java b/protocol/java/src/solarxr_protocol/datatypes/math/QuatT.java index 74791a38..b5f97270 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/math/QuatT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/math/QuatT.java @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.math; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class QuatT { - private float x; - private float y; - private float z; - private float w; - - public float getX() { return x; } - - public void setX(float x) { this.x = x; } - - public float getY() { return y; } - - public void setY(float y) { this.y = y; } - - public float getZ() { return z; } - - public void setZ(float z) { this.z = z; } - - public float getW() { return w; } - - public void setW(float w) { this.w = w; } - - - public QuatT() { - this.x = 0.0f; - this.y = 0.0f; - this.z = 0.0f; - this.w = 0.0f; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.math; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class QuatT { + private float x; + private float y; + private float z; + private float w; + + public float getX() { return x; } + + public void setX(float x) { this.x = x; } + + public float getY() { return y; } + + public void setY(float y) { this.y = y; } + + public float getZ() { return z; } + + public void setZ(float z) { this.z = z; } + + public float getW() { return w; } + + public void setW(float w) { this.w = w; } + + + public QuatT() { + this.x = 0.0f; + this.y = 0.0f; + this.z = 0.0f; + this.w = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/math/Vec3f.java b/protocol/java/src/solarxr_protocol/datatypes/math/Vec3f.java index b9f97211..27ba51d8 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/math/Vec3f.java +++ b/protocol/java/src/solarxr_protocol/datatypes/math/Vec3f.java @@ -1,55 +1,55 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.math; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -@SuppressWarnings("unused") -public final class Vec3f extends Struct { - public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } - public Vec3f __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public float x() { return bb.getFloat(bb_pos + 0); } - public float y() { return bb.getFloat(bb_pos + 4); } - public float z() { return bb.getFloat(bb_pos + 8); } - - public static int createVec3f(FlatBufferBuilder builder, float x, float y, float z) { - builder.prep(4, 12); - builder.putFloat(z); - builder.putFloat(y); - builder.putFloat(x); - return builder.offset(); - } - - 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 Vec3f get(int j) { return get(new Vec3f(), j); } - public Vec3f get(Vec3f obj, int j) { return obj.__assign(__element(j), bb); } - } - public Vec3fT unpack() { - Vec3fT _o = new Vec3fT(); - unpackTo(_o); - return _o; - } - public void unpackTo(Vec3fT _o) { - float _oX = x(); - _o.setX(_oX); - float _oY = y(); - _o.setY(_oY); - float _oZ = z(); - _o.setZ(_oZ); - } - public static int pack(FlatBufferBuilder builder, Vec3fT _o) { - if (_o == null) return 0; - return createVec3f( - builder, - _o.getX(), - _o.getY(), - _o.getZ()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.math; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class Vec3f extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Vec3f __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float x() { return bb.getFloat(bb_pos + 0); } + public float y() { return bb.getFloat(bb_pos + 4); } + public float z() { return bb.getFloat(bb_pos + 8); } + + public static int createVec3f(FlatBufferBuilder builder, float x, float y, float z) { + builder.prep(4, 12); + builder.putFloat(z); + builder.putFloat(y); + builder.putFloat(x); + return builder.offset(); + } + + 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 Vec3f get(int j) { return get(new Vec3f(), j); } + public Vec3f get(Vec3f obj, int j) { return obj.__assign(__element(j), bb); } + } + public Vec3fT unpack() { + Vec3fT _o = new Vec3fT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Vec3fT _o) { + float _oX = x(); + _o.setX(_oX); + float _oY = y(); + _o.setY(_oY); + float _oZ = z(); + _o.setZ(_oZ); + } + public static int pack(FlatBufferBuilder builder, Vec3fT _o) { + if (_o == null) return 0; + return createVec3f( + builder, + _o.getX(), + _o.getY(), + _o.getZ()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/datatypes/math/Vec3fT.java b/protocol/java/src/solarxr_protocol/datatypes/math/Vec3fT.java index d78ade3b..f24ef60c 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/math/Vec3fT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/math/Vec3fT.java @@ -1,34 +1,34 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.datatypes.math; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class Vec3fT { - private float x; - private float y; - private float z; - - public float getX() { return x; } - - public void setX(float x) { this.x = x; } - - public float getY() { return y; } - - public void setY(float y) { this.y = y; } - - public float getZ() { return z; } - - public void setZ(float z) { this.z = z; } - - - public Vec3fT() { - this.x = 0.0f; - this.y = 0.0f; - this.z = 0.0f; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.datatypes.math; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class Vec3fT { + private float x; + private float y; + private float z; + + public float getX() { return x; } + + public void setX(float x) { this.x = x; } + + public float getY() { return y; } + + public void setY(float y) { this.y = y; } + + public float getZ() { return z; } + + public void setZ(float z) { this.z = z; } + + + public Vec3fT() { + this.x = 0.0f; + this.y = 0.0f; + this.z = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/KeyValues.java b/protocol/java/src/solarxr_protocol/pub_sub/KeyValues.java new file mode 100644 index 00000000..68b4c986 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/KeyValues.java @@ -0,0 +1,89 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class KeyValues extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static KeyValues getRootAsKeyValues(ByteBuffer _bb) { return getRootAsKeyValues(_bb, new KeyValues()); } + public static KeyValues getRootAsKeyValues(ByteBuffer _bb, KeyValues 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 KeyValues __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String keys(int j) { int o = __offset(4); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int keysLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public StringVector keysVector() { return keysVector(new StringVector()); } + public StringVector keysVector(StringVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public String values(int j) { int o = __offset(6); return o != 0 ? __string(__vector(o) + j * 4) : null; } + public int valuesLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public StringVector valuesVector() { return valuesVector(new StringVector()); } + public StringVector valuesVector(StringVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createKeyValues(FlatBufferBuilder builder, + int keysOffset, + int valuesOffset) { + builder.startTable(2); + KeyValues.addValues(builder, valuesOffset); + KeyValues.addKeys(builder, keysOffset); + return KeyValues.endKeyValues(builder); + } + + public static void startKeyValues(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addKeys(FlatBufferBuilder builder, int keysOffset) { builder.addOffset(0, keysOffset, 0); } + public static int createKeysVector(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 startKeysVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addValues(FlatBufferBuilder builder, int valuesOffset) { builder.addOffset(1, valuesOffset, 0); } + public static int createValuesVector(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 startValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endKeyValues(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 KeyValues get(int j) { return get(new KeyValues(), j); } + public KeyValues get(KeyValues obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public KeyValuesT unpack() { + KeyValuesT _o = new KeyValuesT(); + unpackTo(_o); + return _o; + } + public void unpackTo(KeyValuesT _o) { + String[] _oKeys = new String[keysLength()]; + for (int _j = 0; _j < keysLength(); ++_j) {_oKeys[_j] = keys(_j);} + _o.setKeys(_oKeys); + String[] _oValues = new String[valuesLength()]; + for (int _j = 0; _j < valuesLength(); ++_j) {_oValues[_j] = values(_j);} + _o.setValues(_oValues); + } + public static int pack(FlatBufferBuilder builder, KeyValuesT _o) { + if (_o == null) return 0; + int _keys = 0; + if (_o.getKeys() != null) { + int[] __keys = new int[_o.getKeys().length]; + int _j = 0; + for (String _e : _o.getKeys()) { __keys[_j] = builder.createString(_e); _j++;} + _keys = createKeysVector(builder, __keys); + } + int _values = 0; + if (_o.getValues() != null) { + int[] __values = new int[_o.getValues().length]; + int _j = 0; + for (String _e : _o.getValues()) { __values[_j] = builder.createString(_e); _j++;} + _values = createValuesVector(builder, __values); + } + return createKeyValues( + builder, + _keys, + _values); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/KeyValuesT.java b/protocol/java/src/solarxr_protocol/pub_sub/KeyValuesT.java new file mode 100644 index 00000000..7616240d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/KeyValuesT.java @@ -0,0 +1,28 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class KeyValuesT { + private String[] keys; + private String[] values; + + public String[] getKeys() { return keys; } + + public void setKeys(String[] keys) { this.keys = keys; } + + public String[] getValues() { return values; } + + public void setValues(String[] values) { this.values = values; } + + + public KeyValuesT() { + this.keys = null; + this.values = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/Message.java b/protocol/java/src/solarxr_protocol/pub_sub/Message.java new file mode 100644 index 00000000..c2e1a51b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/Message.java @@ -0,0 +1,112 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Data that is sent from publishers to subscribers + */ +@SuppressWarnings("unused") +public final class Message extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static Message getRootAsMessage(ByteBuffer _bb) { return getRootAsMessage(_bb, new Message()); } + public static Message getRootAsMessage(ByteBuffer _bb, Message 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 Message __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte topicType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table topic(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } + public byte payloadType() { int o = __offset(8); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table payload(Table obj) { int o = __offset(10); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createMessage(FlatBufferBuilder builder, + byte topicType, + int topicOffset, + byte payloadType, + int payloadOffset) { + builder.startTable(4); + Message.addPayload(builder, payloadOffset); + Message.addTopic(builder, topicOffset); + Message.addPayloadType(builder, payloadType); + Message.addTopicType(builder, topicType); + return Message.endMessage(builder); + } + + public static void startMessage(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addTopicType(FlatBufferBuilder builder, byte topicType) { builder.addByte(0, topicType, 0); } + public static void addTopic(FlatBufferBuilder builder, int topicOffset) { builder.addOffset(1, topicOffset, 0); } + public static void addPayloadType(FlatBufferBuilder builder, byte payloadType) { builder.addByte(2, payloadType, 0); } + public static void addPayload(FlatBufferBuilder builder, int payloadOffset) { builder.addOffset(3, payloadOffset, 0); } + public static int endMessage(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 Message get(int j) { return get(new Message(), j); } + public Message get(Message obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public MessageT unpack() { + MessageT _o = new MessageT(); + unpackTo(_o); + return _o; + } + public void unpackTo(MessageT _o) { + solarxr_protocol.pub_sub.TopicUnion _oTopic = new solarxr_protocol.pub_sub.TopicUnion(); + byte _oTopicType = topicType(); + _oTopic.setType(_oTopicType); + Table _oTopicValue; + switch (_oTopicType) { + case solarxr_protocol.pub_sub.Topic.TopicHandle: + _oTopicValue = topic(new solarxr_protocol.pub_sub.TopicHandle()); + _oTopic.setValue(_oTopicValue != null ? ((solarxr_protocol.pub_sub.TopicHandle) _oTopicValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.Topic.TopicId: + _oTopicValue = topic(new solarxr_protocol.pub_sub.TopicId()); + _oTopic.setValue(_oTopicValue != null ? ((solarxr_protocol.pub_sub.TopicId) _oTopicValue).unpack() : null); + break; + default: break; + } + _o.setTopic(_oTopic); + solarxr_protocol.pub_sub.PayloadUnion _oPayload = new solarxr_protocol.pub_sub.PayloadUnion(); + byte _oPayloadType = payloadType(); + _oPayload.setType(_oPayloadType); + Table _oPayloadValue; + switch (_oPayloadType) { + case solarxr_protocol.pub_sub.Payload.solarxr_protocol_datatypes_String: + _oPayloadValue = payload(new solarxr_protocol.datatypes.String()); + _oPayload.setValue(_oPayloadValue != null ? ((solarxr_protocol.datatypes.String) _oPayloadValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.Payload.solarxr_protocol_datatypes_Bytes: + _oPayloadValue = payload(new solarxr_protocol.datatypes.Bytes()); + _oPayload.setValue(_oPayloadValue != null ? ((solarxr_protocol.datatypes.Bytes) _oPayloadValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.Payload.KeyValues: + _oPayloadValue = payload(new solarxr_protocol.pub_sub.KeyValues()); + _oPayload.setValue(_oPayloadValue != null ? ((solarxr_protocol.pub_sub.KeyValues) _oPayloadValue).unpack() : null); + break; + default: break; + } + _o.setPayload(_oPayload); + } + public static int pack(FlatBufferBuilder builder, MessageT _o) { + if (_o == null) return 0; + byte _topicType = _o.getTopic() == null ? solarxr_protocol.pub_sub.Topic.NONE : _o.getTopic().getType(); + int _topic = _o.getTopic() == null ? 0 : solarxr_protocol.pub_sub.TopicUnion.pack(builder, _o.getTopic()); + byte _payloadType = _o.getPayload() == null ? solarxr_protocol.pub_sub.Payload.NONE : _o.getPayload().getType(); + int _payload = _o.getPayload() == null ? 0 : solarxr_protocol.pub_sub.PayloadUnion.pack(builder, _o.getPayload()); + return createMessage( + builder, + _topicType, + _topic, + _payloadType, + _payload); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/MessageT.java b/protocol/java/src/solarxr_protocol/pub_sub/MessageT.java new file mode 100644 index 00000000..87b3aa5d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/MessageT.java @@ -0,0 +1,28 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class MessageT { + private solarxr_protocol.pub_sub.TopicUnion topic; + private solarxr_protocol.pub_sub.PayloadUnion payload; + + public solarxr_protocol.pub_sub.TopicUnion getTopic() { return topic; } + + public void setTopic(solarxr_protocol.pub_sub.TopicUnion topic) { this.topic = topic; } + + public solarxr_protocol.pub_sub.PayloadUnion getPayload() { return payload; } + + public void setPayload(solarxr_protocol.pub_sub.PayloadUnion payload) { this.payload = payload; } + + + public MessageT() { + this.topic = null; + this.payload = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/Payload.java b/protocol/java/src/solarxr_protocol/pub_sub/Payload.java new file mode 100644 index 00000000..7048d271 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/Payload.java @@ -0,0 +1,17 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +@SuppressWarnings("unused") +public final class Payload { + private Payload() { } + public static final byte NONE = 0; + public static final byte solarxr_protocol_datatypes_String = 1; + public static final byte solarxr_protocol_datatypes_Bytes = 2; + public static final byte KeyValues = 3; + + public static final String[] names = { "NONE", "solarxr_protocol_datatypes_String", "solarxr_protocol_datatypes_Bytes", "KeyValues", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java new file mode 100644 index 00000000..23b8530a --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class PayloadUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public PayloadUnion() { + this.type = Payload.NONE; + this.value = null; + } + + public solarxr_protocol.datatypes.StringT assolarxr_protocol_datatypes_String() { return (solarxr_protocol.datatypes.StringT) value; } + public solarxr_protocol.datatypes.BytesT assolarxr_protocol_datatypes_Bytes() { return (solarxr_protocol.datatypes.BytesT) value; } + public solarxr_protocol.pub_sub.KeyValuesT asKeyValues() { return (solarxr_protocol.pub_sub.KeyValuesT) value; } + + public static int pack(FlatBufferBuilder builder, PayloadUnion _o) { + switch (_o.type) { + case Payload.solarxr_protocol_datatypes_String: return solarxr_protocol.datatypes.String.pack(builder, _o.assolarxr_protocol_datatypes_String()); + case Payload.solarxr_protocol_datatypes_Bytes: return solarxr_protocol.datatypes.Bytes.pack(builder, _o.assolarxr_protocol_datatypes_Bytes()); + case Payload.KeyValues: return solarxr_protocol.pub_sub.KeyValues.pack(builder, _o.asKeyValues()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java new file mode 100644 index 00000000..ea21f8b5 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java @@ -0,0 +1,85 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +@SuppressWarnings("unused") +public final class PubSubHeader extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static PubSubHeader getRootAsPubSubHeader(ByteBuffer _bb) { return getRootAsPubSubHeader(_bb, new PubSubHeader()); } + public static PubSubHeader getRootAsPubSubHeader(ByteBuffer _bb, PubSubHeader 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 PubSubHeader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte uType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table u(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createPubSubHeader(FlatBufferBuilder builder, + byte uType, + int uOffset) { + builder.startTable(2); + PubSubHeader.addU(builder, uOffset); + PubSubHeader.addUType(builder, uType); + return PubSubHeader.endPubSubHeader(builder); + } + + public static void startPubSubHeader(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addUType(FlatBufferBuilder builder, byte uType) { builder.addByte(0, uType, 0); } + public static void addU(FlatBufferBuilder builder, int uOffset) { builder.addOffset(1, uOffset, 0); } + public static int endPubSubHeader(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 PubSubHeader get(int j) { return get(new PubSubHeader(), j); } + public PubSubHeader get(PubSubHeader obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public PubSubHeaderT unpack() { + PubSubHeaderT _o = new PubSubHeaderT(); + unpackTo(_o); + return _o; + } + public void unpackTo(PubSubHeaderT _o) { + solarxr_protocol.pub_sub.PubSubUnionUnion _oU = new solarxr_protocol.pub_sub.PubSubUnionUnion(); + byte _oUType = uType(); + _oU.setType(_oUType); + Table _oUValue; + switch (_oUType) { + case solarxr_protocol.pub_sub.PubSubUnion.Message: + _oUValue = u(new solarxr_protocol.pub_sub.Message()); + _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.Message) _oUValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.PubSubUnion.SubscriptionRequest: + _oUValue = u(new solarxr_protocol.pub_sub.SubscriptionRequest()); + _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.SubscriptionRequest) _oUValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.PubSubUnion.TopicHandleRequest: + _oUValue = u(new solarxr_protocol.pub_sub.TopicHandleRequest()); + _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicHandleRequest) _oUValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.PubSubUnion.TopicHandleResponse: + _oUValue = u(new solarxr_protocol.pub_sub.TopicHandleResponse()); + _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicHandleResponse) _oUValue).unpack() : null); + break; + default: break; + } + _o.setU(_oU); + } + public static int pack(FlatBufferBuilder builder, PubSubHeaderT _o) { + if (_o == null) return 0; + byte _uType = _o.getU() == null ? solarxr_protocol.pub_sub.PubSubUnion.NONE : _o.getU().getType(); + int _u = _o.getU() == null ? 0 : solarxr_protocol.pub_sub.PubSubUnionUnion.pack(builder, _o.getU()); + return createPubSubHeader( + builder, + _uType, + _u); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeaderT.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeaderT.java new file mode 100644 index 00000000..7098f81b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeaderT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class PubSubHeaderT { + private solarxr_protocol.pub_sub.PubSubUnionUnion u; + + public solarxr_protocol.pub_sub.PubSubUnionUnion getU() { return u; } + + public void setU(solarxr_protocol.pub_sub.PubSubUnionUnion u) { this.u = u; } + + + public PubSubHeaderT() { + this.u = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java new file mode 100644 index 00000000..048517cd --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +@SuppressWarnings("unused") +public final class PubSubUnion { + private PubSubUnion() { } + public static final byte NONE = 0; + public static final byte Message = 1; + public static final byte SubscriptionRequest = 2; + public static final byte TopicHandleRequest = 3; + public static final byte TopicHandleResponse = 4; + + public static final String[] names = { "NONE", "Message", "SubscriptionRequest", "TopicHandleRequest", "TopicHandleResponse", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java new file mode 100644 index 00000000..5d7a8c5d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class PubSubUnionUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public PubSubUnionUnion() { + this.type = PubSubUnion.NONE; + this.value = null; + } + + public solarxr_protocol.pub_sub.MessageT asMessage() { return (solarxr_protocol.pub_sub.MessageT) value; } + public solarxr_protocol.pub_sub.SubscriptionRequestT asSubscriptionRequest() { return (solarxr_protocol.pub_sub.SubscriptionRequestT) value; } + public solarxr_protocol.pub_sub.TopicHandleRequestT asTopicHandleRequest() { return (solarxr_protocol.pub_sub.TopicHandleRequestT) value; } + public solarxr_protocol.pub_sub.TopicHandleResponseT asTopicHandleResponse() { return (solarxr_protocol.pub_sub.TopicHandleResponseT) value; } + + public static int pack(FlatBufferBuilder builder, PubSubUnionUnion _o) { + switch (_o.type) { + case PubSubUnion.Message: return solarxr_protocol.pub_sub.Message.pack(builder, _o.asMessage()); + case PubSubUnion.SubscriptionRequest: return solarxr_protocol.pub_sub.SubscriptionRequest.pack(builder, _o.asSubscriptionRequest()); + case PubSubUnion.TopicHandleRequest: return solarxr_protocol.pub_sub.TopicHandleRequest.pack(builder, _o.asTopicHandleRequest()); + case PubSubUnion.TopicHandleResponse: return solarxr_protocol.pub_sub.TopicHandleResponse.pack(builder, _o.asTopicHandleResponse()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java new file mode 100644 index 00000000..84727547 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java @@ -0,0 +1,80 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Requests a subscription to `topic` + */ +@SuppressWarnings("unused") +public final class SubscriptionRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SubscriptionRequest getRootAsSubscriptionRequest(ByteBuffer _bb) { return getRootAsSubscriptionRequest(_bb, new SubscriptionRequest()); } + public static SubscriptionRequest getRootAsSubscriptionRequest(ByteBuffer _bb, SubscriptionRequest 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 SubscriptionRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public byte topicType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table topic(Table obj) { int o = __offset(6); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createSubscriptionRequest(FlatBufferBuilder builder, + byte topicType, + int topicOffset) { + builder.startTable(2); + SubscriptionRequest.addTopic(builder, topicOffset); + SubscriptionRequest.addTopicType(builder, topicType); + return SubscriptionRequest.endSubscriptionRequest(builder); + } + + public static void startSubscriptionRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addTopicType(FlatBufferBuilder builder, byte topicType) { builder.addByte(0, topicType, 0); } + public static void addTopic(FlatBufferBuilder builder, int topicOffset) { builder.addOffset(1, topicOffset, 0); } + public static int endSubscriptionRequest(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 SubscriptionRequest get(int j) { return get(new SubscriptionRequest(), j); } + public SubscriptionRequest get(SubscriptionRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SubscriptionRequestT unpack() { + SubscriptionRequestT _o = new SubscriptionRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SubscriptionRequestT _o) { + solarxr_protocol.pub_sub.TopicUnion _oTopic = new solarxr_protocol.pub_sub.TopicUnion(); + byte _oTopicType = topicType(); + _oTopic.setType(_oTopicType); + Table _oTopicValue; + switch (_oTopicType) { + case solarxr_protocol.pub_sub.Topic.TopicHandle: + _oTopicValue = topic(new solarxr_protocol.pub_sub.TopicHandle()); + _oTopic.setValue(_oTopicValue != null ? ((solarxr_protocol.pub_sub.TopicHandle) _oTopicValue).unpack() : null); + break; + case solarxr_protocol.pub_sub.Topic.TopicId: + _oTopicValue = topic(new solarxr_protocol.pub_sub.TopicId()); + _oTopic.setValue(_oTopicValue != null ? ((solarxr_protocol.pub_sub.TopicId) _oTopicValue).unpack() : null); + break; + default: break; + } + _o.setTopic(_oTopic); + } + public static int pack(FlatBufferBuilder builder, SubscriptionRequestT _o) { + if (_o == null) return 0; + byte _topicType = _o.getTopic() == null ? solarxr_protocol.pub_sub.Topic.NONE : _o.getTopic().getType(); + int _topic = _o.getTopic() == null ? 0 : solarxr_protocol.pub_sub.TopicUnion.pack(builder, _o.getTopic()); + return createSubscriptionRequest( + builder, + _topicType, + _topic); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequestT.java b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequestT.java new file mode 100644 index 00000000..f17a8e0b --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class SubscriptionRequestT { + private solarxr_protocol.pub_sub.TopicUnion topic; + + public solarxr_protocol.pub_sub.TopicUnion getTopic() { return topic; } + + public void setTopic(solarxr_protocol.pub_sub.TopicUnion topic) { this.topic = topic; } + + + public SubscriptionRequestT() { + this.topic = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/Topic.java b/protocol/java/src/solarxr_protocol/pub_sub/Topic.java new file mode 100644 index 00000000..e368064c --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/Topic.java @@ -0,0 +1,16 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +@SuppressWarnings("unused") +public final class Topic { + private Topic() { } + public static final byte NONE = 0; + public static final byte TopicHandle = 1; + public static final byte TopicId = 2; + + public static final String[] names = { "NONE", "TopicHandle", "TopicId", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandle.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandle.java new file mode 100644 index 00000000..be044745 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandle.java @@ -0,0 +1,60 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A handle for the topic, allows referencing a topic without sending a huge + * `TopicId`. + */ +@SuppressWarnings("unused") +public final class TopicHandle extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TopicHandle getRootAsTopicHandle(ByteBuffer _bb) { return getRootAsTopicHandle(_bb, new TopicHandle()); } + public static TopicHandle getRootAsTopicHandle(ByteBuffer _bb, TopicHandle 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 TopicHandle __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int id() { int o = __offset(4); return o != 0 ? bb.getShort(o + bb_pos) & 0xFFFF : 0; } + + public static int createTopicHandle(FlatBufferBuilder builder, + int id) { + builder.startTable(1); + TopicHandle.addId(builder, id); + return TopicHandle.endTopicHandle(builder); + } + + public static void startTopicHandle(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addId(FlatBufferBuilder builder, int id) { builder.addShort(0, (short) id, (short) 0); } + public static int endTopicHandle(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 TopicHandle get(int j) { return get(new TopicHandle(), j); } + public TopicHandle get(TopicHandle obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TopicHandleT unpack() { + TopicHandleT _o = new TopicHandleT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TopicHandleT _o) { + int _oId = id(); + _o.setId(_oId); + } + public static int pack(FlatBufferBuilder builder, TopicHandleT _o) { + if (_o == null) return 0; + return createTopicHandle( + builder, + _o.getId()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequest.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequest.java new file mode 100644 index 00000000..69c5e51c --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequest.java @@ -0,0 +1,62 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing + * bandwidth, since `FeatureId` can be large. + */ +@SuppressWarnings("unused") +public final class TopicHandleRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TopicHandleRequest getRootAsTopicHandleRequest(ByteBuffer _bb) { return getRootAsTopicHandleRequest(_bb, new TopicHandleRequest()); } + public static TopicHandleRequest getRootAsTopicHandleRequest(ByteBuffer _bb, TopicHandleRequest 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 TopicHandleRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.pub_sub.TopicId id() { return id(new solarxr_protocol.pub_sub.TopicId()); } + public solarxr_protocol.pub_sub.TopicId id(solarxr_protocol.pub_sub.TopicId obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createTopicHandleRequest(FlatBufferBuilder builder, + int idOffset) { + builder.startTable(1); + TopicHandleRequest.addId(builder, idOffset); + return TopicHandleRequest.endTopicHandleRequest(builder); + } + + public static void startTopicHandleRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); } + public static int endTopicHandleRequest(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 TopicHandleRequest get(int j) { return get(new TopicHandleRequest(), j); } + public TopicHandleRequest get(TopicHandleRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TopicHandleRequestT unpack() { + TopicHandleRequestT _o = new TopicHandleRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TopicHandleRequestT _o) { + if (id() != null) _o.setId(id().unpack()); + else _o.setId(null); + } + public static int pack(FlatBufferBuilder builder, TopicHandleRequestT _o) { + if (_o == null) return 0; + int _id = _o.getId() == null ? 0 : solarxr_protocol.pub_sub.TopicId.pack(builder, _o.getId()); + return createTopicHandleRequest( + builder, + _id); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequestT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequestT.java new file mode 100644 index 00000000..acf0811f --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleRequestT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TopicHandleRequestT { + private solarxr_protocol.pub_sub.TopicIdT id; + + public solarxr_protocol.pub_sub.TopicIdT getId() { return id; } + + public void setId(solarxr_protocol.pub_sub.TopicIdT id) { this.id = id; } + + + public TopicHandleRequestT() { + this.id = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java new file mode 100644 index 00000000..a483b174 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java @@ -0,0 +1,61 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Response for `TopicHandleRequest` + */ +@SuppressWarnings("unused") +public final class TopicHandleResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TopicHandleResponse getRootAsTopicHandleResponse(ByteBuffer _bb) { return getRootAsTopicHandleResponse(_bb, new TopicHandleResponse()); } + public static TopicHandleResponse getRootAsTopicHandleResponse(ByteBuffer _bb, TopicHandleResponse 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 TopicHandleResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.pub_sub.TopicHandle handle() { return handle(new solarxr_protocol.pub_sub.TopicHandle()); } + public solarxr_protocol.pub_sub.TopicHandle handle(solarxr_protocol.pub_sub.TopicHandle obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createTopicHandleResponse(FlatBufferBuilder builder, + int handleOffset) { + builder.startTable(1); + TopicHandleResponse.addHandle(builder, handleOffset); + return TopicHandleResponse.endTopicHandleResponse(builder); + } + + public static void startTopicHandleResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addHandle(FlatBufferBuilder builder, int handleOffset) { builder.addOffset(0, handleOffset, 0); } + public static int endTopicHandleResponse(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 TopicHandleResponse get(int j) { return get(new TopicHandleResponse(), j); } + public TopicHandleResponse get(TopicHandleResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TopicHandleResponseT unpack() { + TopicHandleResponseT _o = new TopicHandleResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TopicHandleResponseT _o) { + if (handle() != null) _o.setHandle(handle().unpack()); + else _o.setHandle(null); + } + public static int pack(FlatBufferBuilder builder, TopicHandleResponseT _o) { + if (_o == null) return 0; + int _handle = _o.getHandle() == null ? 0 : solarxr_protocol.pub_sub.TopicHandle.pack(builder, _o.getHandle()); + return createTopicHandleResponse( + builder, + _handle); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java new file mode 100644 index 00000000..f4af208d --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TopicHandleResponseT { + private solarxr_protocol.pub_sub.TopicHandleT handle; + + public solarxr_protocol.pub_sub.TopicHandleT getHandle() { return handle; } + + public void setHandle(solarxr_protocol.pub_sub.TopicHandleT handle) { this.handle = handle; } + + + public TopicHandleResponseT() { + this.handle = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java new file mode 100644 index 00000000..deaa0d32 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleT.java @@ -0,0 +1,22 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TopicHandleT { + private int id; + + public int getId() { return id; } + + public void setId(int id) { this.id = id; } + + + public TopicHandleT() { + this.id = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicId.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicId.java new file mode 100644 index 00000000..abf12846 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicId.java @@ -0,0 +1,98 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * A `TopicId` identifies an application-specific category of data. Because it + * is application-specific, it is up to the application within the specified + * organization to define its semantics/meaning. + * + * For example, "bob" may have an "overlay" app with a "settings" topic for controlling + * the overlay visibility and other settings, as well as a "video feed" topic for + * allowing other applications to display video data in a wrist mounted window in VR. + */ +@SuppressWarnings("unused") +public final class TopicId extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TopicId getRootAsTopicId(ByteBuffer _bb) { return getRootAsTopicId(_bb, new TopicId()); } + public static TopicId getRootAsTopicId(ByteBuffer _bb, TopicId 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 TopicId __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * The organization/developer that defines the meaning of this feature. Avoids name + * clashes. Should be something unique - same idea as java package identifier. + */ + public String organization() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer organizationAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer organizationInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + /** + * The name of the application/device. Should be unique within the organization. + */ + public String appName() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer appNameAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer appNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + /** + * The name of the topic. Should be unique within the application. + */ + public String topic() { int o = __offset(8); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer topicAsByteBuffer() { return __vector_as_bytebuffer(8, 1); } + public ByteBuffer topicInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 8, 1); } + + public static int createTopicId(FlatBufferBuilder builder, + int organizationOffset, + int appNameOffset, + int topicOffset) { + builder.startTable(3); + TopicId.addTopic(builder, topicOffset); + TopicId.addAppName(builder, appNameOffset); + TopicId.addOrganization(builder, organizationOffset); + return TopicId.endTopicId(builder); + } + + public static void startTopicId(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addOrganization(FlatBufferBuilder builder, int organizationOffset) { builder.addOffset(0, organizationOffset, 0); } + public static void addAppName(FlatBufferBuilder builder, int appNameOffset) { builder.addOffset(1, appNameOffset, 0); } + public static void addTopic(FlatBufferBuilder builder, int topicOffset) { builder.addOffset(2, topicOffset, 0); } + public static int endTopicId(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 TopicId get(int j) { return get(new TopicId(), j); } + public TopicId get(TopicId obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TopicIdT unpack() { + TopicIdT _o = new TopicIdT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TopicIdT _o) { + String _oOrganization = organization(); + _o.setOrganization(_oOrganization); + String _oAppName = appName(); + _o.setAppName(_oAppName); + String _oTopic = topic(); + _o.setTopic(_oTopic); + } + public static int pack(FlatBufferBuilder builder, TopicIdT _o) { + if (_o == null) return 0; + int _organization = _o.getOrganization() == null ? 0 : builder.createString(_o.getOrganization()); + int _appName = _o.getAppName() == null ? 0 : builder.createString(_o.getAppName()); + int _topic = _o.getTopic() == null ? 0 : builder.createString(_o.getTopic()); + return createTopicId( + builder, + _organization, + _appName, + _topic); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicIdT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicIdT.java new file mode 100644 index 00000000..8359c964 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicIdT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class TopicIdT { + private String organization; + private String appName; + private String topic; + + public String getOrganization() { return organization; } + + public void setOrganization(String organization) { this.organization = organization; } + + public String getAppName() { return appName; } + + public void setAppName(String appName) { this.appName = appName; } + + public String getTopic() { return topic; } + + public void setTopic(String topic) { this.topic = topic; } + + + public TopicIdT() { + this.organization = null; + this.appName = null; + this.topic = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java new file mode 100644 index 00000000..02b96440 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicUnion.java @@ -0,0 +1,35 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class TopicUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public TopicUnion() { + this.type = Topic.NONE; + this.value = null; + } + + public solarxr_protocol.pub_sub.TopicHandleT asTopicHandle() { return (solarxr_protocol.pub_sub.TopicHandleT) value; } + public solarxr_protocol.pub_sub.TopicIdT asTopicId() { return (solarxr_protocol.pub_sub.TopicIdT) value; } + + public static int pack(FlatBufferBuilder builder, TopicUnion _o) { + switch (_o.type) { + case Topic.TopicHandle: return solarxr_protocol.pub_sub.TopicHandle.pack(builder, _o.asTopicHandle()); + case Topic.TopicId: return solarxr_protocol.pub_sub.TopicId.pack(builder, _o.asTopicId()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java index 26d8588d..cf5f3f6a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java @@ -1,70 +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 AssignTrackerRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static AssignTrackerRequest getRootAsAssignTrackerRequest(ByteBuffer _bb) { return getRootAsAssignTrackerRequest(_bb, new AssignTrackerRequest()); } - public static AssignTrackerRequest getRootAsAssignTrackerRequest(ByteBuffer _bb, AssignTrackerRequest 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 AssignTrackerRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.datatypes.TrackerId trackerId() { return trackerId(new solarxr_protocol.datatypes.TrackerId()); } - public solarxr_protocol.datatypes.TrackerId trackerId(solarxr_protocol.datatypes.TrackerId obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public int bodyPosition() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public solarxr_protocol.datatypes.math.Quat mountingRotation() { return mountingRotation(new solarxr_protocol.datatypes.math.Quat()); } - public solarxr_protocol.datatypes.math.Quat mountingRotation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(8); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - public String displayName() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } - public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } - - public static void startAssignTrackerRequest(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } - public static void addBodyPosition(FlatBufferBuilder builder, int bodyPosition) { builder.addByte(1, (byte) bodyPosition, (byte) 0); } - public static void addMountingRotation(FlatBufferBuilder builder, int mountingRotationOffset) { builder.addStruct(2, mountingRotationOffset, 0); } - public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(3, displayNameOffset, 0); } - public static int endAssignTrackerRequest(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 AssignTrackerRequest get(int j) { return get(new AssignTrackerRequest(), j); } - public AssignTrackerRequest get(AssignTrackerRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AssignTrackerRequestT unpack() { - AssignTrackerRequestT _o = new AssignTrackerRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AssignTrackerRequestT _o) { - if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); - else _o.setTrackerId(null); - int _oBodyPosition = bodyPosition(); - _o.setBodyPosition(_oBodyPosition); - if (mountingRotation() != null) mountingRotation().unpackTo(_o.getMountingRotation()); - else _o.setMountingRotation(null); - String _oDisplayName = displayName(); - _o.setDisplayName(_oDisplayName); - } - public static int pack(FlatBufferBuilder builder, AssignTrackerRequestT _o) { - if (_o == null) return 0; - int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); - int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); - startAssignTrackerRequest(builder); - addTrackerId(builder, _trackerId); - addBodyPosition(builder, _o.getBodyPosition()); - addMountingRotation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingRotation())); - addDisplayName(builder, _displayName); - return endAssignTrackerRequest(builder); - } -} - +// 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 AssignTrackerRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static AssignTrackerRequest getRootAsAssignTrackerRequest(ByteBuffer _bb) { return getRootAsAssignTrackerRequest(_bb, new AssignTrackerRequest()); } + public static AssignTrackerRequest getRootAsAssignTrackerRequest(ByteBuffer _bb, AssignTrackerRequest 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 AssignTrackerRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.datatypes.TrackerId trackerId() { return trackerId(new solarxr_protocol.datatypes.TrackerId()); } + public solarxr_protocol.datatypes.TrackerId trackerId(solarxr_protocol.datatypes.TrackerId obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public int bodyPosition() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public solarxr_protocol.datatypes.math.Quat mountingRotation() { return mountingRotation(new solarxr_protocol.datatypes.math.Quat()); } + public solarxr_protocol.datatypes.math.Quat mountingRotation(solarxr_protocol.datatypes.math.Quat obj) { int o = __offset(8); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + public String displayName() { int o = __offset(10); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer displayNameAsByteBuffer() { return __vector_as_bytebuffer(10, 1); } + public ByteBuffer displayNameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 10, 1); } + + public static void startAssignTrackerRequest(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addTrackerId(FlatBufferBuilder builder, int trackerIdOffset) { builder.addOffset(0, trackerIdOffset, 0); } + public static void addBodyPosition(FlatBufferBuilder builder, int bodyPosition) { builder.addByte(1, (byte) bodyPosition, (byte) 0); } + public static void addMountingRotation(FlatBufferBuilder builder, int mountingRotationOffset) { builder.addStruct(2, mountingRotationOffset, 0); } + public static void addDisplayName(FlatBufferBuilder builder, int displayNameOffset) { builder.addOffset(3, displayNameOffset, 0); } + public static int endAssignTrackerRequest(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 AssignTrackerRequest get(int j) { return get(new AssignTrackerRequest(), j); } + public AssignTrackerRequest get(AssignTrackerRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AssignTrackerRequestT unpack() { + AssignTrackerRequestT _o = new AssignTrackerRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AssignTrackerRequestT _o) { + if (trackerId() != null) _o.setTrackerId(trackerId().unpack()); + else _o.setTrackerId(null); + int _oBodyPosition = bodyPosition(); + _o.setBodyPosition(_oBodyPosition); + if (mountingRotation() != null) mountingRotation().unpackTo(_o.getMountingRotation()); + else _o.setMountingRotation(null); + String _oDisplayName = displayName(); + _o.setDisplayName(_oDisplayName); + } + public static int pack(FlatBufferBuilder builder, AssignTrackerRequestT _o) { + if (_o == null) return 0; + int _tracker_id = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); + startAssignTrackerRequest(builder); + addTrackerId(builder, _tracker_id); + addBodyPosition(builder, _o.getBodyPosition()); + addMountingRotation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingRotation())); + addDisplayName(builder, _displayName); + return endAssignTrackerRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java index 923aeb9f..5eef8c55 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequestT.java @@ -1,40 +1,40 @@ -// 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 AssignTrackerRequestT { - private solarxr_protocol.datatypes.TrackerIdT trackerId; - private int bodyPosition; - private solarxr_protocol.datatypes.math.QuatT mountingRotation; - private String displayName; - - public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } - - public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } - - public int getBodyPosition() { return bodyPosition; } - - public void setBodyPosition(int bodyPosition) { this.bodyPosition = bodyPosition; } - - public solarxr_protocol.datatypes.math.QuatT getMountingRotation() { return mountingRotation; } - - public void setMountingRotation(solarxr_protocol.datatypes.math.QuatT mountingRotation) { this.mountingRotation = mountingRotation; } - - public String getDisplayName() { return displayName; } - - public void setDisplayName(String displayName) { this.displayName = displayName; } - - - public AssignTrackerRequestT() { - this.trackerId = null; - this.bodyPosition = 0; - this.mountingRotation = new solarxr_protocol.datatypes.math.QuatT(); - this.displayName = null; - } -} - +// 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 AssignTrackerRequestT { + private solarxr_protocol.datatypes.TrackerIdT trackerId; + private int bodyPosition; + private solarxr_protocol.datatypes.math.QuatT mountingRotation; + private String displayName; + + public solarxr_protocol.datatypes.TrackerIdT getTrackerId() { return trackerId; } + + public void setTrackerId(solarxr_protocol.datatypes.TrackerIdT trackerId) { this.trackerId = trackerId; } + + public int getBodyPosition() { return bodyPosition; } + + public void setBodyPosition(int bodyPosition) { this.bodyPosition = bodyPosition; } + + public solarxr_protocol.datatypes.math.QuatT getMountingRotation() { return mountingRotation; } + + public void setMountingRotation(solarxr_protocol.datatypes.math.QuatT mountingRotation) { this.mountingRotation = mountingRotation; } + + public String getDisplayName() { return displayName; } + + public void setDisplayName(String displayName) { this.displayName = displayName; } + + + public AssignTrackerRequestT() { + this.trackerId = null; + this.bodyPosition = 0; + this.mountingRotation = new solarxr_protocol.datatypes.math.QuatT(); + this.displayName = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java index a6883c83..1412cc79 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponse.java @@ -1,91 +1,91 @@ -// 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 AutoBoneEpochResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static AutoBoneEpochResponse getRootAsAutoBoneEpochResponse(ByteBuffer _bb) { return getRootAsAutoBoneEpochResponse(_bb, new AutoBoneEpochResponse()); } - public static AutoBoneEpochResponse getRootAsAutoBoneEpochResponse(ByteBuffer _bb, AutoBoneEpochResponse 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 AutoBoneEpochResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public long currentEpoch() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - public long totalEpochs() { int o = __offset(6); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - public float epochError() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - public solarxr_protocol.rpc.SkeletonPart adjustedSkeletonParts(int j) { return adjustedSkeletonParts(new solarxr_protocol.rpc.SkeletonPart(), j); } - public solarxr_protocol.rpc.SkeletonPart adjustedSkeletonParts(solarxr_protocol.rpc.SkeletonPart obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int adjustedSkeletonPartsLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.rpc.SkeletonPart.Vector adjustedSkeletonPartsVector() { return adjustedSkeletonPartsVector(new solarxr_protocol.rpc.SkeletonPart.Vector()); } - public solarxr_protocol.rpc.SkeletonPart.Vector adjustedSkeletonPartsVector(solarxr_protocol.rpc.SkeletonPart.Vector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createAutoBoneEpochResponse(FlatBufferBuilder builder, - long currentEpoch, - long totalEpochs, - float epochError, - int adjustedSkeletonPartsOffset) { - builder.startTable(4); - AutoBoneEpochResponse.addAdjustedSkeletonParts(builder, adjustedSkeletonPartsOffset); - AutoBoneEpochResponse.addEpochError(builder, epochError); - AutoBoneEpochResponse.addTotalEpochs(builder, totalEpochs); - AutoBoneEpochResponse.addCurrentEpoch(builder, currentEpoch); - return AutoBoneEpochResponse.endAutoBoneEpochResponse(builder); - } - - public static void startAutoBoneEpochResponse(FlatBufferBuilder builder) { builder.startTable(4); } - public static void addCurrentEpoch(FlatBufferBuilder builder, long currentEpoch) { builder.addInt(0, (int) currentEpoch, (int) 0L); } - public static void addTotalEpochs(FlatBufferBuilder builder, long totalEpochs) { builder.addInt(1, (int) totalEpochs, (int) 0L); } - public static void addEpochError(FlatBufferBuilder builder, float epochError) { builder.addFloat(2, epochError, 0.0f); } - public static void addAdjustedSkeletonParts(FlatBufferBuilder builder, int adjustedSkeletonPartsOffset) { builder.addOffset(3, adjustedSkeletonPartsOffset, 0); } - public static int createAdjustedSkeletonPartsVector(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 startAdjustedSkeletonPartsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endAutoBoneEpochResponse(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 AutoBoneEpochResponse get(int j) { return get(new AutoBoneEpochResponse(), j); } - public AutoBoneEpochResponse get(AutoBoneEpochResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneEpochResponseT unpack() { - AutoBoneEpochResponseT _o = new AutoBoneEpochResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneEpochResponseT _o) { - long _oCurrentEpoch = currentEpoch(); - _o.setCurrentEpoch(_oCurrentEpoch); - long _oTotalEpochs = totalEpochs(); - _o.setTotalEpochs(_oTotalEpochs); - float _oEpochError = epochError(); - _o.setEpochError(_oEpochError); - solarxr_protocol.rpc.SkeletonPartT[] _oAdjustedSkeletonParts = new solarxr_protocol.rpc.SkeletonPartT[adjustedSkeletonPartsLength()]; - for (int _j = 0; _j < adjustedSkeletonPartsLength(); ++_j) {_oAdjustedSkeletonParts[_j] = (adjustedSkeletonParts(_j) != null ? adjustedSkeletonParts(_j).unpack() : null);} - _o.setAdjustedSkeletonParts(_oAdjustedSkeletonParts); - } - public static int pack(FlatBufferBuilder builder, AutoBoneEpochResponseT _o) { - if (_o == null) return 0; - int _adjustedSkeletonParts = 0; - if (_o.getAdjustedSkeletonParts() != null) { - int[] __adjustedSkeletonParts = new int[_o.getAdjustedSkeletonParts().length]; - int _j = 0; - for (solarxr_protocol.rpc.SkeletonPartT _e : _o.getAdjustedSkeletonParts()) { __adjustedSkeletonParts[_j] = solarxr_protocol.rpc.SkeletonPart.pack(builder, _e); _j++;} - _adjustedSkeletonParts = createAdjustedSkeletonPartsVector(builder, __adjustedSkeletonParts); - } - return createAutoBoneEpochResponse( - builder, - _o.getCurrentEpoch(), - _o.getTotalEpochs(), - _o.getEpochError(), - _adjustedSkeletonParts); - } -} - +// 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 AutoBoneEpochResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static AutoBoneEpochResponse getRootAsAutoBoneEpochResponse(ByteBuffer _bb) { return getRootAsAutoBoneEpochResponse(_bb, new AutoBoneEpochResponse()); } + public static AutoBoneEpochResponse getRootAsAutoBoneEpochResponse(ByteBuffer _bb, AutoBoneEpochResponse 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 AutoBoneEpochResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long currentEpoch() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public long totalEpochs() { int o = __offset(6); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public float epochError() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + public solarxr_protocol.rpc.SkeletonPart adjustedSkeletonParts(int j) { return adjustedSkeletonParts(new solarxr_protocol.rpc.SkeletonPart(), j); } + public solarxr_protocol.rpc.SkeletonPart adjustedSkeletonParts(solarxr_protocol.rpc.SkeletonPart obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int adjustedSkeletonPartsLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.SkeletonPart.Vector adjustedSkeletonPartsVector() { return adjustedSkeletonPartsVector(new solarxr_protocol.rpc.SkeletonPart.Vector()); } + public solarxr_protocol.rpc.SkeletonPart.Vector adjustedSkeletonPartsVector(solarxr_protocol.rpc.SkeletonPart.Vector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createAutoBoneEpochResponse(FlatBufferBuilder builder, + long currentEpoch, + long totalEpochs, + float epochError, + int adjustedSkeletonPartsOffset) { + builder.startTable(4); + AutoBoneEpochResponse.addAdjustedSkeletonParts(builder, adjustedSkeletonPartsOffset); + AutoBoneEpochResponse.addEpochError(builder, epochError); + AutoBoneEpochResponse.addTotalEpochs(builder, totalEpochs); + AutoBoneEpochResponse.addCurrentEpoch(builder, currentEpoch); + return AutoBoneEpochResponse.endAutoBoneEpochResponse(builder); + } + + public static void startAutoBoneEpochResponse(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addCurrentEpoch(FlatBufferBuilder builder, long currentEpoch) { builder.addInt(0, (int) currentEpoch, (int) 0L); } + public static void addTotalEpochs(FlatBufferBuilder builder, long totalEpochs) { builder.addInt(1, (int) totalEpochs, (int) 0L); } + public static void addEpochError(FlatBufferBuilder builder, float epochError) { builder.addFloat(2, epochError, 0.0f); } + public static void addAdjustedSkeletonParts(FlatBufferBuilder builder, int adjustedSkeletonPartsOffset) { builder.addOffset(3, adjustedSkeletonPartsOffset, 0); } + public static int createAdjustedSkeletonPartsVector(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 startAdjustedSkeletonPartsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endAutoBoneEpochResponse(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 AutoBoneEpochResponse get(int j) { return get(new AutoBoneEpochResponse(), j); } + public AutoBoneEpochResponse get(AutoBoneEpochResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneEpochResponseT unpack() { + AutoBoneEpochResponseT _o = new AutoBoneEpochResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneEpochResponseT _o) { + long _oCurrentEpoch = currentEpoch(); + _o.setCurrentEpoch(_oCurrentEpoch); + long _oTotalEpochs = totalEpochs(); + _o.setTotalEpochs(_oTotalEpochs); + float _oEpochError = epochError(); + _o.setEpochError(_oEpochError); + solarxr_protocol.rpc.SkeletonPartT[] _oAdjustedSkeletonParts = new solarxr_protocol.rpc.SkeletonPartT[adjustedSkeletonPartsLength()]; + for (int _j = 0; _j < adjustedSkeletonPartsLength(); ++_j) {_oAdjustedSkeletonParts[_j] = (adjustedSkeletonParts(_j) != null ? adjustedSkeletonParts(_j).unpack() : null);} + _o.setAdjustedSkeletonParts(_oAdjustedSkeletonParts); + } + public static int pack(FlatBufferBuilder builder, AutoBoneEpochResponseT _o) { + if (_o == null) return 0; + int _adjustedSkeletonParts = 0; + if (_o.getAdjustedSkeletonParts() != null) { + int[] __adjustedSkeletonParts = new int[_o.getAdjustedSkeletonParts().length]; + int _j = 0; + for (solarxr_protocol.rpc.SkeletonPartT _e : _o.getAdjustedSkeletonParts()) { __adjustedSkeletonParts[_j] = solarxr_protocol.rpc.SkeletonPart.pack(builder, _e); _j++;} + _adjustedSkeletonParts = createAdjustedSkeletonPartsVector(builder, __adjustedSkeletonParts); + } + return createAutoBoneEpochResponse( + builder, + _o.getCurrentEpoch(), + _o.getTotalEpochs(), + _o.getEpochError(), + _adjustedSkeletonParts); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponseT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponseT.java index efdac149..7fa27895 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneEpochResponseT.java @@ -1,40 +1,40 @@ -// 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 AutoBoneEpochResponseT { - private long currentEpoch; - private long totalEpochs; - private float epochError; - private solarxr_protocol.rpc.SkeletonPartT[] adjustedSkeletonParts; - - public long getCurrentEpoch() { return currentEpoch; } - - public void setCurrentEpoch(long currentEpoch) { this.currentEpoch = currentEpoch; } - - public long getTotalEpochs() { return totalEpochs; } - - public void setTotalEpochs(long totalEpochs) { this.totalEpochs = totalEpochs; } - - public float getEpochError() { return epochError; } - - public void setEpochError(float epochError) { this.epochError = epochError; } - - public solarxr_protocol.rpc.SkeletonPartT[] getAdjustedSkeletonParts() { return adjustedSkeletonParts; } - - public void setAdjustedSkeletonParts(solarxr_protocol.rpc.SkeletonPartT[] adjustedSkeletonParts) { this.adjustedSkeletonParts = adjustedSkeletonParts; } - - - public AutoBoneEpochResponseT() { - this.currentEpoch = 0L; - this.totalEpochs = 0L; - this.epochError = 0.0f; - this.adjustedSkeletonParts = null; - } -} - +// 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 AutoBoneEpochResponseT { + private long currentEpoch; + private long totalEpochs; + private float epochError; + private solarxr_protocol.rpc.SkeletonPartT[] adjustedSkeletonParts; + + public long getCurrentEpoch() { return currentEpoch; } + + public void setCurrentEpoch(long currentEpoch) { this.currentEpoch = currentEpoch; } + + public long getTotalEpochs() { return totalEpochs; } + + public void setTotalEpochs(long totalEpochs) { this.totalEpochs = totalEpochs; } + + public float getEpochError() { return epochError; } + + public void setEpochError(float epochError) { this.epochError = epochError; } + + public solarxr_protocol.rpc.SkeletonPartT[] getAdjustedSkeletonParts() { return adjustedSkeletonParts; } + + public void setAdjustedSkeletonParts(solarxr_protocol.rpc.SkeletonPartT[] adjustedSkeletonParts) { this.adjustedSkeletonParts = adjustedSkeletonParts; } + + + public AutoBoneEpochResponseT() { + this.currentEpoch = 0L; + this.totalEpochs = 0L; + this.epochError = 0.0f; + this.adjustedSkeletonParts = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequest.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequest.java index 493e4fcc..8c090cb9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequest.java @@ -1,56 +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 AutoBoneProcessRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static AutoBoneProcessRequest getRootAsAutoBoneProcessRequest(ByteBuffer _bb) { return getRootAsAutoBoneProcessRequest(_bb, new AutoBoneProcessRequest()); } - public static AutoBoneProcessRequest getRootAsAutoBoneProcessRequest(ByteBuffer _bb, AutoBoneProcessRequest 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 AutoBoneProcessRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int processType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - - public static int createAutoBoneProcessRequest(FlatBufferBuilder builder, - int processType) { - builder.startTable(1); - AutoBoneProcessRequest.addProcessType(builder, processType); - return AutoBoneProcessRequest.endAutoBoneProcessRequest(builder); - } - - public static void startAutoBoneProcessRequest(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addProcessType(FlatBufferBuilder builder, int processType) { builder.addByte(0, (byte) processType, (byte) 0); } - public static int endAutoBoneProcessRequest(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 AutoBoneProcessRequest get(int j) { return get(new AutoBoneProcessRequest(), j); } - public AutoBoneProcessRequest get(AutoBoneProcessRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneProcessRequestT unpack() { - AutoBoneProcessRequestT _o = new AutoBoneProcessRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneProcessRequestT _o) { - int _oProcessType = processType(); - _o.setProcessType(_oProcessType); - } - public static int pack(FlatBufferBuilder builder, AutoBoneProcessRequestT _o) { - if (_o == null) return 0; - return createAutoBoneProcessRequest( - builder, - _o.getProcessType()); - } -} - +// 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 AutoBoneProcessRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static AutoBoneProcessRequest getRootAsAutoBoneProcessRequest(ByteBuffer _bb) { return getRootAsAutoBoneProcessRequest(_bb, new AutoBoneProcessRequest()); } + public static AutoBoneProcessRequest getRootAsAutoBoneProcessRequest(ByteBuffer _bb, AutoBoneProcessRequest 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 AutoBoneProcessRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int processType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createAutoBoneProcessRequest(FlatBufferBuilder builder, + int processType) { + builder.startTable(1); + AutoBoneProcessRequest.addProcessType(builder, processType); + return AutoBoneProcessRequest.endAutoBoneProcessRequest(builder); + } + + public static void startAutoBoneProcessRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addProcessType(FlatBufferBuilder builder, int processType) { builder.addByte(0, (byte) processType, (byte) 0); } + public static int endAutoBoneProcessRequest(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 AutoBoneProcessRequest get(int j) { return get(new AutoBoneProcessRequest(), j); } + public AutoBoneProcessRequest get(AutoBoneProcessRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneProcessRequestT unpack() { + AutoBoneProcessRequestT _o = new AutoBoneProcessRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneProcessRequestT _o) { + int _oProcessType = processType(); + _o.setProcessType(_oProcessType); + } + public static int pack(FlatBufferBuilder builder, AutoBoneProcessRequestT _o) { + if (_o == null) return 0; + return createAutoBoneProcessRequest( + builder, + _o.getProcessType()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequestT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequestT.java index 577494f5..968cb38e 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessRequestT.java @@ -1,22 +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 AutoBoneProcessRequestT { - private int processType; - - public int getProcessType() { return processType; } - - public void setProcessType(int processType) { this.processType = processType; } - - - public AutoBoneProcessRequestT() { - this.processType = 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 AutoBoneProcessRequestT { + private int processType; + + public int getProcessType() { return processType; } + + public void setProcessType(int processType) { this.processType = processType; } + + + public AutoBoneProcessRequestT() { + this.processType = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.java index e8e0f0b6..7079c385 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponse.java @@ -1,94 +1,94 @@ -// 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 AutoBoneProcessStatusResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static AutoBoneProcessStatusResponse getRootAsAutoBoneProcessStatusResponse(ByteBuffer _bb) { return getRootAsAutoBoneProcessStatusResponse(_bb, new AutoBoneProcessStatusResponse()); } - public static AutoBoneProcessStatusResponse getRootAsAutoBoneProcessStatusResponse(ByteBuffer _bb, AutoBoneProcessStatusResponse 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 AutoBoneProcessStatusResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int processType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public String message() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer messageAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer messageInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - public long current() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - public long total() { int o = __offset(10); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } - public boolean completed() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean success() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createAutoBoneProcessStatusResponse(FlatBufferBuilder builder, - int processType, - int messageOffset, - long current, - long total, - boolean completed, - boolean success) { - builder.startTable(6); - AutoBoneProcessStatusResponse.addTotal(builder, total); - AutoBoneProcessStatusResponse.addCurrent(builder, current); - AutoBoneProcessStatusResponse.addMessage(builder, messageOffset); - AutoBoneProcessStatusResponse.addSuccess(builder, success); - AutoBoneProcessStatusResponse.addCompleted(builder, completed); - AutoBoneProcessStatusResponse.addProcessType(builder, processType); - return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); - } - - public static void startAutoBoneProcessStatusResponse(FlatBufferBuilder builder) { builder.startTable(6); } - public static void addProcessType(FlatBufferBuilder builder, int processType) { builder.addByte(0, (byte) processType, (byte) 0); } - public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(1, messageOffset, 0); } - public static void addCurrent(FlatBufferBuilder builder, long current) { builder.addInt(2, (int) current, (int) 0L); } - public static void addTotal(FlatBufferBuilder builder, long total) { builder.addInt(3, (int) total, (int) 0L); } - public static void addCompleted(FlatBufferBuilder builder, boolean completed) { builder.addBoolean(4, completed, false); } - public static void addSuccess(FlatBufferBuilder builder, boolean success) { builder.addBoolean(5, success, false); } - public static int endAutoBoneProcessStatusResponse(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 AutoBoneProcessStatusResponse get(int j) { return get(new AutoBoneProcessStatusResponse(), j); } - public AutoBoneProcessStatusResponse get(AutoBoneProcessStatusResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public AutoBoneProcessStatusResponseT unpack() { - AutoBoneProcessStatusResponseT _o = new AutoBoneProcessStatusResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(AutoBoneProcessStatusResponseT _o) { - int _oProcessType = processType(); - _o.setProcessType(_oProcessType); - String _oMessage = message(); - _o.setMessage(_oMessage); - long _oCurrent = current(); - _o.setCurrent(_oCurrent); - long _oTotal = total(); - _o.setTotal(_oTotal); - boolean _oCompleted = completed(); - _o.setCompleted(_oCompleted); - boolean _oSuccess = success(); - _o.setSuccess(_oSuccess); - } - public static int pack(FlatBufferBuilder builder, AutoBoneProcessStatusResponseT _o) { - if (_o == null) return 0; - int _message = _o.getMessage() == null ? 0 : builder.createString(_o.getMessage()); - return createAutoBoneProcessStatusResponse( - builder, - _o.getProcessType(), - _message, - _o.getCurrent(), - _o.getTotal(), - _o.getCompleted(), - _o.getSuccess()); - } -} - +// 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 AutoBoneProcessStatusResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static AutoBoneProcessStatusResponse getRootAsAutoBoneProcessStatusResponse(ByteBuffer _bb) { return getRootAsAutoBoneProcessStatusResponse(_bb, new AutoBoneProcessStatusResponse()); } + public static AutoBoneProcessStatusResponse getRootAsAutoBoneProcessStatusResponse(ByteBuffer _bb, AutoBoneProcessStatusResponse 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 AutoBoneProcessStatusResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int processType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public String message() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer messageAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer messageInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + public long current() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public long total() { int o = __offset(10); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public boolean completed() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean success() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createAutoBoneProcessStatusResponse(FlatBufferBuilder builder, + int processType, + int messageOffset, + long current, + long total, + boolean completed, + boolean success) { + builder.startTable(6); + AutoBoneProcessStatusResponse.addTotal(builder, total); + AutoBoneProcessStatusResponse.addCurrent(builder, current); + AutoBoneProcessStatusResponse.addMessage(builder, messageOffset); + AutoBoneProcessStatusResponse.addSuccess(builder, success); + AutoBoneProcessStatusResponse.addCompleted(builder, completed); + AutoBoneProcessStatusResponse.addProcessType(builder, processType); + return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); + } + + public static void startAutoBoneProcessStatusResponse(FlatBufferBuilder builder) { builder.startTable(6); } + public static void addProcessType(FlatBufferBuilder builder, int processType) { builder.addByte(0, (byte) processType, (byte) 0); } + public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(1, messageOffset, 0); } + public static void addCurrent(FlatBufferBuilder builder, long current) { builder.addInt(2, (int) current, (int) 0L); } + public static void addTotal(FlatBufferBuilder builder, long total) { builder.addInt(3, (int) total, (int) 0L); } + public static void addCompleted(FlatBufferBuilder builder, boolean completed) { builder.addBoolean(4, completed, false); } + public static void addSuccess(FlatBufferBuilder builder, boolean success) { builder.addBoolean(5, success, false); } + public static int endAutoBoneProcessStatusResponse(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 AutoBoneProcessStatusResponse get(int j) { return get(new AutoBoneProcessStatusResponse(), j); } + public AutoBoneProcessStatusResponse get(AutoBoneProcessStatusResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AutoBoneProcessStatusResponseT unpack() { + AutoBoneProcessStatusResponseT _o = new AutoBoneProcessStatusResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AutoBoneProcessStatusResponseT _o) { + int _oProcessType = processType(); + _o.setProcessType(_oProcessType); + String _oMessage = message(); + _o.setMessage(_oMessage); + long _oCurrent = current(); + _o.setCurrent(_oCurrent); + long _oTotal = total(); + _o.setTotal(_oTotal); + boolean _oCompleted = completed(); + _o.setCompleted(_oCompleted); + boolean _oSuccess = success(); + _o.setSuccess(_oSuccess); + } + public static int pack(FlatBufferBuilder builder, AutoBoneProcessStatusResponseT _o) { + if (_o == null) return 0; + int _message = _o.getMessage() == null ? 0 : builder.createString(_o.getMessage()); + return createAutoBoneProcessStatusResponse( + builder, + _o.getProcessType(), + _message, + _o.getCurrent(), + _o.getTotal(), + _o.getCompleted(), + _o.getSuccess()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponseT.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponseT.java index 4cc5961f..bcb80701 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessStatusResponseT.java @@ -1,52 +1,52 @@ -// 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 AutoBoneProcessStatusResponseT { - private int processType; - private String message; - private long current; - private long total; - private boolean completed; - private boolean success; - - public int getProcessType() { return processType; } - - public void setProcessType(int processType) { this.processType = processType; } - - public String getMessage() { return message; } - - public void setMessage(String message) { this.message = message; } - - public long getCurrent() { return current; } - - public void setCurrent(long current) { this.current = current; } - - public long getTotal() { return total; } - - public void setTotal(long total) { this.total = total; } - - public boolean getCompleted() { return completed; } - - public void setCompleted(boolean completed) { this.completed = completed; } - - public boolean getSuccess() { return success; } - - public void setSuccess(boolean success) { this.success = success; } - - - public AutoBoneProcessStatusResponseT() { - this.processType = 0; - this.message = null; - this.current = 0L; - this.total = 0L; - this.completed = false; - this.success = false; - } -} - +// 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 AutoBoneProcessStatusResponseT { + private int processType; + private String message; + private long current; + private long total; + private boolean completed; + private boolean success; + + public int getProcessType() { return processType; } + + public void setProcessType(int processType) { this.processType = processType; } + + public String getMessage() { return message; } + + public void setMessage(String message) { this.message = message; } + + public long getCurrent() { return current; } + + public void setCurrent(long current) { this.current = current; } + + public long getTotal() { return total; } + + public void setTotal(long total) { this.total = total; } + + public boolean getCompleted() { return completed; } + + public void setCompleted(boolean completed) { this.completed = completed; } + + public boolean getSuccess() { return success; } + + public void setSuccess(boolean success) { this.success = success; } + + + public AutoBoneProcessStatusResponseT() { + this.processType = 0; + this.message = null; + this.current = 0L; + this.total = 0L; + this.completed = false; + this.success = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java index a2c2ea15..bb44a8a0 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java +++ b/protocol/java/src/solarxr_protocol/rpc/AutoBoneProcessType.java @@ -1,18 +1,18 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class AutoBoneProcessType { - private AutoBoneProcessType() { } - public static final int NONE = 0; - public static final int RECORD = 1; - public static final int SAVE = 2; - public static final int PROCESS = 3; - public static final int APPLY = 4; - - public static final String[] names = { "NONE", "RECORD", "SAVE", "PROCESS", "APPLY", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class AutoBoneProcessType { + private AutoBoneProcessType() { } + public static final int NONE = 0; + public static final int RECORD = 1; + public static final int SAVE = 2; + public static final int PROCESS = 3; + public static final int APPLY = 4; + + public static final String[] names = { "NONE", "RECORD", "SAVE", "PROCESS", "APPLY", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java index 33bd5a3d..110cf8fb 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java @@ -1,76 +1,76 @@ -// 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 ChangeSettingsRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ChangeSettingsRequest getRootAsChangeSettingsRequest(ByteBuffer _bb) { return getRootAsChangeSettingsRequest(_bb, new ChangeSettingsRequest()); } - public static ChangeSettingsRequest getRootAsChangeSettingsRequest(ByteBuffer _bb, ChangeSettingsRequest 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 ChangeSettingsRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers() { return steamVrTrackers(new solarxr_protocol.rpc.SteamVRTrackersSetting()); } - public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.FilteringSettings filtering() { return filtering(new solarxr_protocol.rpc.FilteringSettings()); } - public solarxr_protocol.rpc.FilteringSettings filtering(solarxr_protocol.rpc.FilteringSettings obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.settings.ModelSettings modelSettings() { return modelSettings(new solarxr_protocol.rpc.settings.ModelSettings()); } - public solarxr_protocol.rpc.settings.ModelSettings modelSettings(solarxr_protocol.rpc.settings.ModelSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createChangeSettingsRequest(FlatBufferBuilder builder, - int steamVrTrackersOffset, - int filteringOffset, - int modelSettingsOffset) { - builder.startTable(3); - ChangeSettingsRequest.addModelSettings(builder, modelSettingsOffset); - ChangeSettingsRequest.addFiltering(builder, filteringOffset); - ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackersOffset); - return ChangeSettingsRequest.endChangeSettingsRequest(builder); - } - - public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(3); } - 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 addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(2, modelSettingsOffset, 0); } - public static int endChangeSettingsRequest(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 ChangeSettingsRequest get(int j) { return get(new ChangeSettingsRequest(), j); } - public ChangeSettingsRequest get(ChangeSettingsRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ChangeSettingsRequestT unpack() { - ChangeSettingsRequestT _o = new ChangeSettingsRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ChangeSettingsRequestT _o) { - if (steamVrTrackers() != null) _o.setSteamVrTrackers(steamVrTrackers().unpack()); - else _o.setSteamVrTrackers(null); - if (filtering() != null) _o.setFiltering(filtering().unpack()); - else _o.setFiltering(null); - if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); - else _o.setModelSettings(null); - } - public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { - if (_o == null) return 0; - int _steamVrTrackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); - int _filtering = _o.getFiltering() == null ? 0 : solarxr_protocol.rpc.FilteringSettings.pack(builder, _o.getFiltering()); - int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); - return createChangeSettingsRequest( - builder, - _steamVrTrackers, - _filtering, - _modelSettings); - } -} - +// 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 ChangeSettingsRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ChangeSettingsRequest getRootAsChangeSettingsRequest(ByteBuffer _bb) { return getRootAsChangeSettingsRequest(_bb, new ChangeSettingsRequest()); } + public static ChangeSettingsRequest getRootAsChangeSettingsRequest(ByteBuffer _bb, ChangeSettingsRequest 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 ChangeSettingsRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers() { return steamVrTrackers(new solarxr_protocol.rpc.SteamVRTrackersSetting()); } + public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.FilteringSettings filtering() { return filtering(new solarxr_protocol.rpc.FilteringSettings()); } + public solarxr_protocol.rpc.FilteringSettings filtering(solarxr_protocol.rpc.FilteringSettings obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.settings.ModelSettings modelSettings() { return modelSettings(new solarxr_protocol.rpc.settings.ModelSettings()); } + public solarxr_protocol.rpc.settings.ModelSettings modelSettings(solarxr_protocol.rpc.settings.ModelSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createChangeSettingsRequest(FlatBufferBuilder builder, + int steamVrTrackersOffset, + int filteringOffset, + int modelSettingsOffset) { + builder.startTable(3); + ChangeSettingsRequest.addModelSettings(builder, modelSettingsOffset); + ChangeSettingsRequest.addFiltering(builder, filteringOffset); + ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackersOffset); + return ChangeSettingsRequest.endChangeSettingsRequest(builder); + } + + public static void startChangeSettingsRequest(FlatBufferBuilder builder) { builder.startTable(3); } + 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 addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(2, modelSettingsOffset, 0); } + public static int endChangeSettingsRequest(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 ChangeSettingsRequest get(int j) { return get(new ChangeSettingsRequest(), j); } + public ChangeSettingsRequest get(ChangeSettingsRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ChangeSettingsRequestT unpack() { + ChangeSettingsRequestT _o = new ChangeSettingsRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ChangeSettingsRequestT _o) { + if (steamVrTrackers() != null) _o.setSteamVrTrackers(steamVrTrackers().unpack()); + else _o.setSteamVrTrackers(null); + if (filtering() != null) _o.setFiltering(filtering().unpack()); + else _o.setFiltering(null); + if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); + else _o.setModelSettings(null); + } + public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { + if (_o == null) return 0; + int _steam_vr_trackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); + int _filtering = _o.getFiltering() == null ? 0 : solarxr_protocol.rpc.FilteringSettings.pack(builder, _o.getFiltering()); + int _model_settings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); + return createChangeSettingsRequest( + builder, + _steam_vr_trackers, + _filtering, + _model_settings); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java index 0aa26207..730e3725 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequestT.java @@ -1,34 +1,34 @@ -// 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 ChangeSettingsRequestT { - private solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers; - private solarxr_protocol.rpc.FilteringSettingsT filtering; - private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; - - public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } - - public void setSteamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers) { this.steamVrTrackers = steamVrTrackers; } - - public solarxr_protocol.rpc.FilteringSettingsT getFiltering() { return filtering; } - - public void setFiltering(solarxr_protocol.rpc.FilteringSettingsT filtering) { this.filtering = filtering; } - - public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } - - public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } - - - public ChangeSettingsRequestT() { - this.steamVrTrackers = null; - this.filtering = null; - this.modelSettings = null; - } -} - +// 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 ChangeSettingsRequestT { + private solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers; + private solarxr_protocol.rpc.FilteringSettingsT filtering; + private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; + + public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } + + public void setSteamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers) { this.steamVrTrackers = steamVrTrackers; } + + public solarxr_protocol.rpc.FilteringSettingsT getFiltering() { return filtering; } + + public void setFiltering(solarxr_protocol.rpc.FilteringSettingsT filtering) { this.filtering = filtering; } + + public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } + + public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } + + + public ChangeSettingsRequestT() { + this.steamVrTrackers = null; + this.filtering = null; + this.modelSettings = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.java index 8ae4d193..a33e50be 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequest.java @@ -1,63 +1,63 @@ -// 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 ChangeSkeletonConfigRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ChangeSkeletonConfigRequest getRootAsChangeSkeletonConfigRequest(ByteBuffer _bb) { return getRootAsChangeSkeletonConfigRequest(_bb, new ChangeSkeletonConfigRequest()); } - public static ChangeSkeletonConfigRequest getRootAsChangeSkeletonConfigRequest(ByteBuffer _bb, ChangeSkeletonConfigRequest 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 ChangeSkeletonConfigRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int bone() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public float value() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - - public static int createChangeSkeletonConfigRequest(FlatBufferBuilder builder, - int bone, - float value) { - builder.startTable(2); - ChangeSkeletonConfigRequest.addValue(builder, value); - ChangeSkeletonConfigRequest.addBone(builder, bone); - return ChangeSkeletonConfigRequest.endChangeSkeletonConfigRequest(builder); - } - - public static void startChangeSkeletonConfigRequest(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addBone(FlatBufferBuilder builder, int bone) { builder.addByte(0, (byte) bone, (byte) 0); } - public static void addValue(FlatBufferBuilder builder, float value) { builder.addFloat(1, value, 0.0f); } - public static int endChangeSkeletonConfigRequest(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 ChangeSkeletonConfigRequest get(int j) { return get(new ChangeSkeletonConfigRequest(), j); } - public ChangeSkeletonConfigRequest get(ChangeSkeletonConfigRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ChangeSkeletonConfigRequestT unpack() { - ChangeSkeletonConfigRequestT _o = new ChangeSkeletonConfigRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ChangeSkeletonConfigRequestT _o) { - int _oBone = bone(); - _o.setBone(_oBone); - float _oValue = value(); - _o.setValue(_oValue); - } - public static int pack(FlatBufferBuilder builder, ChangeSkeletonConfigRequestT _o) { - if (_o == null) return 0; - return createChangeSkeletonConfigRequest( - builder, - _o.getBone(), - _o.getValue()); - } -} - +// 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 ChangeSkeletonConfigRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ChangeSkeletonConfigRequest getRootAsChangeSkeletonConfigRequest(ByteBuffer _bb) { return getRootAsChangeSkeletonConfigRequest(_bb, new ChangeSkeletonConfigRequest()); } + public static ChangeSkeletonConfigRequest getRootAsChangeSkeletonConfigRequest(ByteBuffer _bb, ChangeSkeletonConfigRequest 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 ChangeSkeletonConfigRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int bone() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public float value() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createChangeSkeletonConfigRequest(FlatBufferBuilder builder, + int bone, + float value) { + builder.startTable(2); + ChangeSkeletonConfigRequest.addValue(builder, value); + ChangeSkeletonConfigRequest.addBone(builder, bone); + return ChangeSkeletonConfigRequest.endChangeSkeletonConfigRequest(builder); + } + + public static void startChangeSkeletonConfigRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addBone(FlatBufferBuilder builder, int bone) { builder.addByte(0, (byte) bone, (byte) 0); } + public static void addValue(FlatBufferBuilder builder, float value) { builder.addFloat(1, value, 0.0f); } + public static int endChangeSkeletonConfigRequest(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 ChangeSkeletonConfigRequest get(int j) { return get(new ChangeSkeletonConfigRequest(), j); } + public ChangeSkeletonConfigRequest get(ChangeSkeletonConfigRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ChangeSkeletonConfigRequestT unpack() { + ChangeSkeletonConfigRequestT _o = new ChangeSkeletonConfigRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ChangeSkeletonConfigRequestT _o) { + int _oBone = bone(); + _o.setBone(_oBone); + float _oValue = value(); + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, ChangeSkeletonConfigRequestT _o) { + if (_o == null) return 0; + return createChangeSkeletonConfigRequest( + builder, + _o.getBone(), + _o.getValue()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequestT.java index dbabd008..c24c572a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSkeletonConfigRequestT.java @@ -1,28 +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 ChangeSkeletonConfigRequestT { - private int bone; - private float value; - - public int getBone() { return bone; } - - public void setBone(int bone) { this.bone = bone; } - - public float getValue() { return value; } - - public void setValue(float value) { this.value = value; } - - - public ChangeSkeletonConfigRequestT() { - this.bone = 0; - this.value = 0.0f; - } -} - +// 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 ChangeSkeletonConfigRequestT { + private int bone; + private float value; + + public int getBone() { return bone; } + + public void setBone(int bone) { this.bone = bone; } + + public float getValue() { return value; } + + public void setValue(float value) { this.value = value; } + + + public ChangeSkeletonConfigRequestT() { + this.bone = 0; + this.value = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequest.java b/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequest.java index 8a46141c..ca1df28a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequest.java @@ -1,44 +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 CloseSerialRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static CloseSerialRequest getRootAsCloseSerialRequest(ByteBuffer _bb) { return getRootAsCloseSerialRequest(_bb, new CloseSerialRequest()); } - public static CloseSerialRequest getRootAsCloseSerialRequest(ByteBuffer _bb, CloseSerialRequest 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 CloseSerialRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startCloseSerialRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endCloseSerialRequest(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 CloseSerialRequest get(int j) { return get(new CloseSerialRequest(), j); } - public CloseSerialRequest get(CloseSerialRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public CloseSerialRequestT unpack() { - CloseSerialRequestT _o = new CloseSerialRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(CloseSerialRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, CloseSerialRequestT _o) { - if (_o == null) return 0; - startCloseSerialRequest(builder); - return endCloseSerialRequest(builder); - } -} - +// 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 CloseSerialRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static CloseSerialRequest getRootAsCloseSerialRequest(ByteBuffer _bb) { return getRootAsCloseSerialRequest(_bb, new CloseSerialRequest()); } + public static CloseSerialRequest getRootAsCloseSerialRequest(ByteBuffer _bb, CloseSerialRequest 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 CloseSerialRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startCloseSerialRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endCloseSerialRequest(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 CloseSerialRequest get(int j) { return get(new CloseSerialRequest(), j); } + public CloseSerialRequest get(CloseSerialRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public CloseSerialRequestT unpack() { + CloseSerialRequestT _o = new CloseSerialRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(CloseSerialRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, CloseSerialRequestT _o) { + if (_o == null) return 0; + startCloseSerialRequest(builder); + return endCloseSerialRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequestT.java b/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequestT.java index 16a5ebe5..72ce4134 100644 --- a/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/CloseSerialRequestT.java @@ -1,16 +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 CloseSerialRequestT { - - - public CloseSerialRequestT() { - } -} - +// 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 CloseSerialRequestT { + + + public CloseSerialRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java b/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java index eddf0155..6fec85e9 100644 --- a/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/FilteringSettings.java @@ -1,66 +1,66 @@ -// 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 FilteringSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static FilteringSettings getRootAsFilteringSettings(ByteBuffer _bb) { return getRootAsFilteringSettings(_bb, new FilteringSettings()); } - public static FilteringSettings getRootAsFilteringSettings(ByteBuffer _bb, FilteringSettings 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 FilteringSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int type() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - /** - * 0 to 1. A higher value results in more smoothing or prediction - */ - public float amount() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - - public static int createFilteringSettings(FlatBufferBuilder builder, - int type, - float amount) { - builder.startTable(2); - FilteringSettings.addAmount(builder, amount); - FilteringSettings.addType(builder, type); - return FilteringSettings.endFilteringSettings(builder); - } - - public static void startFilteringSettings(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addType(FlatBufferBuilder builder, int type) { builder.addByte(0, (byte) type, (byte) 0); } - public static void addAmount(FlatBufferBuilder builder, float amount) { builder.addFloat(1, amount, 0.0f); } - public static int endFilteringSettings(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 FilteringSettings get(int j) { return get(new FilteringSettings(), j); } - public FilteringSettings get(FilteringSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public FilteringSettingsT unpack() { - FilteringSettingsT _o = new FilteringSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(FilteringSettingsT _o) { - int _oType = type(); - _o.setType(_oType); - float _oAmount = amount(); - _o.setAmount(_oAmount); - } - public static int pack(FlatBufferBuilder builder, FilteringSettingsT _o) { - if (_o == null) return 0; - return createFilteringSettings( - builder, - _o.getType(), - _o.getAmount()); - } -} - +// 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 FilteringSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static FilteringSettings getRootAsFilteringSettings(ByteBuffer _bb) { return getRootAsFilteringSettings(_bb, new FilteringSettings()); } + public static FilteringSettings getRootAsFilteringSettings(ByteBuffer _bb, FilteringSettings 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 FilteringSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int type() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + /** + * 0 to 1. A higher value results in more smoothing or prediction + */ + public float amount() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createFilteringSettings(FlatBufferBuilder builder, + int type, + float amount) { + builder.startTable(2); + FilteringSettings.addAmount(builder, amount); + FilteringSettings.addType(builder, type); + return FilteringSettings.endFilteringSettings(builder); + } + + public static void startFilteringSettings(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addType(FlatBufferBuilder builder, int type) { builder.addByte(0, (byte) type, (byte) 0); } + public static void addAmount(FlatBufferBuilder builder, float amount) { builder.addFloat(1, amount, 0.0f); } + public static int endFilteringSettings(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 FilteringSettings get(int j) { return get(new FilteringSettings(), j); } + public FilteringSettings get(FilteringSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FilteringSettingsT unpack() { + FilteringSettingsT _o = new FilteringSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FilteringSettingsT _o) { + int _oType = type(); + _o.setType(_oType); + float _oAmount = amount(); + _o.setAmount(_oAmount); + } + public static int pack(FlatBufferBuilder builder, FilteringSettingsT _o) { + if (_o == null) return 0; + return createFilteringSettings( + builder, + _o.getType(), + _o.getAmount()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java index 106ae155..880197fa 100644 --- a/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/FilteringSettingsT.java @@ -1,28 +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 FilteringSettingsT { - private int type; - private float amount; - - public int getType() { return type; } - - public void setType(int type) { this.type = type; } - - public float getAmount() { return amount; } - - public void setAmount(float amount) { this.amount = amount; } - - - public FilteringSettingsT() { - this.type = 0; - this.amount = 0.0f; - } -} - +// 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 FilteringSettingsT { + private int type; + private float amount; + + public int getType() { return type; } + + public void setType(int type) { this.type = type; } + + public float getAmount() { return amount; } + + public void setAmount(float amount) { this.amount = amount; } + + + public FilteringSettingsT() { + this.type = 0; + this.amount = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequest.java b/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequest.java index a95d8e0e..08faee42 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequest.java @@ -1,44 +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 HeartbeatRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static HeartbeatRequest getRootAsHeartbeatRequest(ByteBuffer _bb) { return getRootAsHeartbeatRequest(_bb, new HeartbeatRequest()); } - public static HeartbeatRequest getRootAsHeartbeatRequest(ByteBuffer _bb, HeartbeatRequest 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 HeartbeatRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startHeartbeatRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endHeartbeatRequest(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 HeartbeatRequest get(int j) { return get(new HeartbeatRequest(), j); } - public HeartbeatRequest get(HeartbeatRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public HeartbeatRequestT unpack() { - HeartbeatRequestT _o = new HeartbeatRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HeartbeatRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, HeartbeatRequestT _o) { - if (_o == null) return 0; - startHeartbeatRequest(builder); - return endHeartbeatRequest(builder); - } -} - +// 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 HeartbeatRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static HeartbeatRequest getRootAsHeartbeatRequest(ByteBuffer _bb) { return getRootAsHeartbeatRequest(_bb, new HeartbeatRequest()); } + public static HeartbeatRequest getRootAsHeartbeatRequest(ByteBuffer _bb, HeartbeatRequest 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 HeartbeatRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startHeartbeatRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endHeartbeatRequest(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 HeartbeatRequest get(int j) { return get(new HeartbeatRequest(), j); } + public HeartbeatRequest get(HeartbeatRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public HeartbeatRequestT unpack() { + HeartbeatRequestT _o = new HeartbeatRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HeartbeatRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, HeartbeatRequestT _o) { + if (_o == null) return 0; + startHeartbeatRequest(builder); + return endHeartbeatRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequestT.java b/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequestT.java index 216d6326..983924cf 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeartbeatRequestT.java @@ -1,16 +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 HeartbeatRequestT { - - - public HeartbeatRequestT() { - } -} - +// 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 HeartbeatRequestT { + + + public HeartbeatRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponse.java b/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponse.java index 94a261c2..cafdd0e8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponse.java @@ -1,44 +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 HeartbeatResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static HeartbeatResponse getRootAsHeartbeatResponse(ByteBuffer _bb) { return getRootAsHeartbeatResponse(_bb, new HeartbeatResponse()); } - public static HeartbeatResponse getRootAsHeartbeatResponse(ByteBuffer _bb, HeartbeatResponse 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 HeartbeatResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startHeartbeatResponse(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endHeartbeatResponse(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 HeartbeatResponse get(int j) { return get(new HeartbeatResponse(), j); } - public HeartbeatResponse get(HeartbeatResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public HeartbeatResponseT unpack() { - HeartbeatResponseT _o = new HeartbeatResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(HeartbeatResponseT _o) { - } - public static int pack(FlatBufferBuilder builder, HeartbeatResponseT _o) { - if (_o == null) return 0; - startHeartbeatResponse(builder); - return endHeartbeatResponse(builder); - } -} - +// 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 HeartbeatResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static HeartbeatResponse getRootAsHeartbeatResponse(ByteBuffer _bb) { return getRootAsHeartbeatResponse(_bb, new HeartbeatResponse()); } + public static HeartbeatResponse getRootAsHeartbeatResponse(ByteBuffer _bb, HeartbeatResponse 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 HeartbeatResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startHeartbeatResponse(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endHeartbeatResponse(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 HeartbeatResponse get(int j) { return get(new HeartbeatResponse(), j); } + public HeartbeatResponse get(HeartbeatResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public HeartbeatResponseT unpack() { + HeartbeatResponseT _o = new HeartbeatResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(HeartbeatResponseT _o) { + } + public static int pack(FlatBufferBuilder builder, HeartbeatResponseT _o) { + if (_o == null) return 0; + startHeartbeatResponse(builder); + return endHeartbeatResponse(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponseT.java b/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponseT.java index 89d1dd5f..8c8ab5ea 100644 --- a/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/HeartbeatResponseT.java @@ -1,16 +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 HeartbeatResponseT { - - - public HeartbeatResponseT() { - } -} - +// 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 HeartbeatResponseT { + + + public HeartbeatResponseT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.java index 0e621c51..166aaeab 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequest.java @@ -1,68 +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.*; - -/** - * Changes the state of the overlay's display mode. - */ -@SuppressWarnings("unused") -public final class OverlayDisplayModeChangeRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static OverlayDisplayModeChangeRequest getRootAsOverlayDisplayModeChangeRequest(ByteBuffer _bb) { return getRootAsOverlayDisplayModeChangeRequest(_bb, new OverlayDisplayModeChangeRequest()); } - public static OverlayDisplayModeChangeRequest getRootAsOverlayDisplayModeChangeRequest(ByteBuffer _bb, OverlayDisplayModeChangeRequest 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 OverlayDisplayModeChangeRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasIsVisible() { return 0 != __offset(4); } - public boolean isVisible() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasIsMirrored() { return 0 != __offset(6); } - public boolean isMirrored() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createOverlayDisplayModeChangeRequest(FlatBufferBuilder builder, - boolean isVisible, - boolean isMirrored) { - builder.startTable(2); - OverlayDisplayModeChangeRequest.addIsMirrored(builder, isMirrored); - OverlayDisplayModeChangeRequest.addIsVisible(builder, isVisible); - return OverlayDisplayModeChangeRequest.endOverlayDisplayModeChangeRequest(builder); - } - - public static void startOverlayDisplayModeChangeRequest(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addIsVisible(FlatBufferBuilder builder, boolean isVisible) { builder.addBoolean(0, isVisible, false); } - public static void addIsMirrored(FlatBufferBuilder builder, boolean isMirrored) { builder.addBoolean(1, isMirrored, false); } - public static int endOverlayDisplayModeChangeRequest(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 OverlayDisplayModeChangeRequest get(int j) { return get(new OverlayDisplayModeChangeRequest(), j); } - public OverlayDisplayModeChangeRequest get(OverlayDisplayModeChangeRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OverlayDisplayModeChangeRequestT unpack() { - OverlayDisplayModeChangeRequestT _o = new OverlayDisplayModeChangeRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OverlayDisplayModeChangeRequestT _o) { - Boolean _oIsVisible = hasIsVisible() ? isVisible() : null; - _o.setIsVisible(_oIsVisible); - Boolean _oIsMirrored = hasIsMirrored() ? isMirrored() : null; - _o.setIsMirrored(_oIsMirrored); - } - public static int pack(FlatBufferBuilder builder, OverlayDisplayModeChangeRequestT _o) { - if (_o == null) return 0; - return createOverlayDisplayModeChangeRequest( - builder, - _o.getIsVisible(), - _o.getIsMirrored()); - } -} - +// 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.*; + +/** + * Changes the state of the overlay's display mode. + */ +@SuppressWarnings("unused") +public final class OverlayDisplayModeChangeRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static OverlayDisplayModeChangeRequest getRootAsOverlayDisplayModeChangeRequest(ByteBuffer _bb) { return getRootAsOverlayDisplayModeChangeRequest(_bb, new OverlayDisplayModeChangeRequest()); } + public static OverlayDisplayModeChangeRequest getRootAsOverlayDisplayModeChangeRequest(ByteBuffer _bb, OverlayDisplayModeChangeRequest 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 OverlayDisplayModeChangeRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasIsVisible() { return 0 != __offset(4); } + public boolean isVisible() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasIsMirrored() { return 0 != __offset(6); } + public boolean isMirrored() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createOverlayDisplayModeChangeRequest(FlatBufferBuilder builder, + boolean isVisible, + boolean isMirrored) { + builder.startTable(2); + OverlayDisplayModeChangeRequest.addIsMirrored(builder, isMirrored); + OverlayDisplayModeChangeRequest.addIsVisible(builder, isVisible); + return OverlayDisplayModeChangeRequest.endOverlayDisplayModeChangeRequest(builder); + } + + public static void startOverlayDisplayModeChangeRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addIsVisible(FlatBufferBuilder builder, boolean isVisible) { builder.addBoolean(0, isVisible, false); } + public static void addIsMirrored(FlatBufferBuilder builder, boolean isMirrored) { builder.addBoolean(1, isMirrored, false); } + public static int endOverlayDisplayModeChangeRequest(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 OverlayDisplayModeChangeRequest get(int j) { return get(new OverlayDisplayModeChangeRequest(), j); } + public OverlayDisplayModeChangeRequest get(OverlayDisplayModeChangeRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OverlayDisplayModeChangeRequestT unpack() { + OverlayDisplayModeChangeRequestT _o = new OverlayDisplayModeChangeRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OverlayDisplayModeChangeRequestT _o) { + Boolean _oIsVisible = hasIsVisible() ? isVisible() : null; + _o.setIsVisible(_oIsVisible); + Boolean _oIsMirrored = hasIsMirrored() ? isMirrored() : null; + _o.setIsMirrored(_oIsMirrored); + } + public static int pack(FlatBufferBuilder builder, OverlayDisplayModeChangeRequestT _o) { + if (_o == null) return 0; + return createOverlayDisplayModeChangeRequest( + builder, + _o.getIsVisible(), + _o.getIsMirrored()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequestT.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequestT.java index 4e1d8676..2b05a81c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeChangeRequestT.java @@ -1,28 +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 OverlayDisplayModeChangeRequestT { - private Boolean isVisible; - private Boolean isMirrored; - - public Boolean getIsVisible() { return isVisible; } - - public void setIsVisible(Boolean isVisible) { this.isVisible = isVisible; } - - public Boolean getIsMirrored() { return isMirrored; } - - public void setIsMirrored(Boolean isMirrored) { this.isMirrored = isMirrored; } - - - public OverlayDisplayModeChangeRequestT() { - this.isVisible = null; - this.isMirrored = null; - } -} - +// 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 OverlayDisplayModeChangeRequestT { + private Boolean isVisible; + private Boolean isMirrored; + + public Boolean getIsVisible() { return isVisible; } + + public void setIsVisible(Boolean isVisible) { this.isVisible = isVisible; } + + public Boolean getIsMirrored() { return isMirrored; } + + public void setIsMirrored(Boolean isMirrored) { this.isMirrored = isMirrored; } + + + public OverlayDisplayModeChangeRequestT() { + this.isVisible = null; + this.isMirrored = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.java index 69670931..76fa56d4 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequest.java @@ -1,47 +1,47 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Requests the current state of `OverlayDisplayModeResponse`. - */ -@SuppressWarnings("unused") -public final class OverlayDisplayModeRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static OverlayDisplayModeRequest getRootAsOverlayDisplayModeRequest(ByteBuffer _bb) { return getRootAsOverlayDisplayModeRequest(_bb, new OverlayDisplayModeRequest()); } - public static OverlayDisplayModeRequest getRootAsOverlayDisplayModeRequest(ByteBuffer _bb, OverlayDisplayModeRequest 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 OverlayDisplayModeRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startOverlayDisplayModeRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endOverlayDisplayModeRequest(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 OverlayDisplayModeRequest get(int j) { return get(new OverlayDisplayModeRequest(), j); } - public OverlayDisplayModeRequest get(OverlayDisplayModeRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OverlayDisplayModeRequestT unpack() { - OverlayDisplayModeRequestT _o = new OverlayDisplayModeRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OverlayDisplayModeRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, OverlayDisplayModeRequestT _o) { - if (_o == null) return 0; - startOverlayDisplayModeRequest(builder); - return endOverlayDisplayModeRequest(builder); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Requests the current state of `OverlayDisplayModeResponse`. + */ +@SuppressWarnings("unused") +public final class OverlayDisplayModeRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static OverlayDisplayModeRequest getRootAsOverlayDisplayModeRequest(ByteBuffer _bb) { return getRootAsOverlayDisplayModeRequest(_bb, new OverlayDisplayModeRequest()); } + public static OverlayDisplayModeRequest getRootAsOverlayDisplayModeRequest(ByteBuffer _bb, OverlayDisplayModeRequest 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 OverlayDisplayModeRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startOverlayDisplayModeRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endOverlayDisplayModeRequest(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 OverlayDisplayModeRequest get(int j) { return get(new OverlayDisplayModeRequest(), j); } + public OverlayDisplayModeRequest get(OverlayDisplayModeRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OverlayDisplayModeRequestT unpack() { + OverlayDisplayModeRequestT _o = new OverlayDisplayModeRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OverlayDisplayModeRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, OverlayDisplayModeRequestT _o) { + if (_o == null) return 0; + startOverlayDisplayModeRequest(builder); + return endOverlayDisplayModeRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequestT.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequestT.java index f7224526..79966304 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeRequestT.java @@ -1,16 +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 OverlayDisplayModeRequestT { - - - public OverlayDisplayModeRequestT() { - } -} - +// 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 OverlayDisplayModeRequestT { + + + public OverlayDisplayModeRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.java index af2b4fc5..cf8347ce 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponse.java @@ -1,66 +1,66 @@ -// 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.*; - -/** - * The current state of the overlay's display mode. - */ -@SuppressWarnings("unused") -public final class OverlayDisplayModeResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static OverlayDisplayModeResponse getRootAsOverlayDisplayModeResponse(ByteBuffer _bb) { return getRootAsOverlayDisplayModeResponse(_bb, new OverlayDisplayModeResponse()); } - public static OverlayDisplayModeResponse getRootAsOverlayDisplayModeResponse(ByteBuffer _bb, OverlayDisplayModeResponse 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 OverlayDisplayModeResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean isVisible() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean isMirrored() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createOverlayDisplayModeResponse(FlatBufferBuilder builder, - boolean isVisible, - boolean isMirrored) { - builder.startTable(2); - OverlayDisplayModeResponse.addIsMirrored(builder, isMirrored); - OverlayDisplayModeResponse.addIsVisible(builder, isVisible); - return OverlayDisplayModeResponse.endOverlayDisplayModeResponse(builder); - } - - public static void startOverlayDisplayModeResponse(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addIsVisible(FlatBufferBuilder builder, boolean isVisible) { builder.addBoolean(0, isVisible, false); } - public static void addIsMirrored(FlatBufferBuilder builder, boolean isMirrored) { builder.addBoolean(1, isMirrored, false); } - public static int endOverlayDisplayModeResponse(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 OverlayDisplayModeResponse get(int j) { return get(new OverlayDisplayModeResponse(), j); } - public OverlayDisplayModeResponse get(OverlayDisplayModeResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public OverlayDisplayModeResponseT unpack() { - OverlayDisplayModeResponseT _o = new OverlayDisplayModeResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(OverlayDisplayModeResponseT _o) { - boolean _oIsVisible = isVisible(); - _o.setIsVisible(_oIsVisible); - boolean _oIsMirrored = isMirrored(); - _o.setIsMirrored(_oIsMirrored); - } - public static int pack(FlatBufferBuilder builder, OverlayDisplayModeResponseT _o) { - if (_o == null) return 0; - return createOverlayDisplayModeResponse( - builder, - _o.getIsVisible(), - _o.getIsMirrored()); - } -} - +// 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.*; + +/** + * The current state of the overlay's display mode. + */ +@SuppressWarnings("unused") +public final class OverlayDisplayModeResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static OverlayDisplayModeResponse getRootAsOverlayDisplayModeResponse(ByteBuffer _bb) { return getRootAsOverlayDisplayModeResponse(_bb, new OverlayDisplayModeResponse()); } + public static OverlayDisplayModeResponse getRootAsOverlayDisplayModeResponse(ByteBuffer _bb, OverlayDisplayModeResponse 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 OverlayDisplayModeResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean isVisible() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean isMirrored() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createOverlayDisplayModeResponse(FlatBufferBuilder builder, + boolean isVisible, + boolean isMirrored) { + builder.startTable(2); + OverlayDisplayModeResponse.addIsMirrored(builder, isMirrored); + OverlayDisplayModeResponse.addIsVisible(builder, isVisible); + return OverlayDisplayModeResponse.endOverlayDisplayModeResponse(builder); + } + + public static void startOverlayDisplayModeResponse(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addIsVisible(FlatBufferBuilder builder, boolean isVisible) { builder.addBoolean(0, isVisible, false); } + public static void addIsMirrored(FlatBufferBuilder builder, boolean isMirrored) { builder.addBoolean(1, isMirrored, false); } + public static int endOverlayDisplayModeResponse(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 OverlayDisplayModeResponse get(int j) { return get(new OverlayDisplayModeResponse(), j); } + public OverlayDisplayModeResponse get(OverlayDisplayModeResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public OverlayDisplayModeResponseT unpack() { + OverlayDisplayModeResponseT _o = new OverlayDisplayModeResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(OverlayDisplayModeResponseT _o) { + boolean _oIsVisible = isVisible(); + _o.setIsVisible(_oIsVisible); + boolean _oIsMirrored = isMirrored(); + _o.setIsMirrored(_oIsMirrored); + } + public static int pack(FlatBufferBuilder builder, OverlayDisplayModeResponseT _o) { + if (_o == null) return 0; + return createOverlayDisplayModeResponse( + builder, + _o.getIsVisible(), + _o.getIsMirrored()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponseT.java b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponseT.java index 05f5b75a..0a7c5493 100644 --- a/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/OverlayDisplayModeResponseT.java @@ -1,28 +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 OverlayDisplayModeResponseT { - private boolean isVisible; - private boolean isMirrored; - - public boolean getIsVisible() { return isVisible; } - - public void setIsVisible(boolean isVisible) { this.isVisible = isVisible; } - - public boolean getIsMirrored() { return isMirrored; } - - public void setIsMirrored(boolean isMirrored) { this.isMirrored = isMirrored; } - - - public OverlayDisplayModeResponseT() { - this.isVisible = false; - this.isMirrored = false; - } -} - +// 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 OverlayDisplayModeResponseT { + private boolean isVisible; + private boolean isMirrored; + + public boolean getIsVisible() { return isVisible; } + + public void setIsVisible(boolean isVisible) { this.isVisible = isVisible; } + + public boolean getIsMirrored() { return isMirrored; } + + public void setIsMirrored(boolean isMirrored) { this.isMirrored = isMirrored; } + + + public OverlayDisplayModeResponseT() { + this.isVisible = false; + this.isMirrored = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequest.java b/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequest.java index cccd3d88..e75d0809 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequest.java @@ -1,56 +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 RecordBVHRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static RecordBVHRequest getRootAsRecordBVHRequest(ByteBuffer _bb) { return getRootAsRecordBVHRequest(_bb, new RecordBVHRequest()); } - public static RecordBVHRequest getRootAsRecordBVHRequest(ByteBuffer _bb, RecordBVHRequest 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 RecordBVHRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean stop() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createRecordBVHRequest(FlatBufferBuilder builder, - boolean stop) { - builder.startTable(1); - RecordBVHRequest.addStop(builder, stop); - return RecordBVHRequest.endRecordBVHRequest(builder); - } - - public static void startRecordBVHRequest(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addStop(FlatBufferBuilder builder, boolean stop) { builder.addBoolean(0, stop, false); } - public static int endRecordBVHRequest(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 RecordBVHRequest get(int j) { return get(new RecordBVHRequest(), j); } - public RecordBVHRequest get(RecordBVHRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public RecordBVHRequestT unpack() { - RecordBVHRequestT _o = new RecordBVHRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(RecordBVHRequestT _o) { - boolean _oStop = stop(); - _o.setStop(_oStop); - } - public static int pack(FlatBufferBuilder builder, RecordBVHRequestT _o) { - if (_o == null) return 0; - return createRecordBVHRequest( - builder, - _o.getStop()); - } -} - +// 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 RecordBVHRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static RecordBVHRequest getRootAsRecordBVHRequest(ByteBuffer _bb) { return getRootAsRecordBVHRequest(_bb, new RecordBVHRequest()); } + public static RecordBVHRequest getRootAsRecordBVHRequest(ByteBuffer _bb, RecordBVHRequest 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 RecordBVHRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean stop() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createRecordBVHRequest(FlatBufferBuilder builder, + boolean stop) { + builder.startTable(1); + RecordBVHRequest.addStop(builder, stop); + return RecordBVHRequest.endRecordBVHRequest(builder); + } + + public static void startRecordBVHRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addStop(FlatBufferBuilder builder, boolean stop) { builder.addBoolean(0, stop, false); } + public static int endRecordBVHRequest(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 RecordBVHRequest get(int j) { return get(new RecordBVHRequest(), j); } + public RecordBVHRequest get(RecordBVHRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public RecordBVHRequestT unpack() { + RecordBVHRequestT _o = new RecordBVHRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(RecordBVHRequestT _o) { + boolean _oStop = stop(); + _o.setStop(_oStop); + } + public static int pack(FlatBufferBuilder builder, RecordBVHRequestT _o) { + if (_o == null) return 0; + return createRecordBVHRequest( + builder, + _o.getStop()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequestT.java b/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequestT.java index 286a9999..747aeaa7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/RecordBVHRequestT.java @@ -1,22 +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 RecordBVHRequestT { - private boolean stop; - - public boolean getStop() { return stop; } - - public void setStop(boolean stop) { this.stop = stop; } - - - public RecordBVHRequestT() { - this.stop = false; - } -} - +// 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 RecordBVHRequestT { + private boolean stop; + + public boolean getStop() { return stop; } + + public void setStop(boolean stop) { this.stop = stop; } + + + public RecordBVHRequestT() { + this.stop = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatus.java b/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatus.java index 8ffb014a..abb55ed7 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatus.java +++ b/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatus.java @@ -1,56 +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 RecordBVHStatus extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static RecordBVHStatus getRootAsRecordBVHStatus(ByteBuffer _bb) { return getRootAsRecordBVHStatus(_bb, new RecordBVHStatus()); } - public static RecordBVHStatus getRootAsRecordBVHStatus(ByteBuffer _bb, RecordBVHStatus 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 RecordBVHStatus __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean recording() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createRecordBVHStatus(FlatBufferBuilder builder, - boolean recording) { - builder.startTable(1); - RecordBVHStatus.addRecording(builder, recording); - return RecordBVHStatus.endRecordBVHStatus(builder); - } - - public static void startRecordBVHStatus(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addRecording(FlatBufferBuilder builder, boolean recording) { builder.addBoolean(0, recording, false); } - public static int endRecordBVHStatus(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 RecordBVHStatus get(int j) { return get(new RecordBVHStatus(), j); } - public RecordBVHStatus get(RecordBVHStatus obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public RecordBVHStatusT unpack() { - RecordBVHStatusT _o = new RecordBVHStatusT(); - unpackTo(_o); - return _o; - } - public void unpackTo(RecordBVHStatusT _o) { - boolean _oRecording = recording(); - _o.setRecording(_oRecording); - } - public static int pack(FlatBufferBuilder builder, RecordBVHStatusT _o) { - if (_o == null) return 0; - return createRecordBVHStatus( - builder, - _o.getRecording()); - } -} - +// 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 RecordBVHStatus extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static RecordBVHStatus getRootAsRecordBVHStatus(ByteBuffer _bb) { return getRootAsRecordBVHStatus(_bb, new RecordBVHStatus()); } + public static RecordBVHStatus getRootAsRecordBVHStatus(ByteBuffer _bb, RecordBVHStatus 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 RecordBVHStatus __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean recording() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createRecordBVHStatus(FlatBufferBuilder builder, + boolean recording) { + builder.startTable(1); + RecordBVHStatus.addRecording(builder, recording); + return RecordBVHStatus.endRecordBVHStatus(builder); + } + + public static void startRecordBVHStatus(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addRecording(FlatBufferBuilder builder, boolean recording) { builder.addBoolean(0, recording, false); } + public static int endRecordBVHStatus(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 RecordBVHStatus get(int j) { return get(new RecordBVHStatus(), j); } + public RecordBVHStatus get(RecordBVHStatus obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public RecordBVHStatusT unpack() { + RecordBVHStatusT _o = new RecordBVHStatusT(); + unpackTo(_o); + return _o; + } + public void unpackTo(RecordBVHStatusT _o) { + boolean _oRecording = recording(); + _o.setRecording(_oRecording); + } + public static int pack(FlatBufferBuilder builder, RecordBVHStatusT _o) { + if (_o == null) return 0; + return createRecordBVHStatus( + builder, + _o.getRecording()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatusT.java b/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatusT.java index 5c8be2f2..733e0cfe 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatusT.java +++ b/protocol/java/src/solarxr_protocol/rpc/RecordBVHStatusT.java @@ -1,22 +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 RecordBVHStatusT { - private boolean recording; - - public boolean getRecording() { return recording; } - - public void setRecording(boolean recording) { this.recording = recording; } - - - public RecordBVHStatusT() { - this.recording = false; - } -} - +// 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 RecordBVHStatusT { + private boolean recording; + + public boolean getRecording() { return recording; } + + public void setRecording(boolean recording) { this.recording = recording; } + + + public RecordBVHStatusT() { + this.recording = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetRequest.java b/protocol/java/src/solarxr_protocol/rpc/ResetRequest.java index bad28a4c..992bf6ba 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetRequest.java @@ -1,56 +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 ResetRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ResetRequest getRootAsResetRequest(ByteBuffer _bb) { return getRootAsResetRequest(_bb, new ResetRequest()); } - public static ResetRequest getRootAsResetRequest(ByteBuffer _bb, ResetRequest 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 ResetRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int resetType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - - public static int createResetRequest(FlatBufferBuilder builder, - int resetType) { - builder.startTable(1); - ResetRequest.addResetType(builder, resetType); - return ResetRequest.endResetRequest(builder); - } - - public static void startResetRequest(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addResetType(FlatBufferBuilder builder, int resetType) { builder.addByte(0, (byte) resetType, (byte) 0); } - public static int endResetRequest(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 ResetRequest get(int j) { return get(new ResetRequest(), j); } - public ResetRequest get(ResetRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ResetRequestT unpack() { - ResetRequestT _o = new ResetRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ResetRequestT _o) { - int _oResetType = resetType(); - _o.setResetType(_oResetType); - } - public static int pack(FlatBufferBuilder builder, ResetRequestT _o) { - if (_o == null) return 0; - return createResetRequest( - builder, - _o.getResetType()); - } -} - +// 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 ResetRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ResetRequest getRootAsResetRequest(ByteBuffer _bb) { return getRootAsResetRequest(_bb, new ResetRequest()); } + public static ResetRequest getRootAsResetRequest(ByteBuffer _bb, ResetRequest 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 ResetRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int resetType() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createResetRequest(FlatBufferBuilder builder, + int resetType) { + builder.startTable(1); + ResetRequest.addResetType(builder, resetType); + return ResetRequest.endResetRequest(builder); + } + + public static void startResetRequest(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addResetType(FlatBufferBuilder builder, int resetType) { builder.addByte(0, (byte) resetType, (byte) 0); } + public static int endResetRequest(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 ResetRequest get(int j) { return get(new ResetRequest(), j); } + public ResetRequest get(ResetRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ResetRequestT unpack() { + ResetRequestT _o = new ResetRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ResetRequestT _o) { + int _oResetType = resetType(); + _o.setResetType(_oResetType); + } + public static int pack(FlatBufferBuilder builder, ResetRequestT _o) { + if (_o == null) return 0; + return createResetRequest( + builder, + _o.getResetType()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetRequestT.java b/protocol/java/src/solarxr_protocol/rpc/ResetRequestT.java index b0abcad1..7d11b5af 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetRequestT.java @@ -1,22 +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 ResetRequestT { - private int resetType; - - public int getResetType() { return resetType; } - - public void setResetType(int resetType) { this.resetType = resetType; } - - - public ResetRequestT() { - this.resetType = 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 ResetRequestT { + private int resetType; + + public int getResetType() { return resetType; } + + public void setResetType(int resetType) { this.resetType = resetType; } + + + public ResetRequestT() { + this.resetType = 0; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetResponse.java b/protocol/java/src/solarxr_protocol/rpc/ResetResponse.java index ecdd6e82..9a387340 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetResponse.java @@ -1,44 +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 ResetResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ResetResponse getRootAsResetResponse(ByteBuffer _bb) { return getRootAsResetResponse(_bb, new ResetResponse()); } - public static ResetResponse getRootAsResetResponse(ByteBuffer _bb, ResetResponse 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 ResetResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startResetResponse(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endResetResponse(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 ResetResponse get(int j) { return get(new ResetResponse(), j); } - public ResetResponse get(ResetResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ResetResponseT unpack() { - ResetResponseT _o = new ResetResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ResetResponseT _o) { - } - public static int pack(FlatBufferBuilder builder, ResetResponseT _o) { - if (_o == null) return 0; - startResetResponse(builder); - return endResetResponse(builder); - } -} - +// 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 ResetResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ResetResponse getRootAsResetResponse(ByteBuffer _bb) { return getRootAsResetResponse(_bb, new ResetResponse()); } + public static ResetResponse getRootAsResetResponse(ByteBuffer _bb, ResetResponse 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 ResetResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startResetResponse(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endResetResponse(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 ResetResponse get(int j) { return get(new ResetResponse(), j); } + public ResetResponse get(ResetResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ResetResponseT unpack() { + ResetResponseT _o = new ResetResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ResetResponseT _o) { + } + public static int pack(FlatBufferBuilder builder, ResetResponseT _o) { + if (_o == null) return 0; + startResetResponse(builder); + return endResetResponse(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java b/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java index a964549e..be53d019 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetResponseT.java @@ -1,16 +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 ResetResponseT { - - - public ResetResponseT() { - } -} - +// 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 ResetResponseT { + + + public ResetResponseT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/ResetType.java b/protocol/java/src/solarxr_protocol/rpc/ResetType.java index 870d48dc..163c2b11 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ResetType.java +++ b/protocol/java/src/solarxr_protocol/rpc/ResetType.java @@ -1,20 +1,20 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class ResetType { - private ResetType() { } - public static final int Quick = 0; - public static final int Full = 1; - public static final int Recalibrate = 2; - /** - * Second pose for calibrating mounting rotation - */ - public static final int Mounting = 3; - - public static final String[] names = { "Quick", "Full", "Recalibrate", "Mounting", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class ResetType { + private ResetType() { } + public static final int Quick = 0; + public static final int Full = 1; + public static final int Recalibrate = 2; + /** + * Second pose for calibrating mounting rotation + */ + public static final int Mounting = 3; + + public static final String[] names = { "Quick", "Full", "Recalibrate", "Mounting", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java index 808818f8..77e9aafd 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessage.java @@ -1,40 +1,40 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class RpcMessage { - private RpcMessage() { } - public static final byte NONE = 0; - public static final byte HeartbeatRequest = 1; - public static final byte HeartbeatResponse = 2; - public static final byte ResetRequest = 3; - public static final byte AssignTrackerRequest = 4; - public static final byte SettingsRequest = 5; - public static final byte SettingsResponse = 6; - public static final byte ChangeSettingsRequest = 7; - public static final byte RecordBVHRequest = 8; - public static final byte RecordBVHStatus = 9; - public static final byte SkeletonConfigRequest = 10; - public static final byte ChangeSkeletonConfigRequest = 11; - public static final byte SkeletonResetAllRequest = 12; - public static final byte SkeletonConfigResponse = 13; - public static final byte OpenSerialRequest = 14; - public static final byte CloseSerialRequest = 15; - public static final byte SetWifiRequest = 16; - public static final byte SerialUpdateResponse = 17; - public static final byte AutoBoneProcessRequest = 18; - public static final byte AutoBoneProcessStatusResponse = 19; - public static final byte AutoBoneEpochResponse = 20; - public static final byte OverlayDisplayModeRequest = 21; - public static final byte OverlayDisplayModeChangeRequest = 22; - public static final byte OverlayDisplayModeResponse = 23; - public static final byte SerialTrackerRebootRequest = 24; - public static final byte SerialTrackerGetInfoRequest = 25; - public static final byte SerialTrackerFactoryResetRequest = 26; - - public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class RpcMessage { + private RpcMessage() { } + public static final byte NONE = 0; + public static final byte HeartbeatRequest = 1; + public static final byte HeartbeatResponse = 2; + public static final byte ResetRequest = 3; + public static final byte AssignTrackerRequest = 4; + public static final byte SettingsRequest = 5; + public static final byte SettingsResponse = 6; + public static final byte ChangeSettingsRequest = 7; + public static final byte RecordBVHRequest = 8; + public static final byte RecordBVHStatus = 9; + public static final byte SkeletonConfigRequest = 10; + public static final byte ChangeSkeletonConfigRequest = 11; + public static final byte SkeletonResetAllRequest = 12; + public static final byte SkeletonConfigResponse = 13; + public static final byte OpenSerialRequest = 14; + public static final byte CloseSerialRequest = 15; + public static final byte SetWifiRequest = 16; + public static final byte SerialUpdateResponse = 17; + public static final byte AutoBoneProcessRequest = 18; + public static final byte AutoBoneProcessStatusResponse = 19; + public static final byte AutoBoneEpochResponse = 20; + public static final byte OverlayDisplayModeRequest = 21; + public static final byte OverlayDisplayModeChangeRequest = 22; + public static final byte OverlayDisplayModeResponse = 23; + public static final byte SerialTrackerRebootRequest = 24; + public static final byte SerialTrackerGetInfoRequest = 25; + public static final byte SerialTrackerFactoryResetRequest = 26; + + public static final String[] names = { "NONE", "HeartbeatRequest", "HeartbeatResponse", "ResetRequest", "AssignTrackerRequest", "SettingsRequest", "SettingsResponse", "ChangeSettingsRequest", "RecordBVHRequest", "RecordBVHStatus", "SkeletonConfigRequest", "ChangeSkeletonConfigRequest", "SkeletonResetAllRequest", "SkeletonConfigResponse", "OpenSerialRequest", "CloseSerialRequest", "SetWifiRequest", "SerialUpdateResponse", "AutoBoneProcessRequest", "AutoBoneProcessStatusResponse", "AutoBoneEpochResponse", "OverlayDisplayModeRequest", "OverlayDisplayModeChangeRequest", "OverlayDisplayModeResponse", "SerialTrackerRebootRequest", "SerialTrackerGetInfoRequest", "SerialTrackerFactoryResetRequest", }; + + 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 6acd0e84..5af5100a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeader.java @@ -1,174 +1,174 @@ -// 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 RpcMessageHeader extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static RpcMessageHeader getRootAsRpcMessageHeader(ByteBuffer _bb) { return getRootAsRpcMessageHeader(_bb, new RpcMessageHeader()); } - public static RpcMessageHeader getRootAsRpcMessageHeader(ByteBuffer _bb, RpcMessageHeader 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 RpcMessageHeader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - /** - * For a request, this identifies the request. For a response, this corresponds - * to the request that it is responding to. - */ - public solarxr_protocol.datatypes.TransactionId txId() { return txId(new solarxr_protocol.datatypes.TransactionId()); } - public solarxr_protocol.datatypes.TransactionId txId(solarxr_protocol.datatypes.TransactionId obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } - public byte messageType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } - public Table message(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } - - public static void startRpcMessageHeader(FlatBufferBuilder builder) { builder.startTable(3); } - public static void addTxId(FlatBufferBuilder builder, int txIdOffset) { builder.addStruct(0, txIdOffset, 0); } - public static void addMessageType(FlatBufferBuilder builder, byte messageType) { builder.addByte(1, messageType, 0); } - public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(2, messageOffset, 0); } - public static int endRpcMessageHeader(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 RpcMessageHeader get(int j) { return get(new RpcMessageHeader(), j); } - public RpcMessageHeader get(RpcMessageHeader obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public RpcMessageHeaderT unpack() { - RpcMessageHeaderT _o = new RpcMessageHeaderT(); - unpackTo(_o); - return _o; - } - public void unpackTo(RpcMessageHeaderT _o) { - if (txId() != null) txId().unpackTo(_o.getTxId()); - else _o.setTxId(null); - solarxr_protocol.rpc.RpcMessageUnion _oMessage = new solarxr_protocol.rpc.RpcMessageUnion(); - byte _oMessageType = messageType(); - _oMessage.setType(_oMessageType); - Table _oMessageValue; - switch (_oMessageType) { - case solarxr_protocol.rpc.RpcMessage.HeartbeatRequest: - _oMessageValue = message(new solarxr_protocol.rpc.HeartbeatRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeartbeatRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.HeartbeatResponse: - _oMessageValue = message(new solarxr_protocol.rpc.HeartbeatResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeartbeatResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ResetRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ResetRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ResetRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AssignTrackerRequest: - _oMessageValue = message(new solarxr_protocol.rpc.AssignTrackerRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AssignTrackerRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SettingsRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SettingsRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SettingsRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SettingsResponse: - _oMessageValue = message(new solarxr_protocol.rpc.SettingsResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SettingsResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ChangeSettingsRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ChangeSettingsRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ChangeSettingsRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.RecordBVHRequest: - _oMessageValue = message(new solarxr_protocol.rpc.RecordBVHRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.RecordBVHRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.RecordBVHStatus: - _oMessageValue = message(new solarxr_protocol.rpc.RecordBVHStatus()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.RecordBVHStatus) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SkeletonConfigRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SkeletonConfigRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SkeletonConfigRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.ChangeSkeletonConfigRequest: - _oMessageValue = message(new solarxr_protocol.rpc.ChangeSkeletonConfigRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ChangeSkeletonConfigRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SkeletonResetAllRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SkeletonResetAllRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SkeletonResetAllRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SkeletonConfigResponse: - _oMessageValue = message(new solarxr_protocol.rpc.SkeletonConfigResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SkeletonConfigResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.OpenSerialRequest: - _oMessageValue = message(new solarxr_protocol.rpc.OpenSerialRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OpenSerialRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.CloseSerialRequest: - _oMessageValue = message(new solarxr_protocol.rpc.CloseSerialRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.CloseSerialRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SetWifiRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SetWifiRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SetWifiRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SerialUpdateResponse: - _oMessageValue = message(new solarxr_protocol.rpc.SerialUpdateResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialUpdateResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AutoBoneProcessRequest: - _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneProcessRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneProcessRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AutoBoneProcessStatusResponse: - _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneProcessStatusResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneProcessStatusResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.AutoBoneEpochResponse: - _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneEpochResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneEpochResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.OverlayDisplayModeRequest: - _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.OverlayDisplayModeChangeRequest: - _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeChangeRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeChangeRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.OverlayDisplayModeResponse: - _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeResponse()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeResponse) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SerialTrackerRebootRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerRebootRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerRebootRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetInfoRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetInfoRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetInfoRequest) _oMessageValue).unpack() : null); - break; - case solarxr_protocol.rpc.RpcMessage.SerialTrackerFactoryResetRequest: - _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerFactoryResetRequest()); - _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerFactoryResetRequest) _oMessageValue).unpack() : null); - break; - default: break; - } - _o.setMessage(_oMessage); - } - public static int pack(FlatBufferBuilder builder, RpcMessageHeaderT _o) { - if (_o == null) return 0; - byte _messageType = _o.getMessage() == null ? solarxr_protocol.rpc.RpcMessage.NONE : _o.getMessage().getType(); - int _message = _o.getMessage() == null ? 0 : solarxr_protocol.rpc.RpcMessageUnion.pack(builder, _o.getMessage()); - startRpcMessageHeader(builder); - addTxId(builder, solarxr_protocol.datatypes.TransactionId.pack(builder, _o.getTxId())); - addMessageType(builder, _messageType); - addMessage(builder, _message); - return endRpcMessageHeader(builder); - } -} - +// 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 RpcMessageHeader extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static RpcMessageHeader getRootAsRpcMessageHeader(ByteBuffer _bb) { return getRootAsRpcMessageHeader(_bb, new RpcMessageHeader()); } + public static RpcMessageHeader getRootAsRpcMessageHeader(ByteBuffer _bb, RpcMessageHeader 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 RpcMessageHeader __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + /** + * For a request, this identifies the request. For a response, this corresponds + * to the request that it is responding to. + */ + public solarxr_protocol.datatypes.TransactionId txId() { return txId(new solarxr_protocol.datatypes.TransactionId()); } + public solarxr_protocol.datatypes.TransactionId txId(solarxr_protocol.datatypes.TransactionId obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + public byte messageType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table message(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static void startRpcMessageHeader(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addTxId(FlatBufferBuilder builder, int txIdOffset) { builder.addStruct(0, txIdOffset, 0); } + public static void addMessageType(FlatBufferBuilder builder, byte messageType) { builder.addByte(1, messageType, 0); } + public static void addMessage(FlatBufferBuilder builder, int messageOffset) { builder.addOffset(2, messageOffset, 0); } + public static int endRpcMessageHeader(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 RpcMessageHeader get(int j) { return get(new RpcMessageHeader(), j); } + public RpcMessageHeader get(RpcMessageHeader obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public RpcMessageHeaderT unpack() { + RpcMessageHeaderT _o = new RpcMessageHeaderT(); + unpackTo(_o); + return _o; + } + public void unpackTo(RpcMessageHeaderT _o) { + if (txId() != null) txId().unpackTo(_o.getTxId()); + else _o.setTxId(null); + solarxr_protocol.rpc.RpcMessageUnion _oMessage = new solarxr_protocol.rpc.RpcMessageUnion(); + byte _oMessageType = messageType(); + _oMessage.setType(_oMessageType); + Table _oMessageValue; + switch (_oMessageType) { + case solarxr_protocol.rpc.RpcMessage.HeartbeatRequest: + _oMessageValue = message(new solarxr_protocol.rpc.HeartbeatRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeartbeatRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.HeartbeatResponse: + _oMessageValue = message(new solarxr_protocol.rpc.HeartbeatResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.HeartbeatResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ResetRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ResetRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ResetRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AssignTrackerRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AssignTrackerRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AssignTrackerRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SettingsRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SettingsRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SettingsRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SettingsResponse: + _oMessageValue = message(new solarxr_protocol.rpc.SettingsResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SettingsResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ChangeSettingsRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ChangeSettingsRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ChangeSettingsRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.RecordBVHRequest: + _oMessageValue = message(new solarxr_protocol.rpc.RecordBVHRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.RecordBVHRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.RecordBVHStatus: + _oMessageValue = message(new solarxr_protocol.rpc.RecordBVHStatus()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.RecordBVHStatus) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SkeletonConfigRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SkeletonConfigRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SkeletonConfigRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.ChangeSkeletonConfigRequest: + _oMessageValue = message(new solarxr_protocol.rpc.ChangeSkeletonConfigRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.ChangeSkeletonConfigRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SkeletonResetAllRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SkeletonResetAllRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SkeletonResetAllRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SkeletonConfigResponse: + _oMessageValue = message(new solarxr_protocol.rpc.SkeletonConfigResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SkeletonConfigResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.OpenSerialRequest: + _oMessageValue = message(new solarxr_protocol.rpc.OpenSerialRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OpenSerialRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.CloseSerialRequest: + _oMessageValue = message(new solarxr_protocol.rpc.CloseSerialRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.CloseSerialRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SetWifiRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SetWifiRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SetWifiRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialUpdateResponse: + _oMessageValue = message(new solarxr_protocol.rpc.SerialUpdateResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialUpdateResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AutoBoneProcessRequest: + _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneProcessRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneProcessRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AutoBoneProcessStatusResponse: + _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneProcessStatusResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneProcessStatusResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.AutoBoneEpochResponse: + _oMessageValue = message(new solarxr_protocol.rpc.AutoBoneEpochResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.AutoBoneEpochResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.OverlayDisplayModeRequest: + _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.OverlayDisplayModeChangeRequest: + _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeChangeRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeChangeRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.OverlayDisplayModeResponse: + _oMessageValue = message(new solarxr_protocol.rpc.OverlayDisplayModeResponse()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.OverlayDisplayModeResponse) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerRebootRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerRebootRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerRebootRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerGetInfoRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerGetInfoRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerGetInfoRequest) _oMessageValue).unpack() : null); + break; + case solarxr_protocol.rpc.RpcMessage.SerialTrackerFactoryResetRequest: + _oMessageValue = message(new solarxr_protocol.rpc.SerialTrackerFactoryResetRequest()); + _oMessage.setValue(_oMessageValue != null ? ((solarxr_protocol.rpc.SerialTrackerFactoryResetRequest) _oMessageValue).unpack() : null); + break; + default: break; + } + _o.setMessage(_oMessage); + } + public static int pack(FlatBufferBuilder builder, RpcMessageHeaderT _o) { + if (_o == null) return 0; + byte _messageType = _o.getMessage() == null ? solarxr_protocol.rpc.RpcMessage.NONE : _o.getMessage().getType(); + int _message = _o.getMessage() == null ? 0 : solarxr_protocol.rpc.RpcMessageUnion.pack(builder, _o.getMessage()); + startRpcMessageHeader(builder); + addTxId(builder, solarxr_protocol.datatypes.TransactionId.pack(builder, _o.getTxId())); + addMessageType(builder, _messageType); + addMessage(builder, _message); + return endRpcMessageHeader(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeaderT.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeaderT.java index e679bdc0..feb5a83c 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeaderT.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageHeaderT.java @@ -1,28 +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 RpcMessageHeaderT { - private solarxr_protocol.datatypes.TransactionIdT txId; - private solarxr_protocol.rpc.RpcMessageUnion message; - - public solarxr_protocol.datatypes.TransactionIdT getTxId() { return txId; } - - public void setTxId(solarxr_protocol.datatypes.TransactionIdT txId) { this.txId = txId; } - - public solarxr_protocol.rpc.RpcMessageUnion getMessage() { return message; } - - public void setMessage(solarxr_protocol.rpc.RpcMessageUnion message) { this.message = message; } - - - public RpcMessageHeaderT() { - this.txId = new solarxr_protocol.datatypes.TransactionIdT(); - this.message = null; - } -} - +// 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 RpcMessageHeaderT { + private solarxr_protocol.datatypes.TransactionIdT txId; + private solarxr_protocol.rpc.RpcMessageUnion message; + + public solarxr_protocol.datatypes.TransactionIdT getTxId() { return txId; } + + public void setTxId(solarxr_protocol.datatypes.TransactionIdT txId) { this.txId = txId; } + + public solarxr_protocol.rpc.RpcMessageUnion getMessage() { return message; } + + public void setMessage(solarxr_protocol.rpc.RpcMessageUnion message) { this.message = message; } + + + public RpcMessageHeaderT() { + this.txId = new solarxr_protocol.datatypes.TransactionIdT(); + this.message = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java index c0941e60..8fb532cf 100644 --- a/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java +++ b/protocol/java/src/solarxr_protocol/rpc/RpcMessageUnion.java @@ -1,83 +1,83 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -import com.google.flatbuffers.FlatBufferBuilder; - -public class RpcMessageUnion { - private byte type; - private Object value; - - public byte getType() { return type; } - - public void setType(byte type) { this.type = type; } - - public Object getValue() { return value; } - - public void setValue(Object value) { this.value = value; } - - public RpcMessageUnion() { - this.type = RpcMessage.NONE; - this.value = null; - } - - public solarxr_protocol.rpc.HeartbeatRequestT asHeartbeatRequest() { return (solarxr_protocol.rpc.HeartbeatRequestT) value; } - public solarxr_protocol.rpc.HeartbeatResponseT asHeartbeatResponse() { return (solarxr_protocol.rpc.HeartbeatResponseT) value; } - public solarxr_protocol.rpc.ResetRequestT asResetRequest() { return (solarxr_protocol.rpc.ResetRequestT) value; } - public solarxr_protocol.rpc.AssignTrackerRequestT asAssignTrackerRequest() { return (solarxr_protocol.rpc.AssignTrackerRequestT) value; } - public solarxr_protocol.rpc.SettingsRequestT asSettingsRequest() { return (solarxr_protocol.rpc.SettingsRequestT) value; } - public solarxr_protocol.rpc.SettingsResponseT asSettingsResponse() { return (solarxr_protocol.rpc.SettingsResponseT) value; } - public solarxr_protocol.rpc.ChangeSettingsRequestT asChangeSettingsRequest() { return (solarxr_protocol.rpc.ChangeSettingsRequestT) value; } - public solarxr_protocol.rpc.RecordBVHRequestT asRecordBVHRequest() { return (solarxr_protocol.rpc.RecordBVHRequestT) value; } - public solarxr_protocol.rpc.RecordBVHStatusT asRecordBVHStatus() { return (solarxr_protocol.rpc.RecordBVHStatusT) value; } - public solarxr_protocol.rpc.SkeletonConfigRequestT asSkeletonConfigRequest() { return (solarxr_protocol.rpc.SkeletonConfigRequestT) value; } - public solarxr_protocol.rpc.ChangeSkeletonConfigRequestT asChangeSkeletonConfigRequest() { return (solarxr_protocol.rpc.ChangeSkeletonConfigRequestT) value; } - public solarxr_protocol.rpc.SkeletonResetAllRequestT asSkeletonResetAllRequest() { return (solarxr_protocol.rpc.SkeletonResetAllRequestT) value; } - public solarxr_protocol.rpc.SkeletonConfigResponseT asSkeletonConfigResponse() { return (solarxr_protocol.rpc.SkeletonConfigResponseT) value; } - public solarxr_protocol.rpc.OpenSerialRequestT asOpenSerialRequest() { return (solarxr_protocol.rpc.OpenSerialRequestT) value; } - public solarxr_protocol.rpc.CloseSerialRequestT asCloseSerialRequest() { return (solarxr_protocol.rpc.CloseSerialRequestT) value; } - public solarxr_protocol.rpc.SetWifiRequestT asSetWifiRequest() { return (solarxr_protocol.rpc.SetWifiRequestT) value; } - public solarxr_protocol.rpc.SerialUpdateResponseT asSerialUpdateResponse() { return (solarxr_protocol.rpc.SerialUpdateResponseT) value; } - public solarxr_protocol.rpc.AutoBoneProcessRequestT asAutoBoneProcessRequest() { return (solarxr_protocol.rpc.AutoBoneProcessRequestT) value; } - public solarxr_protocol.rpc.AutoBoneProcessStatusResponseT asAutoBoneProcessStatusResponse() { return (solarxr_protocol.rpc.AutoBoneProcessStatusResponseT) value; } - public solarxr_protocol.rpc.AutoBoneEpochResponseT asAutoBoneEpochResponse() { return (solarxr_protocol.rpc.AutoBoneEpochResponseT) value; } - public solarxr_protocol.rpc.OverlayDisplayModeRequestT asOverlayDisplayModeRequest() { return (solarxr_protocol.rpc.OverlayDisplayModeRequestT) value; } - public solarxr_protocol.rpc.OverlayDisplayModeChangeRequestT asOverlayDisplayModeChangeRequest() { return (solarxr_protocol.rpc.OverlayDisplayModeChangeRequestT) value; } - public solarxr_protocol.rpc.OverlayDisplayModeResponseT asOverlayDisplayModeResponse() { return (solarxr_protocol.rpc.OverlayDisplayModeResponseT) value; } - public solarxr_protocol.rpc.SerialTrackerRebootRequestT asSerialTrackerRebootRequest() { return (solarxr_protocol.rpc.SerialTrackerRebootRequestT) value; } - public solarxr_protocol.rpc.SerialTrackerGetInfoRequestT asSerialTrackerGetInfoRequest() { return (solarxr_protocol.rpc.SerialTrackerGetInfoRequestT) value; } - public solarxr_protocol.rpc.SerialTrackerFactoryResetRequestT asSerialTrackerFactoryResetRequest() { return (solarxr_protocol.rpc.SerialTrackerFactoryResetRequestT) value; } - - public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { - switch (_o.type) { - case RpcMessage.HeartbeatRequest: return solarxr_protocol.rpc.HeartbeatRequest.pack(builder, _o.asHeartbeatRequest()); - case RpcMessage.HeartbeatResponse: return solarxr_protocol.rpc.HeartbeatResponse.pack(builder, _o.asHeartbeatResponse()); - case RpcMessage.ResetRequest: return solarxr_protocol.rpc.ResetRequest.pack(builder, _o.asResetRequest()); - case RpcMessage.AssignTrackerRequest: return solarxr_protocol.rpc.AssignTrackerRequest.pack(builder, _o.asAssignTrackerRequest()); - case RpcMessage.SettingsRequest: return solarxr_protocol.rpc.SettingsRequest.pack(builder, _o.asSettingsRequest()); - case RpcMessage.SettingsResponse: return solarxr_protocol.rpc.SettingsResponse.pack(builder, _o.asSettingsResponse()); - case RpcMessage.ChangeSettingsRequest: return solarxr_protocol.rpc.ChangeSettingsRequest.pack(builder, _o.asChangeSettingsRequest()); - case RpcMessage.RecordBVHRequest: return solarxr_protocol.rpc.RecordBVHRequest.pack(builder, _o.asRecordBVHRequest()); - case RpcMessage.RecordBVHStatus: return solarxr_protocol.rpc.RecordBVHStatus.pack(builder, _o.asRecordBVHStatus()); - case RpcMessage.SkeletonConfigRequest: return solarxr_protocol.rpc.SkeletonConfigRequest.pack(builder, _o.asSkeletonConfigRequest()); - case RpcMessage.ChangeSkeletonConfigRequest: return solarxr_protocol.rpc.ChangeSkeletonConfigRequest.pack(builder, _o.asChangeSkeletonConfigRequest()); - case RpcMessage.SkeletonResetAllRequest: return solarxr_protocol.rpc.SkeletonResetAllRequest.pack(builder, _o.asSkeletonResetAllRequest()); - case RpcMessage.SkeletonConfigResponse: return solarxr_protocol.rpc.SkeletonConfigResponse.pack(builder, _o.asSkeletonConfigResponse()); - case RpcMessage.OpenSerialRequest: return solarxr_protocol.rpc.OpenSerialRequest.pack(builder, _o.asOpenSerialRequest()); - case RpcMessage.CloseSerialRequest: return solarxr_protocol.rpc.CloseSerialRequest.pack(builder, _o.asCloseSerialRequest()); - case RpcMessage.SetWifiRequest: return solarxr_protocol.rpc.SetWifiRequest.pack(builder, _o.asSetWifiRequest()); - case RpcMessage.SerialUpdateResponse: return solarxr_protocol.rpc.SerialUpdateResponse.pack(builder, _o.asSerialUpdateResponse()); - case RpcMessage.AutoBoneProcessRequest: return solarxr_protocol.rpc.AutoBoneProcessRequest.pack(builder, _o.asAutoBoneProcessRequest()); - case RpcMessage.AutoBoneProcessStatusResponse: return solarxr_protocol.rpc.AutoBoneProcessStatusResponse.pack(builder, _o.asAutoBoneProcessStatusResponse()); - case RpcMessage.AutoBoneEpochResponse: return solarxr_protocol.rpc.AutoBoneEpochResponse.pack(builder, _o.asAutoBoneEpochResponse()); - case RpcMessage.OverlayDisplayModeRequest: return solarxr_protocol.rpc.OverlayDisplayModeRequest.pack(builder, _o.asOverlayDisplayModeRequest()); - case RpcMessage.OverlayDisplayModeChangeRequest: return solarxr_protocol.rpc.OverlayDisplayModeChangeRequest.pack(builder, _o.asOverlayDisplayModeChangeRequest()); - case RpcMessage.OverlayDisplayModeResponse: return solarxr_protocol.rpc.OverlayDisplayModeResponse.pack(builder, _o.asOverlayDisplayModeResponse()); - case RpcMessage.SerialTrackerRebootRequest: return solarxr_protocol.rpc.SerialTrackerRebootRequest.pack(builder, _o.asSerialTrackerRebootRequest()); - case RpcMessage.SerialTrackerGetInfoRequest: return solarxr_protocol.rpc.SerialTrackerGetInfoRequest.pack(builder, _o.asSerialTrackerGetInfoRequest()); - case RpcMessage.SerialTrackerFactoryResetRequest: return solarxr_protocol.rpc.SerialTrackerFactoryResetRequest.pack(builder, _o.asSerialTrackerFactoryResetRequest()); - default: return 0; - } - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class RpcMessageUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public RpcMessageUnion() { + this.type = RpcMessage.NONE; + this.value = null; + } + + public solarxr_protocol.rpc.HeartbeatRequestT asHeartbeatRequest() { return (solarxr_protocol.rpc.HeartbeatRequestT) value; } + public solarxr_protocol.rpc.HeartbeatResponseT asHeartbeatResponse() { return (solarxr_protocol.rpc.HeartbeatResponseT) value; } + public solarxr_protocol.rpc.ResetRequestT asResetRequest() { return (solarxr_protocol.rpc.ResetRequestT) value; } + public solarxr_protocol.rpc.AssignTrackerRequestT asAssignTrackerRequest() { return (solarxr_protocol.rpc.AssignTrackerRequestT) value; } + public solarxr_protocol.rpc.SettingsRequestT asSettingsRequest() { return (solarxr_protocol.rpc.SettingsRequestT) value; } + public solarxr_protocol.rpc.SettingsResponseT asSettingsResponse() { return (solarxr_protocol.rpc.SettingsResponseT) value; } + public solarxr_protocol.rpc.ChangeSettingsRequestT asChangeSettingsRequest() { return (solarxr_protocol.rpc.ChangeSettingsRequestT) value; } + public solarxr_protocol.rpc.RecordBVHRequestT asRecordBVHRequest() { return (solarxr_protocol.rpc.RecordBVHRequestT) value; } + public solarxr_protocol.rpc.RecordBVHStatusT asRecordBVHStatus() { return (solarxr_protocol.rpc.RecordBVHStatusT) value; } + public solarxr_protocol.rpc.SkeletonConfigRequestT asSkeletonConfigRequest() { return (solarxr_protocol.rpc.SkeletonConfigRequestT) value; } + public solarxr_protocol.rpc.ChangeSkeletonConfigRequestT asChangeSkeletonConfigRequest() { return (solarxr_protocol.rpc.ChangeSkeletonConfigRequestT) value; } + public solarxr_protocol.rpc.SkeletonResetAllRequestT asSkeletonResetAllRequest() { return (solarxr_protocol.rpc.SkeletonResetAllRequestT) value; } + public solarxr_protocol.rpc.SkeletonConfigResponseT asSkeletonConfigResponse() { return (solarxr_protocol.rpc.SkeletonConfigResponseT) value; } + public solarxr_protocol.rpc.OpenSerialRequestT asOpenSerialRequest() { return (solarxr_protocol.rpc.OpenSerialRequestT) value; } + public solarxr_protocol.rpc.CloseSerialRequestT asCloseSerialRequest() { return (solarxr_protocol.rpc.CloseSerialRequestT) value; } + public solarxr_protocol.rpc.SetWifiRequestT asSetWifiRequest() { return (solarxr_protocol.rpc.SetWifiRequestT) value; } + public solarxr_protocol.rpc.SerialUpdateResponseT asSerialUpdateResponse() { return (solarxr_protocol.rpc.SerialUpdateResponseT) value; } + public solarxr_protocol.rpc.AutoBoneProcessRequestT asAutoBoneProcessRequest() { return (solarxr_protocol.rpc.AutoBoneProcessRequestT) value; } + public solarxr_protocol.rpc.AutoBoneProcessStatusResponseT asAutoBoneProcessStatusResponse() { return (solarxr_protocol.rpc.AutoBoneProcessStatusResponseT) value; } + public solarxr_protocol.rpc.AutoBoneEpochResponseT asAutoBoneEpochResponse() { return (solarxr_protocol.rpc.AutoBoneEpochResponseT) value; } + public solarxr_protocol.rpc.OverlayDisplayModeRequestT asOverlayDisplayModeRequest() { return (solarxr_protocol.rpc.OverlayDisplayModeRequestT) value; } + public solarxr_protocol.rpc.OverlayDisplayModeChangeRequestT asOverlayDisplayModeChangeRequest() { return (solarxr_protocol.rpc.OverlayDisplayModeChangeRequestT) value; } + public solarxr_protocol.rpc.OverlayDisplayModeResponseT asOverlayDisplayModeResponse() { return (solarxr_protocol.rpc.OverlayDisplayModeResponseT) value; } + public solarxr_protocol.rpc.SerialTrackerRebootRequestT asSerialTrackerRebootRequest() { return (solarxr_protocol.rpc.SerialTrackerRebootRequestT) value; } + public solarxr_protocol.rpc.SerialTrackerGetInfoRequestT asSerialTrackerGetInfoRequest() { return (solarxr_protocol.rpc.SerialTrackerGetInfoRequestT) value; } + public solarxr_protocol.rpc.SerialTrackerFactoryResetRequestT asSerialTrackerFactoryResetRequest() { return (solarxr_protocol.rpc.SerialTrackerFactoryResetRequestT) value; } + + public static int pack(FlatBufferBuilder builder, RpcMessageUnion _o) { + switch (_o.type) { + case RpcMessage.HeartbeatRequest: return solarxr_protocol.rpc.HeartbeatRequest.pack(builder, _o.asHeartbeatRequest()); + case RpcMessage.HeartbeatResponse: return solarxr_protocol.rpc.HeartbeatResponse.pack(builder, _o.asHeartbeatResponse()); + case RpcMessage.ResetRequest: return solarxr_protocol.rpc.ResetRequest.pack(builder, _o.asResetRequest()); + case RpcMessage.AssignTrackerRequest: return solarxr_protocol.rpc.AssignTrackerRequest.pack(builder, _o.asAssignTrackerRequest()); + case RpcMessage.SettingsRequest: return solarxr_protocol.rpc.SettingsRequest.pack(builder, _o.asSettingsRequest()); + case RpcMessage.SettingsResponse: return solarxr_protocol.rpc.SettingsResponse.pack(builder, _o.asSettingsResponse()); + case RpcMessage.ChangeSettingsRequest: return solarxr_protocol.rpc.ChangeSettingsRequest.pack(builder, _o.asChangeSettingsRequest()); + case RpcMessage.RecordBVHRequest: return solarxr_protocol.rpc.RecordBVHRequest.pack(builder, _o.asRecordBVHRequest()); + case RpcMessage.RecordBVHStatus: return solarxr_protocol.rpc.RecordBVHStatus.pack(builder, _o.asRecordBVHStatus()); + case RpcMessage.SkeletonConfigRequest: return solarxr_protocol.rpc.SkeletonConfigRequest.pack(builder, _o.asSkeletonConfigRequest()); + case RpcMessage.ChangeSkeletonConfigRequest: return solarxr_protocol.rpc.ChangeSkeletonConfigRequest.pack(builder, _o.asChangeSkeletonConfigRequest()); + case RpcMessage.SkeletonResetAllRequest: return solarxr_protocol.rpc.SkeletonResetAllRequest.pack(builder, _o.asSkeletonResetAllRequest()); + case RpcMessage.SkeletonConfigResponse: return solarxr_protocol.rpc.SkeletonConfigResponse.pack(builder, _o.asSkeletonConfigResponse()); + case RpcMessage.OpenSerialRequest: return solarxr_protocol.rpc.OpenSerialRequest.pack(builder, _o.asOpenSerialRequest()); + case RpcMessage.CloseSerialRequest: return solarxr_protocol.rpc.CloseSerialRequest.pack(builder, _o.asCloseSerialRequest()); + case RpcMessage.SetWifiRequest: return solarxr_protocol.rpc.SetWifiRequest.pack(builder, _o.asSetWifiRequest()); + case RpcMessage.SerialUpdateResponse: return solarxr_protocol.rpc.SerialUpdateResponse.pack(builder, _o.asSerialUpdateResponse()); + case RpcMessage.AutoBoneProcessRequest: return solarxr_protocol.rpc.AutoBoneProcessRequest.pack(builder, _o.asAutoBoneProcessRequest()); + case RpcMessage.AutoBoneProcessStatusResponse: return solarxr_protocol.rpc.AutoBoneProcessStatusResponse.pack(builder, _o.asAutoBoneProcessStatusResponse()); + case RpcMessage.AutoBoneEpochResponse: return solarxr_protocol.rpc.AutoBoneEpochResponse.pack(builder, _o.asAutoBoneEpochResponse()); + case RpcMessage.OverlayDisplayModeRequest: return solarxr_protocol.rpc.OverlayDisplayModeRequest.pack(builder, _o.asOverlayDisplayModeRequest()); + case RpcMessage.OverlayDisplayModeChangeRequest: return solarxr_protocol.rpc.OverlayDisplayModeChangeRequest.pack(builder, _o.asOverlayDisplayModeChangeRequest()); + case RpcMessage.OverlayDisplayModeResponse: return solarxr_protocol.rpc.OverlayDisplayModeResponse.pack(builder, _o.asOverlayDisplayModeResponse()); + case RpcMessage.SerialTrackerRebootRequest: return solarxr_protocol.rpc.SerialTrackerRebootRequest.pack(builder, _o.asSerialTrackerRebootRequest()); + case RpcMessage.SerialTrackerGetInfoRequest: return solarxr_protocol.rpc.SerialTrackerGetInfoRequest.pack(builder, _o.asSerialTrackerGetInfoRequest()); + case RpcMessage.SerialTrackerFactoryResetRequest: return solarxr_protocol.rpc.SerialTrackerFactoryResetRequest.pack(builder, _o.asSerialTrackerFactoryResetRequest()); + default: return 0; + } + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponse.java b/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponse.java index c4d80155..f5020aab 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponse.java @@ -1,66 +1,66 @@ -// 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 SerialUpdateResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SerialUpdateResponse getRootAsSerialUpdateResponse(ByteBuffer _bb) { return getRootAsSerialUpdateResponse(_bb, new SerialUpdateResponse()); } - public static SerialUpdateResponse getRootAsSerialUpdateResponse(ByteBuffer _bb, SerialUpdateResponse 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 SerialUpdateResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String log() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer logAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer logInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - public boolean closed() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createSerialUpdateResponse(FlatBufferBuilder builder, - int logOffset, - boolean closed) { - builder.startTable(2); - SerialUpdateResponse.addLog(builder, logOffset); - SerialUpdateResponse.addClosed(builder, closed); - return SerialUpdateResponse.endSerialUpdateResponse(builder); - } - - public static void startSerialUpdateResponse(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addLog(FlatBufferBuilder builder, int logOffset) { builder.addOffset(0, logOffset, 0); } - public static void addClosed(FlatBufferBuilder builder, boolean closed) { builder.addBoolean(1, closed, false); } - public static int endSerialUpdateResponse(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 SerialUpdateResponse get(int j) { return get(new SerialUpdateResponse(), j); } - public SerialUpdateResponse get(SerialUpdateResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SerialUpdateResponseT unpack() { - SerialUpdateResponseT _o = new SerialUpdateResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SerialUpdateResponseT _o) { - String _oLog = log(); - _o.setLog(_oLog); - boolean _oClosed = closed(); - _o.setClosed(_oClosed); - } - public static int pack(FlatBufferBuilder builder, SerialUpdateResponseT _o) { - if (_o == null) return 0; - int _log = _o.getLog() == null ? 0 : builder.createString(_o.getLog()); - return createSerialUpdateResponse( - builder, - _log, - _o.getClosed()); - } -} - +// 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 SerialUpdateResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SerialUpdateResponse getRootAsSerialUpdateResponse(ByteBuffer _bb) { return getRootAsSerialUpdateResponse(_bb, new SerialUpdateResponse()); } + public static SerialUpdateResponse getRootAsSerialUpdateResponse(ByteBuffer _bb, SerialUpdateResponse 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 SerialUpdateResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String log() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer logAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer logInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public boolean closed() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createSerialUpdateResponse(FlatBufferBuilder builder, + int logOffset, + boolean closed) { + builder.startTable(2); + SerialUpdateResponse.addLog(builder, logOffset); + SerialUpdateResponse.addClosed(builder, closed); + return SerialUpdateResponse.endSerialUpdateResponse(builder); + } + + public static void startSerialUpdateResponse(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addLog(FlatBufferBuilder builder, int logOffset) { builder.addOffset(0, logOffset, 0); } + public static void addClosed(FlatBufferBuilder builder, boolean closed) { builder.addBoolean(1, closed, false); } + public static int endSerialUpdateResponse(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 SerialUpdateResponse get(int j) { return get(new SerialUpdateResponse(), j); } + public SerialUpdateResponse get(SerialUpdateResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SerialUpdateResponseT unpack() { + SerialUpdateResponseT _o = new SerialUpdateResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SerialUpdateResponseT _o) { + String _oLog = log(); + _o.setLog(_oLog); + boolean _oClosed = closed(); + _o.setClosed(_oClosed); + } + public static int pack(FlatBufferBuilder builder, SerialUpdateResponseT _o) { + if (_o == null) return 0; + int _log = _o.getLog() == null ? 0 : builder.createString(_o.getLog()); + return createSerialUpdateResponse( + builder, + _log, + _o.getClosed()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponseT.java index 15ae4874..06a15b5f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SerialUpdateResponseT.java @@ -1,28 +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 SerialUpdateResponseT { - private String log; - private boolean closed; - - public String getLog() { return log; } - - public void setLog(String log) { this.log = log; } - - public boolean getClosed() { return closed; } - - public void setClosed(boolean closed) { this.closed = closed; } - - - public SerialUpdateResponseT() { - this.log = null; - this.closed = false; - } -} - +// 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 SerialUpdateResponseT { + private String log; + private boolean closed; + + public String getLog() { return log; } + + public void setLog(String log) { this.log = log; } + + public boolean getClosed() { return closed; } + + public void setClosed(boolean closed) { this.closed = closed; } + + + public SerialUpdateResponseT() { + this.log = null; + this.closed = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SetWifiRequest.java b/protocol/java/src/solarxr_protocol/rpc/SetWifiRequest.java index 9c4397d9..75526ce5 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SetWifiRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SetWifiRequest.java @@ -1,69 +1,69 @@ -// 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 SetWifiRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SetWifiRequest getRootAsSetWifiRequest(ByteBuffer _bb) { return getRootAsSetWifiRequest(_bb, new SetWifiRequest()); } - public static SetWifiRequest getRootAsSetWifiRequest(ByteBuffer _bb, SetWifiRequest 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 SetWifiRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public String ssid() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer ssidAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } - public ByteBuffer ssidInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - public String password() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } - public ByteBuffer passwordAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } - public ByteBuffer passwordInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } - - public static int createSetWifiRequest(FlatBufferBuilder builder, - int ssidOffset, - int passwordOffset) { - builder.startTable(2); - SetWifiRequest.addPassword(builder, passwordOffset); - SetWifiRequest.addSsid(builder, ssidOffset); - return SetWifiRequest.endSetWifiRequest(builder); - } - - public static void startSetWifiRequest(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addSsid(FlatBufferBuilder builder, int ssidOffset) { builder.addOffset(0, ssidOffset, 0); } - public static void addPassword(FlatBufferBuilder builder, int passwordOffset) { builder.addOffset(1, passwordOffset, 0); } - public static int endSetWifiRequest(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 SetWifiRequest get(int j) { return get(new SetWifiRequest(), j); } - public SetWifiRequest get(SetWifiRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SetWifiRequestT unpack() { - SetWifiRequestT _o = new SetWifiRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SetWifiRequestT _o) { - String _oSsid = ssid(); - _o.setSsid(_oSsid); - String _oPassword = password(); - _o.setPassword(_oPassword); - } - public static int pack(FlatBufferBuilder builder, SetWifiRequestT _o) { - if (_o == null) return 0; - int _ssid = _o.getSsid() == null ? 0 : builder.createString(_o.getSsid()); - int _password = _o.getPassword() == null ? 0 : builder.createString(_o.getPassword()); - return createSetWifiRequest( - builder, - _ssid, - _password); - } -} - +// 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 SetWifiRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SetWifiRequest getRootAsSetWifiRequest(ByteBuffer _bb) { return getRootAsSetWifiRequest(_bb, new SetWifiRequest()); } + public static SetWifiRequest getRootAsSetWifiRequest(ByteBuffer _bb, SetWifiRequest 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 SetWifiRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String ssid() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer ssidAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer ssidInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public String password() { int o = __offset(6); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer passwordAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer passwordInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createSetWifiRequest(FlatBufferBuilder builder, + int ssidOffset, + int passwordOffset) { + builder.startTable(2); + SetWifiRequest.addPassword(builder, passwordOffset); + SetWifiRequest.addSsid(builder, ssidOffset); + return SetWifiRequest.endSetWifiRequest(builder); + } + + public static void startSetWifiRequest(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addSsid(FlatBufferBuilder builder, int ssidOffset) { builder.addOffset(0, ssidOffset, 0); } + public static void addPassword(FlatBufferBuilder builder, int passwordOffset) { builder.addOffset(1, passwordOffset, 0); } + public static int endSetWifiRequest(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 SetWifiRequest get(int j) { return get(new SetWifiRequest(), j); } + public SetWifiRequest get(SetWifiRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SetWifiRequestT unpack() { + SetWifiRequestT _o = new SetWifiRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SetWifiRequestT _o) { + String _oSsid = ssid(); + _o.setSsid(_oSsid); + String _oPassword = password(); + _o.setPassword(_oPassword); + } + public static int pack(FlatBufferBuilder builder, SetWifiRequestT _o) { + if (_o == null) return 0; + int _ssid = _o.getSsid() == null ? 0 : builder.createString(_o.getSsid()); + int _password = _o.getPassword() == null ? 0 : builder.createString(_o.getPassword()); + return createSetWifiRequest( + builder, + _ssid, + _password); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SetWifiRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SetWifiRequestT.java index 13a7d10c..31ea985a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SetWifiRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SetWifiRequestT.java @@ -1,28 +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 SetWifiRequestT { - private String ssid; - private String password; - - public String getSsid() { return ssid; } - - public void setSsid(String ssid) { this.ssid = ssid; } - - public String getPassword() { return password; } - - public void setPassword(String password) { this.password = password; } - - - public SetWifiRequestT() { - this.ssid = null; - this.password = null; - } -} - +// 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 SetWifiRequestT { + private String ssid; + private String password; + + public String getSsid() { return ssid; } + + public void setSsid(String ssid) { this.ssid = ssid; } + + public String getPassword() { return password; } + + public void setPassword(String password) { this.password = password; } + + + public SetWifiRequestT() { + this.ssid = null; + this.password = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/SettingsRequest.java index 7d2354e8..0c797079 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsRequest.java @@ -1,44 +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 SettingsRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SettingsRequest getRootAsSettingsRequest(ByteBuffer _bb) { return getRootAsSettingsRequest(_bb, new SettingsRequest()); } - public static SettingsRequest getRootAsSettingsRequest(ByteBuffer _bb, SettingsRequest 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 SettingsRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startSettingsRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endSettingsRequest(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 SettingsRequest get(int j) { return get(new SettingsRequest(), j); } - public SettingsRequest get(SettingsRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SettingsRequestT unpack() { - SettingsRequestT _o = new SettingsRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SettingsRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, SettingsRequestT _o) { - if (_o == null) return 0; - startSettingsRequest(builder); - return endSettingsRequest(builder); - } -} - +// 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 SettingsRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SettingsRequest getRootAsSettingsRequest(ByteBuffer _bb) { return getRootAsSettingsRequest(_bb, new SettingsRequest()); } + public static SettingsRequest getRootAsSettingsRequest(ByteBuffer _bb, SettingsRequest 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 SettingsRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSettingsRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSettingsRequest(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 SettingsRequest get(int j) { return get(new SettingsRequest(), j); } + public SettingsRequest get(SettingsRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SettingsRequestT unpack() { + SettingsRequestT _o = new SettingsRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SettingsRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SettingsRequestT _o) { + if (_o == null) return 0; + startSettingsRequest(builder); + return endSettingsRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SettingsRequestT.java index 217246b1..3573f655 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsRequestT.java @@ -1,16 +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 SettingsRequestT { - - - public SettingsRequestT() { - } -} - +// 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 SettingsRequestT { + + + public SettingsRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java index 15e937c5..717bb727 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java @@ -1,76 +1,76 @@ -// 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 SettingsResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SettingsResponse getRootAsSettingsResponse(ByteBuffer _bb) { return getRootAsSettingsResponse(_bb, new SettingsResponse()); } - public static SettingsResponse getRootAsSettingsResponse(ByteBuffer _bb, SettingsResponse 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 SettingsResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers() { return steamVrTrackers(new solarxr_protocol.rpc.SteamVRTrackersSetting()); } - public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.FilteringSettings filtering() { return filtering(new solarxr_protocol.rpc.FilteringSettings()); } - public solarxr_protocol.rpc.FilteringSettings filtering(solarxr_protocol.rpc.FilteringSettings obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.settings.ModelSettings modelSettings() { return modelSettings(new solarxr_protocol.rpc.settings.ModelSettings()); } - public solarxr_protocol.rpc.settings.ModelSettings modelSettings(solarxr_protocol.rpc.settings.ModelSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createSettingsResponse(FlatBufferBuilder builder, - int steamVrTrackersOffset, - int filteringOffset, - int modelSettingsOffset) { - builder.startTable(3); - SettingsResponse.addModelSettings(builder, modelSettingsOffset); - SettingsResponse.addFiltering(builder, filteringOffset); - SettingsResponse.addSteamVrTrackers(builder, steamVrTrackersOffset); - return SettingsResponse.endSettingsResponse(builder); - } - - public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(3); } - 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 addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(2, modelSettingsOffset, 0); } - public static int endSettingsResponse(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 SettingsResponse get(int j) { return get(new SettingsResponse(), j); } - public SettingsResponse get(SettingsResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SettingsResponseT unpack() { - SettingsResponseT _o = new SettingsResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SettingsResponseT _o) { - if (steamVrTrackers() != null) _o.setSteamVrTrackers(steamVrTrackers().unpack()); - else _o.setSteamVrTrackers(null); - if (filtering() != null) _o.setFiltering(filtering().unpack()); - else _o.setFiltering(null); - if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); - else _o.setModelSettings(null); - } - public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { - if (_o == null) return 0; - int _steamVrTrackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); - int _filtering = _o.getFiltering() == null ? 0 : solarxr_protocol.rpc.FilteringSettings.pack(builder, _o.getFiltering()); - int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); - return createSettingsResponse( - builder, - _steamVrTrackers, - _filtering, - _modelSettings); - } -} - +// 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 SettingsResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SettingsResponse getRootAsSettingsResponse(ByteBuffer _bb) { return getRootAsSettingsResponse(_bb, new SettingsResponse()); } + public static SettingsResponse getRootAsSettingsResponse(ByteBuffer _bb, SettingsResponse 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 SettingsResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers() { return steamVrTrackers(new solarxr_protocol.rpc.SteamVRTrackersSetting()); } + public solarxr_protocol.rpc.SteamVRTrackersSetting steamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSetting obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.FilteringSettings filtering() { return filtering(new solarxr_protocol.rpc.FilteringSettings()); } + public solarxr_protocol.rpc.FilteringSettings filtering(solarxr_protocol.rpc.FilteringSettings obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.settings.ModelSettings modelSettings() { return modelSettings(new solarxr_protocol.rpc.settings.ModelSettings()); } + public solarxr_protocol.rpc.settings.ModelSettings modelSettings(solarxr_protocol.rpc.settings.ModelSettings obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createSettingsResponse(FlatBufferBuilder builder, + int steamVrTrackersOffset, + int filteringOffset, + int modelSettingsOffset) { + builder.startTable(3); + SettingsResponse.addModelSettings(builder, modelSettingsOffset); + SettingsResponse.addFiltering(builder, filteringOffset); + SettingsResponse.addSteamVrTrackers(builder, steamVrTrackersOffset); + return SettingsResponse.endSettingsResponse(builder); + } + + public static void startSettingsResponse(FlatBufferBuilder builder) { builder.startTable(3); } + 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 addModelSettings(FlatBufferBuilder builder, int modelSettingsOffset) { builder.addOffset(2, modelSettingsOffset, 0); } + public static int endSettingsResponse(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 SettingsResponse get(int j) { return get(new SettingsResponse(), j); } + public SettingsResponse get(SettingsResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SettingsResponseT unpack() { + SettingsResponseT _o = new SettingsResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SettingsResponseT _o) { + if (steamVrTrackers() != null) _o.setSteamVrTrackers(steamVrTrackers().unpack()); + else _o.setSteamVrTrackers(null); + if (filtering() != null) _o.setFiltering(filtering().unpack()); + else _o.setFiltering(null); + if (modelSettings() != null) _o.setModelSettings(modelSettings().unpack()); + else _o.setModelSettings(null); + } + public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { + if (_o == null) return 0; + int _steam_vr_trackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); + int _filtering = _o.getFiltering() == null ? 0 : solarxr_protocol.rpc.FilteringSettings.pack(builder, _o.getFiltering()); + int _model_settings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); + return createSettingsResponse( + builder, + _steam_vr_trackers, + _filtering, + _model_settings); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java index 4651c8b6..87569700 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponseT.java @@ -1,34 +1,34 @@ -// 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 SettingsResponseT { - private solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers; - private solarxr_protocol.rpc.FilteringSettingsT filtering; - private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; - - public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } - - public void setSteamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers) { this.steamVrTrackers = steamVrTrackers; } - - public solarxr_protocol.rpc.FilteringSettingsT getFiltering() { return filtering; } - - public void setFiltering(solarxr_protocol.rpc.FilteringSettingsT filtering) { this.filtering = filtering; } - - public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } - - public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } - - - public SettingsResponseT() { - this.steamVrTrackers = null; - this.filtering = null; - this.modelSettings = null; - } -} - +// 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 SettingsResponseT { + private solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers; + private solarxr_protocol.rpc.FilteringSettingsT filtering; + private solarxr_protocol.rpc.settings.ModelSettingsT modelSettings; + + public solarxr_protocol.rpc.SteamVRTrackersSettingT getSteamVrTrackers() { return steamVrTrackers; } + + public void setSteamVrTrackers(solarxr_protocol.rpc.SteamVRTrackersSettingT steamVrTrackers) { this.steamVrTrackers = steamVrTrackers; } + + public solarxr_protocol.rpc.FilteringSettingsT getFiltering() { return filtering; } + + public void setFiltering(solarxr_protocol.rpc.FilteringSettingsT filtering) { this.filtering = filtering; } + + public solarxr_protocol.rpc.settings.ModelSettingsT getModelSettings() { return modelSettings; } + + public void setModelSettings(solarxr_protocol.rpc.settings.ModelSettingsT modelSettings) { this.modelSettings = modelSettings; } + + + public SettingsResponseT() { + this.steamVrTrackers = null; + this.filtering = null; + this.modelSettings = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java index a252c80a..f3632559 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonBone.java @@ -1,33 +1,33 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc; - -@SuppressWarnings("unused") -public final class SkeletonBone { - private SkeletonBone() { } - public static final int NONE = 0; - public static final int HEAD = 1; - public static final int NECK = 2; - public static final int TORSO = 3; - public static final int CHEST = 4; - public static final int WAIST = 5; - public static final int HIP_OFFSET = 6; - public static final int HIPS_WIDTH = 7; - public static final int LEGS_LENGTH = 8; - public static final int KNEE_HEIGHT = 9; - public static final int FOOT_LENGTH = 10; - public static final int FOOT_SHIFT = 11; - public static final int SKELETON_OFFSET = 12; - public static final int CONTROLLER_DISTANCE_Z = 13; - public static final int CONTROLLER_DISTANCE_Y = 14; - public static final int FOREARM_LENGTH = 15; - public static final int SHOULDERS_DISTANCE = 16; - public static final int SHOULDERS_WIDTH = 17; - public static final int UPPER_ARM_LENGTH = 18; - public static final int ELBOW_OFFSET = 19; - - public static final String[] names = { "NONE", "HEAD", "NECK", "TORSO", "CHEST", "WAIST", "HIP_OFFSET", "HIPS_WIDTH", "LEGS_LENGTH", "KNEE_HEIGHT", "FOOT_LENGTH", "FOOT_SHIFT", "SKELETON_OFFSET", "CONTROLLER_DISTANCE_Z", "CONTROLLER_DISTANCE_Y", "FOREARM_LENGTH", "SHOULDERS_DISTANCE", "SHOULDERS_WIDTH", "UPPER_ARM_LENGTH", "ELBOW_OFFSET", }; - - public static String name(int e) { return names[e]; } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc; + +@SuppressWarnings("unused") +public final class SkeletonBone { + private SkeletonBone() { } + public static final int NONE = 0; + public static final int HEAD = 1; + public static final int NECK = 2; + public static final int TORSO = 3; + public static final int CHEST = 4; + public static final int WAIST = 5; + public static final int HIP_OFFSET = 6; + public static final int HIPS_WIDTH = 7; + public static final int LEGS_LENGTH = 8; + public static final int KNEE_HEIGHT = 9; + public static final int FOOT_LENGTH = 10; + public static final int FOOT_SHIFT = 11; + public static final int SKELETON_OFFSET = 12; + public static final int CONTROLLER_DISTANCE_Z = 13; + public static final int CONTROLLER_DISTANCE_Y = 14; + public static final int FOREARM_LENGTH = 15; + public static final int SHOULDERS_DISTANCE = 16; + public static final int SHOULDERS_WIDTH = 17; + public static final int UPPER_ARM_LENGTH = 18; + public static final int ELBOW_OFFSET = 19; + + public static final String[] names = { "NONE", "HEAD", "NECK", "TORSO", "CHEST", "WAIST", "HIP_OFFSET", "HIPS_WIDTH", "LEGS_LENGTH", "KNEE_HEIGHT", "FOOT_LENGTH", "FOOT_SHIFT", "SKELETON_OFFSET", "CONTROLLER_DISTANCE_Z", "CONTROLLER_DISTANCE_Y", "FOREARM_LENGTH", "SHOULDERS_DISTANCE", "SHOULDERS_WIDTH", "UPPER_ARM_LENGTH", "ELBOW_OFFSET", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequest.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequest.java index e09a2ec5..182cfdbc 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequest.java @@ -1,44 +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 SkeletonConfigRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SkeletonConfigRequest getRootAsSkeletonConfigRequest(ByteBuffer _bb) { return getRootAsSkeletonConfigRequest(_bb, new SkeletonConfigRequest()); } - public static SkeletonConfigRequest getRootAsSkeletonConfigRequest(ByteBuffer _bb, SkeletonConfigRequest 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 SkeletonConfigRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startSkeletonConfigRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endSkeletonConfigRequest(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 SkeletonConfigRequest get(int j) { return get(new SkeletonConfigRequest(), j); } - public SkeletonConfigRequest get(SkeletonConfigRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SkeletonConfigRequestT unpack() { - SkeletonConfigRequestT _o = new SkeletonConfigRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SkeletonConfigRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, SkeletonConfigRequestT _o) { - if (_o == null) return 0; - startSkeletonConfigRequest(builder); - return endSkeletonConfigRequest(builder); - } -} - +// 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 SkeletonConfigRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SkeletonConfigRequest getRootAsSkeletonConfigRequest(ByteBuffer _bb) { return getRootAsSkeletonConfigRequest(_bb, new SkeletonConfigRequest()); } + public static SkeletonConfigRequest getRootAsSkeletonConfigRequest(ByteBuffer _bb, SkeletonConfigRequest 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 SkeletonConfigRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSkeletonConfigRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSkeletonConfigRequest(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 SkeletonConfigRequest get(int j) { return get(new SkeletonConfigRequest(), j); } + public SkeletonConfigRequest get(SkeletonConfigRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SkeletonConfigRequestT unpack() { + SkeletonConfigRequestT _o = new SkeletonConfigRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SkeletonConfigRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SkeletonConfigRequestT _o) { + if (_o == null) return 0; + startSkeletonConfigRequest(builder); + return endSkeletonConfigRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequestT.java index 4ea8fc95..2ea638d6 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigRequestT.java @@ -1,16 +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 SkeletonConfigRequestT { - - - public SkeletonConfigRequestT() { - } -} - +// 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 SkeletonConfigRequestT { + + + public SkeletonConfigRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponse.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponse.java index ebfdb65a..230357a0 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponse.java @@ -1,70 +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 SkeletonConfigResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SkeletonConfigResponse getRootAsSkeletonConfigResponse(ByteBuffer _bb) { return getRootAsSkeletonConfigResponse(_bb, new SkeletonConfigResponse()); } - public static SkeletonConfigResponse getRootAsSkeletonConfigResponse(ByteBuffer _bb, SkeletonConfigResponse 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 SkeletonConfigResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.SkeletonPart skeletonParts(int j) { return skeletonParts(new solarxr_protocol.rpc.SkeletonPart(), j); } - public solarxr_protocol.rpc.SkeletonPart skeletonParts(solarxr_protocol.rpc.SkeletonPart obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } - public int skeletonPartsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } - public solarxr_protocol.rpc.SkeletonPart.Vector skeletonPartsVector() { return skeletonPartsVector(new solarxr_protocol.rpc.SkeletonPart.Vector()); } - public solarxr_protocol.rpc.SkeletonPart.Vector skeletonPartsVector(solarxr_protocol.rpc.SkeletonPart.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } - - public static int createSkeletonConfigResponse(FlatBufferBuilder builder, - int skeletonPartsOffset) { - builder.startTable(1); - SkeletonConfigResponse.addSkeletonParts(builder, skeletonPartsOffset); - return SkeletonConfigResponse.endSkeletonConfigResponse(builder); - } - - public static void startSkeletonConfigResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addSkeletonParts(FlatBufferBuilder builder, int skeletonPartsOffset) { builder.addOffset(0, skeletonPartsOffset, 0); } - public static int createSkeletonPartsVector(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 startSkeletonPartsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } - public static int endSkeletonConfigResponse(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 SkeletonConfigResponse get(int j) { return get(new SkeletonConfigResponse(), j); } - public SkeletonConfigResponse get(SkeletonConfigResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SkeletonConfigResponseT unpack() { - SkeletonConfigResponseT _o = new SkeletonConfigResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SkeletonConfigResponseT _o) { - solarxr_protocol.rpc.SkeletonPartT[] _oSkeletonParts = new solarxr_protocol.rpc.SkeletonPartT[skeletonPartsLength()]; - for (int _j = 0; _j < skeletonPartsLength(); ++_j) {_oSkeletonParts[_j] = (skeletonParts(_j) != null ? skeletonParts(_j).unpack() : null);} - _o.setSkeletonParts(_oSkeletonParts); - } - public static int pack(FlatBufferBuilder builder, SkeletonConfigResponseT _o) { - if (_o == null) return 0; - int _skeletonParts = 0; - if (_o.getSkeletonParts() != null) { - int[] __skeletonParts = new int[_o.getSkeletonParts().length]; - int _j = 0; - for (solarxr_protocol.rpc.SkeletonPartT _e : _o.getSkeletonParts()) { __skeletonParts[_j] = solarxr_protocol.rpc.SkeletonPart.pack(builder, _e); _j++;} - _skeletonParts = createSkeletonPartsVector(builder, __skeletonParts); - } - return createSkeletonConfigResponse( - builder, - _skeletonParts); - } -} - +// 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 SkeletonConfigResponse extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SkeletonConfigResponse getRootAsSkeletonConfigResponse(ByteBuffer _bb) { return getRootAsSkeletonConfigResponse(_bb, new SkeletonConfigResponse()); } + public static SkeletonConfigResponse getRootAsSkeletonConfigResponse(ByteBuffer _bb, SkeletonConfigResponse 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 SkeletonConfigResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.SkeletonPart skeletonParts(int j) { return skeletonParts(new solarxr_protocol.rpc.SkeletonPart(), j); } + public solarxr_protocol.rpc.SkeletonPart skeletonParts(solarxr_protocol.rpc.SkeletonPart obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int skeletonPartsLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public solarxr_protocol.rpc.SkeletonPart.Vector skeletonPartsVector() { return skeletonPartsVector(new solarxr_protocol.rpc.SkeletonPart.Vector()); } + public solarxr_protocol.rpc.SkeletonPart.Vector skeletonPartsVector(solarxr_protocol.rpc.SkeletonPart.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createSkeletonConfigResponse(FlatBufferBuilder builder, + int skeletonPartsOffset) { + builder.startTable(1); + SkeletonConfigResponse.addSkeletonParts(builder, skeletonPartsOffset); + return SkeletonConfigResponse.endSkeletonConfigResponse(builder); + } + + public static void startSkeletonConfigResponse(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addSkeletonParts(FlatBufferBuilder builder, int skeletonPartsOffset) { builder.addOffset(0, skeletonPartsOffset, 0); } + public static int createSkeletonPartsVector(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 startSkeletonPartsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endSkeletonConfigResponse(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 SkeletonConfigResponse get(int j) { return get(new SkeletonConfigResponse(), j); } + public SkeletonConfigResponse get(SkeletonConfigResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SkeletonConfigResponseT unpack() { + SkeletonConfigResponseT _o = new SkeletonConfigResponseT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SkeletonConfigResponseT _o) { + solarxr_protocol.rpc.SkeletonPartT[] _oSkeletonParts = new solarxr_protocol.rpc.SkeletonPartT[skeletonPartsLength()]; + for (int _j = 0; _j < skeletonPartsLength(); ++_j) {_oSkeletonParts[_j] = (skeletonParts(_j) != null ? skeletonParts(_j).unpack() : null);} + _o.setSkeletonParts(_oSkeletonParts); + } + public static int pack(FlatBufferBuilder builder, SkeletonConfigResponseT _o) { + if (_o == null) return 0; + int _skeletonParts = 0; + if (_o.getSkeletonParts() != null) { + int[] __skeletonParts = new int[_o.getSkeletonParts().length]; + int _j = 0; + for (solarxr_protocol.rpc.SkeletonPartT _e : _o.getSkeletonParts()) { __skeletonParts[_j] = solarxr_protocol.rpc.SkeletonPart.pack(builder, _e); _j++;} + _skeletonParts = createSkeletonPartsVector(builder, __skeletonParts); + } + return createSkeletonConfigResponse( + builder, + _skeletonParts); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponseT.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponseT.java index ca53bcbd..4b98c43d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponseT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonConfigResponseT.java @@ -1,22 +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 SkeletonConfigResponseT { - private solarxr_protocol.rpc.SkeletonPartT[] skeletonParts; - - public solarxr_protocol.rpc.SkeletonPartT[] getSkeletonParts() { return skeletonParts; } - - public void setSkeletonParts(solarxr_protocol.rpc.SkeletonPartT[] skeletonParts) { this.skeletonParts = skeletonParts; } - - - public SkeletonConfigResponseT() { - this.skeletonParts = null; - } -} - +// 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 SkeletonConfigResponseT { + private solarxr_protocol.rpc.SkeletonPartT[] skeletonParts; + + public solarxr_protocol.rpc.SkeletonPartT[] getSkeletonParts() { return skeletonParts; } + + public void setSkeletonParts(solarxr_protocol.rpc.SkeletonPartT[] skeletonParts) { this.skeletonParts = skeletonParts; } + + + public SkeletonConfigResponseT() { + this.skeletonParts = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonPart.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonPart.java index 90d62ed0..9517bde1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonPart.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonPart.java @@ -1,63 +1,63 @@ -// 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 SkeletonPart extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SkeletonPart getRootAsSkeletonPart(ByteBuffer _bb) { return getRootAsSkeletonPart(_bb, new SkeletonPart()); } - public static SkeletonPart getRootAsSkeletonPart(ByteBuffer _bb, SkeletonPart 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 SkeletonPart __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public int bone() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } - public float value() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } - - public static int createSkeletonPart(FlatBufferBuilder builder, - int bone, - float value) { - builder.startTable(2); - SkeletonPart.addValue(builder, value); - SkeletonPart.addBone(builder, bone); - return SkeletonPart.endSkeletonPart(builder); - } - - public static void startSkeletonPart(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addBone(FlatBufferBuilder builder, int bone) { builder.addByte(0, (byte) bone, (byte) 0); } - public static void addValue(FlatBufferBuilder builder, float value) { builder.addFloat(1, value, 0.0f); } - public static int endSkeletonPart(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 SkeletonPart get(int j) { return get(new SkeletonPart(), j); } - public SkeletonPart get(SkeletonPart obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SkeletonPartT unpack() { - SkeletonPartT _o = new SkeletonPartT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SkeletonPartT _o) { - int _oBone = bone(); - _o.setBone(_oBone); - float _oValue = value(); - _o.setValue(_oValue); - } - public static int pack(FlatBufferBuilder builder, SkeletonPartT _o) { - if (_o == null) return 0; - return createSkeletonPart( - builder, - _o.getBone(), - _o.getValue()); - } -} - +// 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 SkeletonPart extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SkeletonPart getRootAsSkeletonPart(ByteBuffer _bb) { return getRootAsSkeletonPart(_bb, new SkeletonPart()); } + public static SkeletonPart getRootAsSkeletonPart(ByteBuffer _bb, SkeletonPart 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 SkeletonPart __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int bone() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + public float value() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createSkeletonPart(FlatBufferBuilder builder, + int bone, + float value) { + builder.startTable(2); + SkeletonPart.addValue(builder, value); + SkeletonPart.addBone(builder, bone); + return SkeletonPart.endSkeletonPart(builder); + } + + public static void startSkeletonPart(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addBone(FlatBufferBuilder builder, int bone) { builder.addByte(0, (byte) bone, (byte) 0); } + public static void addValue(FlatBufferBuilder builder, float value) { builder.addFloat(1, value, 0.0f); } + public static int endSkeletonPart(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 SkeletonPart get(int j) { return get(new SkeletonPart(), j); } + public SkeletonPart get(SkeletonPart obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SkeletonPartT unpack() { + SkeletonPartT _o = new SkeletonPartT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SkeletonPartT _o) { + int _oBone = bone(); + _o.setBone(_oBone); + float _oValue = value(); + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, SkeletonPartT _o) { + if (_o == null) return 0; + return createSkeletonPart( + builder, + _o.getBone(), + _o.getValue()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonPartT.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonPartT.java index 69d2aacf..ff888802 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonPartT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonPartT.java @@ -1,28 +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 SkeletonPartT { - private int bone; - private float value; - - public int getBone() { return bone; } - - public void setBone(int bone) { this.bone = bone; } - - public float getValue() { return value; } - - public void setValue(float value) { this.value = value; } - - - public SkeletonPartT() { - this.bone = 0; - this.value = 0.0f; - } -} - +// 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 SkeletonPartT { + private int bone; + private float value; + + public int getBone() { return bone; } + + public void setBone(int bone) { this.bone = bone; } + + public float getValue() { return value; } + + public void setValue(float value) { this.value = value; } + + + public SkeletonPartT() { + this.bone = 0; + this.value = 0.0f; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequest.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequest.java index 23616929..3d69f3f8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequest.java @@ -1,44 +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 SkeletonResetAllRequest extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SkeletonResetAllRequest getRootAsSkeletonResetAllRequest(ByteBuffer _bb) { return getRootAsSkeletonResetAllRequest(_bb, new SkeletonResetAllRequest()); } - public static SkeletonResetAllRequest getRootAsSkeletonResetAllRequest(ByteBuffer _bb, SkeletonResetAllRequest 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 SkeletonResetAllRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - - public static void startSkeletonResetAllRequest(FlatBufferBuilder builder) { builder.startTable(0); } - public static int endSkeletonResetAllRequest(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 SkeletonResetAllRequest get(int j) { return get(new SkeletonResetAllRequest(), j); } - public SkeletonResetAllRequest get(SkeletonResetAllRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SkeletonResetAllRequestT unpack() { - SkeletonResetAllRequestT _o = new SkeletonResetAllRequestT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SkeletonResetAllRequestT _o) { - } - public static int pack(FlatBufferBuilder builder, SkeletonResetAllRequestT _o) { - if (_o == null) return 0; - startSkeletonResetAllRequest(builder); - return endSkeletonResetAllRequest(builder); - } -} - +// 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 SkeletonResetAllRequest extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SkeletonResetAllRequest getRootAsSkeletonResetAllRequest(ByteBuffer _bb) { return getRootAsSkeletonResetAllRequest(_bb, new SkeletonResetAllRequest()); } + public static SkeletonResetAllRequest getRootAsSkeletonResetAllRequest(ByteBuffer _bb, SkeletonResetAllRequest 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 SkeletonResetAllRequest __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + + public static void startSkeletonResetAllRequest(FlatBufferBuilder builder) { builder.startTable(0); } + public static int endSkeletonResetAllRequest(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 SkeletonResetAllRequest get(int j) { return get(new SkeletonResetAllRequest(), j); } + public SkeletonResetAllRequest get(SkeletonResetAllRequest obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SkeletonResetAllRequestT unpack() { + SkeletonResetAllRequestT _o = new SkeletonResetAllRequestT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SkeletonResetAllRequestT _o) { + } + public static int pack(FlatBufferBuilder builder, SkeletonResetAllRequestT _o) { + if (_o == null) return 0; + startSkeletonResetAllRequest(builder); + return endSkeletonResetAllRequest(builder); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequestT.java b/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequestT.java index 9d2b4334..d79a638a 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequestT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SkeletonResetAllRequestT.java @@ -1,16 +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 SkeletonResetAllRequestT { - - - public SkeletonResetAllRequestT() { - } -} - +// 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 SkeletonResetAllRequestT { + + + public SkeletonResetAllRequestT() { + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java index d0f61878..47473848 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java +++ b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSetting.java @@ -1,84 +1,84 @@ -// 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 SteamVRTrackersSetting extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static SteamVRTrackersSetting getRootAsSteamVRTrackersSetting(ByteBuffer _bb) { return getRootAsSteamVRTrackersSetting(_bb, new SteamVRTrackersSetting()); } - public static SteamVRTrackersSetting getRootAsSteamVRTrackersSetting(ByteBuffer _bb, SteamVRTrackersSetting 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 SteamVRTrackersSetting __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean waist() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean chest() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean legs() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean knees() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean elbows() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, - boolean waist, - boolean chest, - boolean legs, - boolean knees, - boolean elbows) { - builder.startTable(5); - SteamVRTrackersSetting.addElbows(builder, elbows); - SteamVRTrackersSetting.addKnees(builder, knees); - SteamVRTrackersSetting.addLegs(builder, legs); - SteamVRTrackersSetting.addChest(builder, chest); - SteamVRTrackersSetting.addWaist(builder, waist); - return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); - } - - public static void startSteamVRTrackersSetting(FlatBufferBuilder builder) { builder.startTable(5); } - public static void addWaist(FlatBufferBuilder builder, boolean waist) { builder.addBoolean(0, waist, false); } - public static void addChest(FlatBufferBuilder builder, boolean chest) { builder.addBoolean(1, chest, false); } - public static void addLegs(FlatBufferBuilder builder, boolean legs) { builder.addBoolean(2, legs, false); } - public static void addKnees(FlatBufferBuilder builder, boolean knees) { builder.addBoolean(3, knees, false); } - public static void addElbows(FlatBufferBuilder builder, boolean elbows) { builder.addBoolean(4, elbows, false); } - public static int endSteamVRTrackersSetting(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 SteamVRTrackersSetting get(int j) { return get(new SteamVRTrackersSetting(), j); } - public SteamVRTrackersSetting get(SteamVRTrackersSetting obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public SteamVRTrackersSettingT unpack() { - SteamVRTrackersSettingT _o = new SteamVRTrackersSettingT(); - unpackTo(_o); - return _o; - } - public void unpackTo(SteamVRTrackersSettingT _o) { - boolean _oWaist = waist(); - _o.setWaist(_oWaist); - boolean _oChest = chest(); - _o.setChest(_oChest); - boolean _oLegs = legs(); - _o.setLegs(_oLegs); - boolean _oKnees = knees(); - _o.setKnees(_oKnees); - boolean _oElbows = elbows(); - _o.setElbows(_oElbows); - } - public static int pack(FlatBufferBuilder builder, SteamVRTrackersSettingT _o) { - if (_o == null) return 0; - return createSteamVRTrackersSetting( - builder, - _o.getWaist(), - _o.getChest(), - _o.getLegs(), - _o.getKnees(), - _o.getElbows()); - } -} - +// 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 SteamVRTrackersSetting extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static SteamVRTrackersSetting getRootAsSteamVRTrackersSetting(ByteBuffer _bb) { return getRootAsSteamVRTrackersSetting(_bb, new SteamVRTrackersSetting()); } + public static SteamVRTrackersSetting getRootAsSteamVRTrackersSetting(ByteBuffer _bb, SteamVRTrackersSetting 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 SteamVRTrackersSetting __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean waist() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean chest() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean legs() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean knees() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean elbows() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createSteamVRTrackersSetting(FlatBufferBuilder builder, + boolean waist, + boolean chest, + boolean legs, + boolean knees, + boolean elbows) { + builder.startTable(5); + SteamVRTrackersSetting.addElbows(builder, elbows); + SteamVRTrackersSetting.addKnees(builder, knees); + SteamVRTrackersSetting.addLegs(builder, legs); + SteamVRTrackersSetting.addChest(builder, chest); + SteamVRTrackersSetting.addWaist(builder, waist); + return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); + } + + public static void startSteamVRTrackersSetting(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addWaist(FlatBufferBuilder builder, boolean waist) { builder.addBoolean(0, waist, false); } + public static void addChest(FlatBufferBuilder builder, boolean chest) { builder.addBoolean(1, chest, false); } + public static void addLegs(FlatBufferBuilder builder, boolean legs) { builder.addBoolean(2, legs, false); } + public static void addKnees(FlatBufferBuilder builder, boolean knees) { builder.addBoolean(3, knees, false); } + public static void addElbows(FlatBufferBuilder builder, boolean elbows) { builder.addBoolean(4, elbows, false); } + public static int endSteamVRTrackersSetting(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 SteamVRTrackersSetting get(int j) { return get(new SteamVRTrackersSetting(), j); } + public SteamVRTrackersSetting get(SteamVRTrackersSetting obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SteamVRTrackersSettingT unpack() { + SteamVRTrackersSettingT _o = new SteamVRTrackersSettingT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SteamVRTrackersSettingT _o) { + boolean _oWaist = waist(); + _o.setWaist(_oWaist); + boolean _oChest = chest(); + _o.setChest(_oChest); + boolean _oLegs = legs(); + _o.setLegs(_oLegs); + boolean _oKnees = knees(); + _o.setKnees(_oKnees); + boolean _oElbows = elbows(); + _o.setElbows(_oElbows); + } + public static int pack(FlatBufferBuilder builder, SteamVRTrackersSettingT _o) { + if (_o == null) return 0; + return createSteamVRTrackersSetting( + builder, + _o.getWaist(), + _o.getChest(), + _o.getLegs(), + _o.getKnees(), + _o.getElbows()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java index 15744b40..174c4601 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java +++ b/protocol/java/src/solarxr_protocol/rpc/SteamVRTrackersSettingT.java @@ -1,46 +1,46 @@ -// 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 SteamVRTrackersSettingT { - private boolean waist; - private boolean chest; - private boolean legs; - private boolean knees; - private boolean elbows; - - public boolean getWaist() { return waist; } - - public void setWaist(boolean waist) { this.waist = waist; } - - public boolean getChest() { return chest; } - - public void setChest(boolean chest) { this.chest = chest; } - - public boolean getLegs() { return legs; } - - public void setLegs(boolean legs) { this.legs = legs; } - - public boolean getKnees() { return knees; } - - public void setKnees(boolean knees) { this.knees = knees; } - - public boolean getElbows() { return elbows; } - - public void setElbows(boolean elbows) { this.elbows = elbows; } - - - public SteamVRTrackersSettingT() { - this.waist = false; - this.chest = false; - this.legs = false; - this.knees = false; - this.elbows = false; - } -} - +// 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 SteamVRTrackersSettingT { + private boolean waist; + private boolean chest; + private boolean legs; + private boolean knees; + private boolean elbows; + + public boolean getWaist() { return waist; } + + public void setWaist(boolean waist) { this.waist = waist; } + + public boolean getChest() { return chest; } + + public void setChest(boolean chest) { this.chest = chest; } + + public boolean getLegs() { return legs; } + + public void setLegs(boolean legs) { this.legs = legs; } + + public boolean getKnees() { return knees; } + + public void setKnees(boolean knees) { this.knees = knees; } + + public boolean getElbows() { return elbows; } + + public void setElbows(boolean elbows) { this.elbows = elbows; } + + + public SteamVRTrackersSettingT() { + this.waist = false; + this.chest = false; + this.legs = false; + this.knees = false; + this.elbows = false; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java index 8fb57699..d158e36d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatios.java @@ -1,107 +1,107 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Settings for the skeletal model that are ratios. - * These values range from 0 to 1. - */ -@SuppressWarnings("unused") -public final class ModelRatios extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ModelRatios getRootAsModelRatios(ByteBuffer _bb) { return getRootAsModelRatios(_bb, new ModelRatios()); } - public static ModelRatios getRootAsModelRatios(ByteBuffer _bb, ModelRatios 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 ModelRatios __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasImputeWaistFromChestHip() { return 0 != __offset(4); } - public float imputeWaistFromChestHip() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasImputeWaistFromChestLegs() { return 0 != __offset(6); } - public float imputeWaistFromChestLegs() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasImputeHipFromChestLegs() { return 0 != __offset(8); } - public float imputeHipFromChestLegs() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - public boolean hasImputeHipFromWaistLegs() { return 0 != __offset(10); } - public float imputeHipFromWaistLegs() { int o = __offset(10); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - /** - * Hip's yaw and roll is set to the average of legs when 1.0 - */ - public boolean hasInterpHipLegs() { return 0 != __offset(12); } - public float interpHipLegs() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - /** - * Knee trackers' yaw and roll is set to the ankle's when 1.0 - */ - public boolean hasInterpKneeTrackerAnkle() { return 0 != __offset(14); } - public float interpKneeTrackerAnkle() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } - - public static int createModelRatios(FlatBufferBuilder builder, - float imputeWaistFromChestHip, - float imputeWaistFromChestLegs, - float imputeHipFromChestLegs, - float imputeHipFromWaistLegs, - float interpHipLegs, - float interpKneeTrackerAnkle) { - builder.startTable(6); - ModelRatios.addInterpKneeTrackerAnkle(builder, interpKneeTrackerAnkle); - ModelRatios.addInterpHipLegs(builder, interpHipLegs); - ModelRatios.addImputeHipFromWaistLegs(builder, imputeHipFromWaistLegs); - ModelRatios.addImputeHipFromChestLegs(builder, imputeHipFromChestLegs); - ModelRatios.addImputeWaistFromChestLegs(builder, imputeWaistFromChestLegs); - ModelRatios.addImputeWaistFromChestHip(builder, imputeWaistFromChestHip); - return ModelRatios.endModelRatios(builder); - } - - public static void startModelRatios(FlatBufferBuilder builder) { builder.startTable(6); } - public static void addImputeWaistFromChestHip(FlatBufferBuilder builder, float imputeWaistFromChestHip) { builder.addFloat(0, imputeWaistFromChestHip, 0f); } - public static void addImputeWaistFromChestLegs(FlatBufferBuilder builder, float imputeWaistFromChestLegs) { builder.addFloat(1, imputeWaistFromChestLegs, 0f); } - public static void addImputeHipFromChestLegs(FlatBufferBuilder builder, float imputeHipFromChestLegs) { builder.addFloat(2, imputeHipFromChestLegs, 0f); } - public static void addImputeHipFromWaistLegs(FlatBufferBuilder builder, float imputeHipFromWaistLegs) { builder.addFloat(3, imputeHipFromWaistLegs, 0f); } - public static void addInterpHipLegs(FlatBufferBuilder builder, float interpHipLegs) { builder.addFloat(4, interpHipLegs, 0f); } - public static void addInterpKneeTrackerAnkle(FlatBufferBuilder builder, float interpKneeTrackerAnkle) { builder.addFloat(5, interpKneeTrackerAnkle, 0f); } - public static int endModelRatios(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 ModelRatios get(int j) { return get(new ModelRatios(), j); } - public ModelRatios get(ModelRatios obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ModelRatiosT unpack() { - ModelRatiosT _o = new ModelRatiosT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ModelRatiosT _o) { - Float _oImputeWaistFromChestHip = hasImputeWaistFromChestHip() ? imputeWaistFromChestHip() : null; - _o.setImputeWaistFromChestHip(_oImputeWaistFromChestHip); - Float _oImputeWaistFromChestLegs = hasImputeWaistFromChestLegs() ? imputeWaistFromChestLegs() : null; - _o.setImputeWaistFromChestLegs(_oImputeWaistFromChestLegs); - Float _oImputeHipFromChestLegs = hasImputeHipFromChestLegs() ? imputeHipFromChestLegs() : null; - _o.setImputeHipFromChestLegs(_oImputeHipFromChestLegs); - Float _oImputeHipFromWaistLegs = hasImputeHipFromWaistLegs() ? imputeHipFromWaistLegs() : null; - _o.setImputeHipFromWaistLegs(_oImputeHipFromWaistLegs); - Float _oInterpHipLegs = hasInterpHipLegs() ? interpHipLegs() : null; - _o.setInterpHipLegs(_oInterpHipLegs); - Float _oInterpKneeTrackerAnkle = hasInterpKneeTrackerAnkle() ? interpKneeTrackerAnkle() : null; - _o.setInterpKneeTrackerAnkle(_oInterpKneeTrackerAnkle); - } - public static int pack(FlatBufferBuilder builder, ModelRatiosT _o) { - if (_o == null) return 0; - return createModelRatios( - builder, - _o.getImputeWaistFromChestHip(), - _o.getImputeWaistFromChestLegs(), - _o.getImputeHipFromChestLegs(), - _o.getImputeHipFromWaistLegs(), - _o.getInterpHipLegs(), - _o.getInterpKneeTrackerAnkle()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Settings for the skeletal model that are ratios. + * These values range from 0 to 1. + */ +@SuppressWarnings("unused") +public final class ModelRatios extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ModelRatios getRootAsModelRatios(ByteBuffer _bb) { return getRootAsModelRatios(_bb, new ModelRatios()); } + public static ModelRatios getRootAsModelRatios(ByteBuffer _bb, ModelRatios 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 ModelRatios __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasImputeWaistFromChestHip() { return 0 != __offset(4); } + public float imputeWaistFromChestHip() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasImputeWaistFromChestLegs() { return 0 != __offset(6); } + public float imputeWaistFromChestLegs() { int o = __offset(6); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasImputeHipFromChestLegs() { return 0 != __offset(8); } + public float imputeHipFromChestLegs() { int o = __offset(8); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + public boolean hasImputeHipFromWaistLegs() { return 0 != __offset(10); } + public float imputeHipFromWaistLegs() { int o = __offset(10); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + /** + * Hip's yaw and roll is set to the average of legs when 1.0 + */ + public boolean hasInterpHipLegs() { return 0 != __offset(12); } + public float interpHipLegs() { int o = __offset(12); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + /** + * Knee trackers' yaw and roll is set to the ankle's when 1.0 + */ + public boolean hasInterpKneeTrackerAnkle() { return 0 != __offset(14); } + public float interpKneeTrackerAnkle() { int o = __offset(14); return o != 0 ? bb.getFloat(o + bb_pos) : 0f; } + + public static int createModelRatios(FlatBufferBuilder builder, + float imputeWaistFromChestHip, + float imputeWaistFromChestLegs, + float imputeHipFromChestLegs, + float imputeHipFromWaistLegs, + float interpHipLegs, + float interpKneeTrackerAnkle) { + builder.startTable(6); + ModelRatios.addInterpKneeTrackerAnkle(builder, interpKneeTrackerAnkle); + ModelRatios.addInterpHipLegs(builder, interpHipLegs); + ModelRatios.addImputeHipFromWaistLegs(builder, imputeHipFromWaistLegs); + ModelRatios.addImputeHipFromChestLegs(builder, imputeHipFromChestLegs); + ModelRatios.addImputeWaistFromChestLegs(builder, imputeWaistFromChestLegs); + ModelRatios.addImputeWaistFromChestHip(builder, imputeWaistFromChestHip); + return ModelRatios.endModelRatios(builder); + } + + public static void startModelRatios(FlatBufferBuilder builder) { builder.startTable(6); } + public static void addImputeWaistFromChestHip(FlatBufferBuilder builder, float imputeWaistFromChestHip) { builder.addFloat(0, imputeWaistFromChestHip, 0f); } + public static void addImputeWaistFromChestLegs(FlatBufferBuilder builder, float imputeWaistFromChestLegs) { builder.addFloat(1, imputeWaistFromChestLegs, 0f); } + public static void addImputeHipFromChestLegs(FlatBufferBuilder builder, float imputeHipFromChestLegs) { builder.addFloat(2, imputeHipFromChestLegs, 0f); } + public static void addImputeHipFromWaistLegs(FlatBufferBuilder builder, float imputeHipFromWaistLegs) { builder.addFloat(3, imputeHipFromWaistLegs, 0f); } + public static void addInterpHipLegs(FlatBufferBuilder builder, float interpHipLegs) { builder.addFloat(4, interpHipLegs, 0f); } + public static void addInterpKneeTrackerAnkle(FlatBufferBuilder builder, float interpKneeTrackerAnkle) { builder.addFloat(5, interpKneeTrackerAnkle, 0f); } + public static int endModelRatios(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 ModelRatios get(int j) { return get(new ModelRatios(), j); } + public ModelRatios get(ModelRatios obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ModelRatiosT unpack() { + ModelRatiosT _o = new ModelRatiosT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ModelRatiosT _o) { + Float _oImputeWaistFromChestHip = hasImputeWaistFromChestHip() ? imputeWaistFromChestHip() : null; + _o.setImputeWaistFromChestHip(_oImputeWaistFromChestHip); + Float _oImputeWaistFromChestLegs = hasImputeWaistFromChestLegs() ? imputeWaistFromChestLegs() : null; + _o.setImputeWaistFromChestLegs(_oImputeWaistFromChestLegs); + Float _oImputeHipFromChestLegs = hasImputeHipFromChestLegs() ? imputeHipFromChestLegs() : null; + _o.setImputeHipFromChestLegs(_oImputeHipFromChestLegs); + Float _oImputeHipFromWaistLegs = hasImputeHipFromWaistLegs() ? imputeHipFromWaistLegs() : null; + _o.setImputeHipFromWaistLegs(_oImputeHipFromWaistLegs); + Float _oInterpHipLegs = hasInterpHipLegs() ? interpHipLegs() : null; + _o.setInterpHipLegs(_oInterpHipLegs); + Float _oInterpKneeTrackerAnkle = hasInterpKneeTrackerAnkle() ? interpKneeTrackerAnkle() : null; + _o.setInterpKneeTrackerAnkle(_oInterpKneeTrackerAnkle); + } + public static int pack(FlatBufferBuilder builder, ModelRatiosT _o) { + if (_o == null) return 0; + return createModelRatios( + builder, + _o.getImputeWaistFromChestHip(), + _o.getImputeWaistFromChestLegs(), + _o.getImputeHipFromChestLegs(), + _o.getImputeHipFromWaistLegs(), + _o.getInterpHipLegs(), + _o.getInterpKneeTrackerAnkle()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java index 1b7eb4d5..b805c4e8 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelRatiosT.java @@ -1,52 +1,52 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class ModelRatiosT { - private Float imputeWaistFromChestHip; - private Float imputeWaistFromChestLegs; - private Float imputeHipFromChestLegs; - private Float imputeHipFromWaistLegs; - private Float interpHipLegs; - private Float interpKneeTrackerAnkle; - - public Float getImputeWaistFromChestHip() { return imputeWaistFromChestHip; } - - public void setImputeWaistFromChestHip(Float imputeWaistFromChestHip) { this.imputeWaistFromChestHip = imputeWaistFromChestHip; } - - public Float getImputeWaistFromChestLegs() { return imputeWaistFromChestLegs; } - - public void setImputeWaistFromChestLegs(Float imputeWaistFromChestLegs) { this.imputeWaistFromChestLegs = imputeWaistFromChestLegs; } - - public Float getImputeHipFromChestLegs() { return imputeHipFromChestLegs; } - - public void setImputeHipFromChestLegs(Float imputeHipFromChestLegs) { this.imputeHipFromChestLegs = imputeHipFromChestLegs; } - - public Float getImputeHipFromWaistLegs() { return imputeHipFromWaistLegs; } - - public void setImputeHipFromWaistLegs(Float imputeHipFromWaistLegs) { this.imputeHipFromWaistLegs = imputeHipFromWaistLegs; } - - public Float getInterpHipLegs() { return interpHipLegs; } - - public void setInterpHipLegs(Float interpHipLegs) { this.interpHipLegs = interpHipLegs; } - - public Float getInterpKneeTrackerAnkle() { return interpKneeTrackerAnkle; } - - public void setInterpKneeTrackerAnkle(Float interpKneeTrackerAnkle) { this.interpKneeTrackerAnkle = interpKneeTrackerAnkle; } - - - public ModelRatiosT() { - this.imputeWaistFromChestHip = null; - this.imputeWaistFromChestLegs = null; - this.imputeHipFromChestLegs = null; - this.imputeHipFromWaistLegs = null; - this.interpHipLegs = null; - this.interpKneeTrackerAnkle = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class ModelRatiosT { + private Float imputeWaistFromChestHip; + private Float imputeWaistFromChestLegs; + private Float imputeHipFromChestLegs; + private Float imputeHipFromWaistLegs; + private Float interpHipLegs; + private Float interpKneeTrackerAnkle; + + public Float getImputeWaistFromChestHip() { return imputeWaistFromChestHip; } + + public void setImputeWaistFromChestHip(Float imputeWaistFromChestHip) { this.imputeWaistFromChestHip = imputeWaistFromChestHip; } + + public Float getImputeWaistFromChestLegs() { return imputeWaistFromChestLegs; } + + public void setImputeWaistFromChestLegs(Float imputeWaistFromChestLegs) { this.imputeWaistFromChestLegs = imputeWaistFromChestLegs; } + + public Float getImputeHipFromChestLegs() { return imputeHipFromChestLegs; } + + public void setImputeHipFromChestLegs(Float imputeHipFromChestLegs) { this.imputeHipFromChestLegs = imputeHipFromChestLegs; } + + public Float getImputeHipFromWaistLegs() { return imputeHipFromWaistLegs; } + + public void setImputeHipFromWaistLegs(Float imputeHipFromWaistLegs) { this.imputeHipFromWaistLegs = imputeHipFromWaistLegs; } + + public Float getInterpHipLegs() { return interpHipLegs; } + + public void setInterpHipLegs(Float interpHipLegs) { this.interpHipLegs = interpHipLegs; } + + public Float getInterpKneeTrackerAnkle() { return interpKneeTrackerAnkle; } + + public void setInterpKneeTrackerAnkle(Float interpKneeTrackerAnkle) { this.interpKneeTrackerAnkle = interpKneeTrackerAnkle; } + + + public ModelRatiosT() { + this.imputeWaistFromChestHip = null; + this.imputeWaistFromChestLegs = null; + this.imputeHipFromChestLegs = null; + this.imputeHipFromWaistLegs = null; + this.interpHipLegs = null; + this.interpKneeTrackerAnkle = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java index 716996d3..5aec761d 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettings.java @@ -1,70 +1,70 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Settings for the skeletal model. - */ -@SuppressWarnings("unused") -public final class ModelSettings extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ModelSettings getRootAsModelSettings(ByteBuffer _bb) { return getRootAsModelSettings(_bb, new ModelSettings()); } - public static ModelSettings getRootAsModelSettings(ByteBuffer _bb, ModelSettings 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 ModelSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.rpc.settings.ModelToggles toggles() { return toggles(new solarxr_protocol.rpc.settings.ModelToggles()); } - public solarxr_protocol.rpc.settings.ModelToggles toggles(solarxr_protocol.rpc.settings.ModelToggles obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - public solarxr_protocol.rpc.settings.ModelRatios ratios() { return ratios(new solarxr_protocol.rpc.settings.ModelRatios()); } - public solarxr_protocol.rpc.settings.ModelRatios ratios(solarxr_protocol.rpc.settings.ModelRatios obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createModelSettings(FlatBufferBuilder builder, - int togglesOffset, - int ratiosOffset) { - builder.startTable(2); - ModelSettings.addRatios(builder, ratiosOffset); - ModelSettings.addToggles(builder, togglesOffset); - return ModelSettings.endModelSettings(builder); - } - - public static void startModelSettings(FlatBufferBuilder builder) { builder.startTable(2); } - public static void addToggles(FlatBufferBuilder builder, int togglesOffset) { builder.addOffset(0, togglesOffset, 0); } - public static void addRatios(FlatBufferBuilder builder, int ratiosOffset) { builder.addOffset(1, ratiosOffset, 0); } - public static int endModelSettings(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 ModelSettings get(int j) { return get(new ModelSettings(), j); } - public ModelSettings get(ModelSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ModelSettingsT unpack() { - ModelSettingsT _o = new ModelSettingsT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ModelSettingsT _o) { - if (toggles() != null) _o.setToggles(toggles().unpack()); - else _o.setToggles(null); - if (ratios() != null) _o.setRatios(ratios().unpack()); - else _o.setRatios(null); - } - public static int pack(FlatBufferBuilder builder, ModelSettingsT _o) { - if (_o == null) return 0; - int _toggles = _o.getToggles() == null ? 0 : solarxr_protocol.rpc.settings.ModelToggles.pack(builder, _o.getToggles()); - int _ratios = _o.getRatios() == null ? 0 : solarxr_protocol.rpc.settings.ModelRatios.pack(builder, _o.getRatios()); - return createModelSettings( - builder, - _toggles, - _ratios); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Settings for the skeletal model. + */ +@SuppressWarnings("unused") +public final class ModelSettings extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ModelSettings getRootAsModelSettings(ByteBuffer _bb) { return getRootAsModelSettings(_bb, new ModelSettings()); } + public static ModelSettings getRootAsModelSettings(ByteBuffer _bb, ModelSettings 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 ModelSettings __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.rpc.settings.ModelToggles toggles() { return toggles(new solarxr_protocol.rpc.settings.ModelToggles()); } + public solarxr_protocol.rpc.settings.ModelToggles toggles(solarxr_protocol.rpc.settings.ModelToggles obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.rpc.settings.ModelRatios ratios() { return ratios(new solarxr_protocol.rpc.settings.ModelRatios()); } + public solarxr_protocol.rpc.settings.ModelRatios ratios(solarxr_protocol.rpc.settings.ModelRatios obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createModelSettings(FlatBufferBuilder builder, + int togglesOffset, + int ratiosOffset) { + builder.startTable(2); + ModelSettings.addRatios(builder, ratiosOffset); + ModelSettings.addToggles(builder, togglesOffset); + return ModelSettings.endModelSettings(builder); + } + + public static void startModelSettings(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addToggles(FlatBufferBuilder builder, int togglesOffset) { builder.addOffset(0, togglesOffset, 0); } + public static void addRatios(FlatBufferBuilder builder, int ratiosOffset) { builder.addOffset(1, ratiosOffset, 0); } + public static int endModelSettings(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 ModelSettings get(int j) { return get(new ModelSettings(), j); } + public ModelSettings get(ModelSettings obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ModelSettingsT unpack() { + ModelSettingsT _o = new ModelSettingsT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ModelSettingsT _o) { + if (toggles() != null) _o.setToggles(toggles().unpack()); + else _o.setToggles(null); + if (ratios() != null) _o.setRatios(ratios().unpack()); + else _o.setRatios(null); + } + public static int pack(FlatBufferBuilder builder, ModelSettingsT _o) { + if (_o == null) return 0; + int _toggles = _o.getToggles() == null ? 0 : solarxr_protocol.rpc.settings.ModelToggles.pack(builder, _o.getToggles()); + int _ratios = _o.getRatios() == null ? 0 : solarxr_protocol.rpc.settings.ModelRatios.pack(builder, _o.getRatios()); + return createModelSettings( + builder, + _toggles, + _ratios); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java index 67bfc38e..300189a3 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelSettingsT.java @@ -1,28 +1,28 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class ModelSettingsT { - private solarxr_protocol.rpc.settings.ModelTogglesT toggles; - private solarxr_protocol.rpc.settings.ModelRatiosT ratios; - - public solarxr_protocol.rpc.settings.ModelTogglesT getToggles() { return toggles; } - - public void setToggles(solarxr_protocol.rpc.settings.ModelTogglesT toggles) { this.toggles = toggles; } - - public solarxr_protocol.rpc.settings.ModelRatiosT getRatios() { return ratios; } - - public void setRatios(solarxr_protocol.rpc.settings.ModelRatiosT ratios) { this.ratios = ratios; } - - - public ModelSettingsT() { - this.toggles = null; - this.ratios = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class ModelSettingsT { + private solarxr_protocol.rpc.settings.ModelTogglesT toggles; + private solarxr_protocol.rpc.settings.ModelRatiosT ratios; + + public solarxr_protocol.rpc.settings.ModelTogglesT getToggles() { return toggles; } + + public void setToggles(solarxr_protocol.rpc.settings.ModelTogglesT toggles) { this.toggles = toggles; } + + public solarxr_protocol.rpc.settings.ModelRatiosT getRatios() { return ratios; } + + public void setRatios(solarxr_protocol.rpc.settings.ModelRatiosT ratios) { this.ratios = ratios; } + + + public ModelSettingsT() { + this.toggles = null; + this.ratios = null; + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java index e2fa9bed..49f58cba 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelToggles.java @@ -1,100 +1,100 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Settings for the skeletal model that are toggles. - */ -@SuppressWarnings("unused") -public final class ModelToggles extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static ModelToggles getRootAsModelToggles(ByteBuffer _bb) { return getRootAsModelToggles(_bb, new ModelToggles()); } - public static ModelToggles getRootAsModelToggles(ByteBuffer _bb, ModelToggles 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 ModelToggles __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public boolean hasExtendedSpine() { return 0 != __offset(4); } - public boolean extendedSpine() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasExtendedPelvis() { return 0 != __offset(6); } - public boolean extendedPelvis() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasExtendedKnee() { return 0 != __offset(8); } - public boolean extendedKnee() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasForceArmsFromHmd() { return 0 != __offset(10); } - public boolean forceArmsFromHmd() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasFloorClip() { return 0 != __offset(12); } - public boolean floorClip() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - public boolean hasSkatingCorrection() { return 0 != __offset(14); } - public boolean skatingCorrection() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } - - public static int createModelToggles(FlatBufferBuilder builder, - boolean extendedSpine, - boolean extendedPelvis, - boolean extendedKnee, - boolean forceArmsFromHmd, - boolean floorClip, - boolean skatingCorrection) { - builder.startTable(6); - ModelToggles.addSkatingCorrection(builder, skatingCorrection); - ModelToggles.addFloorClip(builder, floorClip); - ModelToggles.addForceArmsFromHmd(builder, forceArmsFromHmd); - ModelToggles.addExtendedKnee(builder, extendedKnee); - ModelToggles.addExtendedPelvis(builder, extendedPelvis); - ModelToggles.addExtendedSpine(builder, extendedSpine); - return ModelToggles.endModelToggles(builder); - } - - public static void startModelToggles(FlatBufferBuilder builder) { builder.startTable(6); } - public static void addExtendedSpine(FlatBufferBuilder builder, boolean extendedSpine) { builder.addBoolean(0, extendedSpine, false); } - public static void addExtendedPelvis(FlatBufferBuilder builder, boolean extendedPelvis) { builder.addBoolean(1, extendedPelvis, false); } - public static void addExtendedKnee(FlatBufferBuilder builder, boolean extendedKnee) { builder.addBoolean(2, extendedKnee, false); } - public static void addForceArmsFromHmd(FlatBufferBuilder builder, boolean forceArmsFromHmd) { builder.addBoolean(3, forceArmsFromHmd, false); } - public static void addFloorClip(FlatBufferBuilder builder, boolean floorClip) { builder.addBoolean(4, floorClip, false); } - public static void addSkatingCorrection(FlatBufferBuilder builder, boolean skatingCorrection) { builder.addBoolean(5, skatingCorrection, false); } - public static int endModelToggles(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 ModelToggles get(int j) { return get(new ModelToggles(), j); } - public ModelToggles get(ModelToggles obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public ModelTogglesT unpack() { - ModelTogglesT _o = new ModelTogglesT(); - unpackTo(_o); - return _o; - } - public void unpackTo(ModelTogglesT _o) { - Boolean _oExtendedSpine = hasExtendedSpine() ? extendedSpine() : null; - _o.setExtendedSpine(_oExtendedSpine); - Boolean _oExtendedPelvis = hasExtendedPelvis() ? extendedPelvis() : null; - _o.setExtendedPelvis(_oExtendedPelvis); - Boolean _oExtendedKnee = hasExtendedKnee() ? extendedKnee() : null; - _o.setExtendedKnee(_oExtendedKnee); - Boolean _oForceArmsFromHmd = hasForceArmsFromHmd() ? forceArmsFromHmd() : null; - _o.setForceArmsFromHmd(_oForceArmsFromHmd); - Boolean _oFloorClip = hasFloorClip() ? floorClip() : null; - _o.setFloorClip(_oFloorClip); - Boolean _oSkatingCorrection = hasSkatingCorrection() ? skatingCorrection() : null; - _o.setSkatingCorrection(_oSkatingCorrection); - } - public static int pack(FlatBufferBuilder builder, ModelTogglesT _o) { - if (_o == null) return 0; - return createModelToggles( - builder, - _o.getExtendedSpine(), - _o.getExtendedPelvis(), - _o.getExtendedKnee(), - _o.getForceArmsFromHmd(), - _o.getFloorClip(), - _o.getSkatingCorrection()); - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Settings for the skeletal model that are toggles. + */ +@SuppressWarnings("unused") +public final class ModelToggles extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static ModelToggles getRootAsModelToggles(ByteBuffer _bb) { return getRootAsModelToggles(_bb, new ModelToggles()); } + public static ModelToggles getRootAsModelToggles(ByteBuffer _bb, ModelToggles 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 ModelToggles __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean hasExtendedSpine() { return 0 != __offset(4); } + public boolean extendedSpine() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasExtendedPelvis() { return 0 != __offset(6); } + public boolean extendedPelvis() { int o = __offset(6); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasExtendedKnee() { return 0 != __offset(8); } + public boolean extendedKnee() { int o = __offset(8); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasForceArmsFromHmd() { return 0 != __offset(10); } + public boolean forceArmsFromHmd() { int o = __offset(10); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasFloorClip() { return 0 != __offset(12); } + public boolean floorClip() { int o = __offset(12); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + public boolean hasSkatingCorrection() { return 0 != __offset(14); } + public boolean skatingCorrection() { int o = __offset(14); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createModelToggles(FlatBufferBuilder builder, + boolean extendedSpine, + boolean extendedPelvis, + boolean extendedKnee, + boolean forceArmsFromHmd, + boolean floorClip, + boolean skatingCorrection) { + builder.startTable(6); + ModelToggles.addSkatingCorrection(builder, skatingCorrection); + ModelToggles.addFloorClip(builder, floorClip); + ModelToggles.addForceArmsFromHmd(builder, forceArmsFromHmd); + ModelToggles.addExtendedKnee(builder, extendedKnee); + ModelToggles.addExtendedPelvis(builder, extendedPelvis); + ModelToggles.addExtendedSpine(builder, extendedSpine); + return ModelToggles.endModelToggles(builder); + } + + public static void startModelToggles(FlatBufferBuilder builder) { builder.startTable(6); } + public static void addExtendedSpine(FlatBufferBuilder builder, boolean extendedSpine) { builder.addBoolean(0, extendedSpine, false); } + public static void addExtendedPelvis(FlatBufferBuilder builder, boolean extendedPelvis) { builder.addBoolean(1, extendedPelvis, false); } + public static void addExtendedKnee(FlatBufferBuilder builder, boolean extendedKnee) { builder.addBoolean(2, extendedKnee, false); } + public static void addForceArmsFromHmd(FlatBufferBuilder builder, boolean forceArmsFromHmd) { builder.addBoolean(3, forceArmsFromHmd, false); } + public static void addFloorClip(FlatBufferBuilder builder, boolean floorClip) { builder.addBoolean(4, floorClip, false); } + public static void addSkatingCorrection(FlatBufferBuilder builder, boolean skatingCorrection) { builder.addBoolean(5, skatingCorrection, false); } + public static int endModelToggles(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 ModelToggles get(int j) { return get(new ModelToggles(), j); } + public ModelToggles get(ModelToggles obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ModelTogglesT unpack() { + ModelTogglesT _o = new ModelTogglesT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ModelTogglesT _o) { + Boolean _oExtendedSpine = hasExtendedSpine() ? extendedSpine() : null; + _o.setExtendedSpine(_oExtendedSpine); + Boolean _oExtendedPelvis = hasExtendedPelvis() ? extendedPelvis() : null; + _o.setExtendedPelvis(_oExtendedPelvis); + Boolean _oExtendedKnee = hasExtendedKnee() ? extendedKnee() : null; + _o.setExtendedKnee(_oExtendedKnee); + Boolean _oForceArmsFromHmd = hasForceArmsFromHmd() ? forceArmsFromHmd() : null; + _o.setForceArmsFromHmd(_oForceArmsFromHmd); + Boolean _oFloorClip = hasFloorClip() ? floorClip() : null; + _o.setFloorClip(_oFloorClip); + Boolean _oSkatingCorrection = hasSkatingCorrection() ? skatingCorrection() : null; + _o.setSkatingCorrection(_oSkatingCorrection); + } + public static int pack(FlatBufferBuilder builder, ModelTogglesT _o) { + if (_o == null) return 0; + return createModelToggles( + builder, + _o.getExtendedSpine(), + _o.getExtendedPelvis(), + _o.getExtendedKnee(), + _o.getForceArmsFromHmd(), + _o.getFloorClip(), + _o.getSkatingCorrection()); + } +} + diff --git a/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java b/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java index e0fa05da..37f33b8f 100644 --- a/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java +++ b/protocol/java/src/solarxr_protocol/rpc/settings/ModelTogglesT.java @@ -1,52 +1,52 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.rpc.settings; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -public class ModelTogglesT { - private Boolean extendedSpine; - private Boolean extendedPelvis; - private Boolean extendedKnee; - private Boolean forceArmsFromHmd; - private Boolean floorClip; - private Boolean skatingCorrection; - - public Boolean getExtendedSpine() { return extendedSpine; } - - public void setExtendedSpine(Boolean extendedSpine) { this.extendedSpine = extendedSpine; } - - public Boolean getExtendedPelvis() { return extendedPelvis; } - - public void setExtendedPelvis(Boolean extendedPelvis) { this.extendedPelvis = extendedPelvis; } - - public Boolean getExtendedKnee() { return extendedKnee; } - - public void setExtendedKnee(Boolean extendedKnee) { this.extendedKnee = extendedKnee; } - - public Boolean getForceArmsFromHmd() { return forceArmsFromHmd; } - - public void setForceArmsFromHmd(Boolean forceArmsFromHmd) { this.forceArmsFromHmd = forceArmsFromHmd; } - - public Boolean getFloorClip() { return floorClip; } - - public void setFloorClip(Boolean floorClip) { this.floorClip = floorClip; } - - public Boolean getSkatingCorrection() { return skatingCorrection; } - - public void setSkatingCorrection(Boolean skatingCorrection) { this.skatingCorrection = skatingCorrection; } - - - public ModelTogglesT() { - this.extendedSpine = null; - this.extendedPelvis = null; - this.extendedKnee = null; - this.forceArmsFromHmd = null; - this.floorClip = null; - this.skatingCorrection = null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.rpc.settings; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +public class ModelTogglesT { + private Boolean extendedSpine; + private Boolean extendedPelvis; + private Boolean extendedKnee; + private Boolean forceArmsFromHmd; + private Boolean floorClip; + private Boolean skatingCorrection; + + public Boolean getExtendedSpine() { return extendedSpine; } + + public void setExtendedSpine(Boolean extendedSpine) { this.extendedSpine = extendedSpine; } + + public Boolean getExtendedPelvis() { return extendedPelvis; } + + public void setExtendedPelvis(Boolean extendedPelvis) { this.extendedPelvis = extendedPelvis; } + + public Boolean getExtendedKnee() { return extendedKnee; } + + public void setExtendedKnee(Boolean extendedKnee) { this.extendedKnee = extendedKnee; } + + public Boolean getForceArmsFromHmd() { return forceArmsFromHmd; } + + public void setForceArmsFromHmd(Boolean forceArmsFromHmd) { this.forceArmsFromHmd = forceArmsFromHmd; } + + public Boolean getFloorClip() { return floorClip; } + + public void setFloorClip(Boolean floorClip) { this.floorClip = floorClip; } + + public Boolean getSkatingCorrection() { return skatingCorrection; } + + public void setSkatingCorrection(Boolean skatingCorrection) { this.skatingCorrection = skatingCorrection; } + + + public ModelTogglesT() { + this.extendedSpine = null; + this.extendedPelvis = null; + this.extendedKnee = null; + this.forceArmsFromHmd = null; + this.floorClip = null; + this.skatingCorrection = null; + } +} + diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 794e640b..58806d58 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -1,170 +1,199 @@ -// Automatically generated by the Flatbuffers compiler. Do not modify. -pub mod solarxr_protocol { - use super::*; - pub mod data_feed { - use super::*; - pub mod device_data { - use super::*; - mod device_data_mask_generated; - pub use self::device_data_mask_generated::*; - mod device_data_generated; - pub use self::device_data_generated::*; - } // device_data - pub mod tracker { - use super::*; - mod tracker_data_generated; - pub use self::tracker_data_generated::*; - mod tracker_data_mask_generated; - pub use self::tracker_data_mask_generated::*; - mod tracker_info_generated; - pub use self::tracker_info_generated::*; - } // tracker - mod data_feed_message_generated; - pub use self::data_feed_message_generated::*; - mod bone_generated; - pub use self::bone_generated::*; - mod data_feed_message_header_generated; - pub use self::data_feed_message_header_generated::*; - mod poll_data_feed_generated; - pub use self::poll_data_feed_generated::*; - mod start_data_feed_generated; - pub use self::start_data_feed_generated::*; - mod data_feed_update_generated; - pub use self::data_feed_update_generated::*; - mod data_feed_config_generated; - pub use self::data_feed_config_generated::*; - } // data_feed - pub mod datatypes { - use super::*; - pub mod hardware_info { - use super::*; - mod mcu_type_generated; - pub use self::mcu_type_generated::*; - mod imu_type_generated; - pub use self::imu_type_generated::*; - mod hardware_address_generated; - pub use self::hardware_address_generated::*; - mod hardware_info_generated; - pub use self::hardware_info_generated::*; - mod hardware_status_generated; - pub use self::hardware_status_generated::*; - mod firmware_status_mask_generated; - pub use self::firmware_status_mask_generated::*; - } // hardware_info - pub mod math { - use super::*; - mod quat_generated; - pub use self::quat_generated::*; - mod vec_3f_generated; - pub use self::vec_3f_generated::*; - } // math - mod firmware_error_code_generated; - pub use self::firmware_error_code_generated::*; - mod filtering_type_generated; - pub use self::filtering_type_generated::*; - mod tracker_role_generated; - pub use self::tracker_role_generated::*; - mod body_part_generated; - pub use self::body_part_generated::*; - mod tracker_status_generated; - pub use self::tracker_status_generated::*; - mod hz_f32_generated; - pub use self::hz_f32_generated::*; - mod transaction_id_generated; - pub use self::transaction_id_generated::*; - mod device_id_generated; - pub use self::device_id_generated::*; - mod tracker_id_generated; - pub use self::tracker_id_generated::*; - mod log_data_generated; - pub use self::log_data_generated::*; - mod temperature_generated; - pub use self::temperature_generated::*; - mod ipv_4address_generated; - pub use self::ipv_4address_generated::*; - } // datatypes - pub mod rpc { - use super::*; - pub mod settings { - use super::*; - mod model_toggles_generated; - pub use self::model_toggles_generated::*; - mod model_ratios_generated; - pub use self::model_ratios_generated::*; - mod model_settings_generated; - pub use self::model_settings_generated::*; - } // settings - mod rpc_message_generated; - pub use self::rpc_message_generated::*; - mod reset_type_generated; - pub use self::reset_type_generated::*; - mod skeleton_bone_generated; - pub use self::skeleton_bone_generated::*; - mod auto_bone_process_type_generated; - pub use self::auto_bone_process_type_generated::*; - mod rpc_message_header_generated; - pub use self::rpc_message_header_generated::*; - mod heartbeat_request_generated; - pub use self::heartbeat_request_generated::*; - mod heartbeat_response_generated; - pub use self::heartbeat_response_generated::*; - mod reset_request_generated; - pub use self::reset_request_generated::*; - mod reset_response_generated; - pub use self::reset_response_generated::*; - mod assign_tracker_request_generated; - pub use self::assign_tracker_request_generated::*; - mod settings_request_generated; - pub use self::settings_request_generated::*; - mod settings_response_generated; - pub use self::settings_response_generated::*; - mod change_settings_request_generated; - pub use self::change_settings_request_generated::*; - mod steam_vrtrackers_setting_generated; - pub use self::steam_vrtrackers_setting_generated::*; - mod filtering_settings_generated; - pub use self::filtering_settings_generated::*; - mod record_bvhrequest_generated; - pub use self::record_bvhrequest_generated::*; - mod record_bvhstatus_generated; - pub use self::record_bvhstatus_generated::*; - mod skeleton_part_generated; - pub use self::skeleton_part_generated::*; - mod skeleton_config_request_generated; - pub use self::skeleton_config_request_generated::*; - mod skeleton_config_response_generated; - pub use self::skeleton_config_response_generated::*; - mod skeleton_reset_all_request_generated; - pub use self::skeleton_reset_all_request_generated::*; - mod change_skeleton_config_request_generated; - pub use self::change_skeleton_config_request_generated::*; - mod open_serial_request_generated; - pub use self::open_serial_request_generated::*; - mod close_serial_request_generated; - pub use self::close_serial_request_generated::*; - mod set_wifi_request_generated; - pub use self::set_wifi_request_generated::*; - mod serial_update_response_generated; - pub use self::serial_update_response_generated::*; - mod serial_tracker_reboot_request_generated; - pub use self::serial_tracker_reboot_request_generated::*; - mod serial_tracker_get_info_request_generated; - pub use self::serial_tracker_get_info_request_generated::*; - mod serial_tracker_factory_reset_request_generated; - pub use self::serial_tracker_factory_reset_request_generated::*; - mod auto_bone_process_request_generated; - pub use self::auto_bone_process_request_generated::*; - mod auto_bone_process_status_response_generated; - pub use self::auto_bone_process_status_response_generated::*; - mod auto_bone_epoch_response_generated; - pub use self::auto_bone_epoch_response_generated::*; - mod overlay_display_mode_request_generated; - pub use self::overlay_display_mode_request_generated::*; - mod overlay_display_mode_change_request_generated; - pub use self::overlay_display_mode_change_request_generated::*; - mod overlay_display_mode_response_generated; - pub use self::overlay_display_mode_response_generated::*; - } // rpc - mod message_bundle_generated; - pub use self::message_bundle_generated::*; -} // solarxr_protocol +// Automatically generated by the Flatbuffers compiler. Do not modify. +pub mod solarxr_protocol { + use super::*; + pub mod data_feed { + use super::*; + pub mod device_data { + use super::*; + mod device_data_mask_generated; + pub use self::device_data_mask_generated::*; + mod device_data_generated; + pub use self::device_data_generated::*; + } // device_data + pub mod tracker { + use super::*; + mod tracker_data_generated; + pub use self::tracker_data_generated::*; + mod tracker_data_mask_generated; + pub use self::tracker_data_mask_generated::*; + mod tracker_info_generated; + pub use self::tracker_info_generated::*; + } // tracker + mod data_feed_message_generated; + pub use self::data_feed_message_generated::*; + mod bone_generated; + pub use self::bone_generated::*; + mod data_feed_message_header_generated; + pub use self::data_feed_message_header_generated::*; + mod poll_data_feed_generated; + pub use self::poll_data_feed_generated::*; + mod start_data_feed_generated; + pub use self::start_data_feed_generated::*; + mod data_feed_update_generated; + pub use self::data_feed_update_generated::*; + mod data_feed_config_generated; + pub use self::data_feed_config_generated::*; + } // data_feed + pub mod datatypes { + use super::*; + pub mod hardware_info { + use super::*; + mod mcu_type_generated; + pub use self::mcu_type_generated::*; + mod imu_type_generated; + pub use self::imu_type_generated::*; + mod hardware_address_generated; + pub use self::hardware_address_generated::*; + mod hardware_info_generated; + pub use self::hardware_info_generated::*; + mod hardware_status_generated; + pub use self::hardware_status_generated::*; + mod firmware_status_mask_generated; + pub use self::firmware_status_mask_generated::*; + } // hardware_info + pub mod math { + use super::*; + mod quat_generated; + pub use self::quat_generated::*; + mod vec_3f_generated; + pub use self::vec_3f_generated::*; + } // math + mod firmware_error_code_generated; + pub use self::firmware_error_code_generated::*; + mod filtering_type_generated; + pub use self::filtering_type_generated::*; + mod tracker_role_generated; + pub use self::tracker_role_generated::*; + mod body_part_generated; + pub use self::body_part_generated::*; + mod tracker_status_generated; + pub use self::tracker_status_generated::*; + mod hz_f32_generated; + pub use self::hz_f32_generated::*; + mod transaction_id_generated; + pub use self::transaction_id_generated::*; + mod device_id_generated; + pub use self::device_id_generated::*; + mod tracker_id_generated; + pub use self::tracker_id_generated::*; + mod log_data_generated; + pub use self::log_data_generated::*; + mod temperature_generated; + pub use self::temperature_generated::*; + mod ipv_4address_generated; + pub use self::ipv_4address_generated::*; + mod bytes_generated; + pub use self::bytes_generated::*; + mod string_generated; + pub use self::string_generated::*; + } // datatypes + pub mod pub_sub { + use super::*; + mod topic_generated; + pub use self::topic_generated::*; + mod pub_sub_union_generated; + pub use self::pub_sub_union_generated::*; + mod payload_generated; + pub use self::payload_generated::*; + mod topic_id_generated; + pub use self::topic_id_generated::*; + mod topic_handle_generated; + pub use self::topic_handle_generated::*; + mod topic_handle_request_generated; + pub use self::topic_handle_request_generated::*; + mod topic_handle_response_generated; + pub use self::topic_handle_response_generated::*; + mod pub_sub_header_generated; + pub use self::pub_sub_header_generated::*; + mod message_generated; + pub use self::message_generated::*; + mod subscription_request_generated; + pub use self::subscription_request_generated::*; + mod key_values_generated; + pub use self::key_values_generated::*; + } // pub_sub + pub mod rpc { + use super::*; + pub mod settings { + use super::*; + mod model_toggles_generated; + pub use self::model_toggles_generated::*; + mod model_ratios_generated; + pub use self::model_ratios_generated::*; + mod model_settings_generated; + pub use self::model_settings_generated::*; + } // settings + mod rpc_message_generated; + pub use self::rpc_message_generated::*; + mod reset_type_generated; + pub use self::reset_type_generated::*; + mod skeleton_bone_generated; + pub use self::skeleton_bone_generated::*; + mod auto_bone_process_type_generated; + pub use self::auto_bone_process_type_generated::*; + mod rpc_message_header_generated; + pub use self::rpc_message_header_generated::*; + mod heartbeat_request_generated; + pub use self::heartbeat_request_generated::*; + mod heartbeat_response_generated; + pub use self::heartbeat_response_generated::*; + mod reset_request_generated; + pub use self::reset_request_generated::*; + mod reset_response_generated; + pub use self::reset_response_generated::*; + mod assign_tracker_request_generated; + pub use self::assign_tracker_request_generated::*; + mod settings_request_generated; + pub use self::settings_request_generated::*; + mod settings_response_generated; + pub use self::settings_response_generated::*; + mod change_settings_request_generated; + pub use self::change_settings_request_generated::*; + mod steam_vrtrackers_setting_generated; + pub use self::steam_vrtrackers_setting_generated::*; + mod filtering_settings_generated; + pub use self::filtering_settings_generated::*; + mod record_bvhrequest_generated; + pub use self::record_bvhrequest_generated::*; + mod record_bvhstatus_generated; + pub use self::record_bvhstatus_generated::*; + mod skeleton_part_generated; + pub use self::skeleton_part_generated::*; + mod skeleton_config_request_generated; + pub use self::skeleton_config_request_generated::*; + mod skeleton_config_response_generated; + pub use self::skeleton_config_response_generated::*; + mod skeleton_reset_all_request_generated; + pub use self::skeleton_reset_all_request_generated::*; + mod change_skeleton_config_request_generated; + pub use self::change_skeleton_config_request_generated::*; + mod open_serial_request_generated; + pub use self::open_serial_request_generated::*; + mod close_serial_request_generated; + pub use self::close_serial_request_generated::*; + mod set_wifi_request_generated; + pub use self::set_wifi_request_generated::*; + mod serial_update_response_generated; + pub use self::serial_update_response_generated::*; + mod serial_tracker_reboot_request_generated; + pub use self::serial_tracker_reboot_request_generated::*; + mod serial_tracker_get_info_request_generated; + pub use self::serial_tracker_get_info_request_generated::*; + mod serial_tracker_factory_reset_request_generated; + pub use self::serial_tracker_factory_reset_request_generated::*; + mod auto_bone_process_request_generated; + pub use self::auto_bone_process_request_generated::*; + mod auto_bone_process_status_response_generated; + pub use self::auto_bone_process_status_response_generated::*; + mod auto_bone_epoch_response_generated; + pub use self::auto_bone_epoch_response_generated::*; + mod overlay_display_mode_request_generated; + pub use self::overlay_display_mode_request_generated::*; + mod overlay_display_mode_change_request_generated; + pub use self::overlay_display_mode_change_request_generated::*; + mod overlay_display_mode_response_generated; + pub use self::overlay_display_mode_response_generated::*; + } // rpc + mod message_bundle_generated; + pub use self::message_bundle_generated::*; +} // solarxr_protocol diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs index 712b35c5..07f86eec 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs @@ -1,154 +1,150 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 BoneOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct Bone<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for Bone<'a> { - type Inner = Bone<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> Bone<'a> { - pub const VT_BODY_PART: flatbuffers::VOffsetT = 4; - pub const VT_ROTATION_G: flatbuffers::VOffsetT = 6; - pub const VT_BONE_LENGTH: flatbuffers::VOffsetT = 8; - pub const VT_HEAD_POSITION_G: flatbuffers::VOffsetT = 10; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - Bone { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args BoneArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = BoneBuilder::new(_fbb); - if let Some(x) = args.head_position_g { builder.add_head_position_g(x); } - builder.add_bone_length(args.bone_length); - if let Some(x) = args.rotation_g { builder.add_rotation_g(x); } - builder.add_body_part(args.body_part); - builder.finish() - } - - - #[inline] - pub fn body_part(&self) -> super::datatypes::BodyPart { - self._tab.get::(Bone::VT_BODY_PART, Some(super::datatypes::BodyPart::NONE)).unwrap() - } - /// The global rotation of the bone. - /// - /// Note that the identity rotation is where a bone's tail is towards -y (assuming - /// the head of the bone is the origin) - #[inline] - pub fn rotation_g(&self) -> Option<&'a super::datatypes::math::Quat> { - self._tab.get::(Bone::VT_ROTATION_G, None) - } - #[inline] - pub fn bone_length(&self) -> f32 { - self._tab.get::(Bone::VT_BONE_LENGTH, Some(0.0)).unwrap() - } - /// The global position of the head of this bone. - /// - /// The head of a bone is joint/node of the bone touching the parent bone. The - /// parent is defined as the bone closer to the HMD. - #[inline] - pub fn head_position_g(&self) -> Option<&'a super::datatypes::math::Vec3f> { - self._tab.get::(Bone::VT_HEAD_POSITION_G, None) - } -} - -impl flatbuffers::Verifiable for Bone<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("body_part", Self::VT_BODY_PART, false)? - .visit_field::("rotation_g", Self::VT_ROTATION_G, false)? - .visit_field::("bone_length", Self::VT_BONE_LENGTH, false)? - .visit_field::("head_position_g", Self::VT_HEAD_POSITION_G, false)? - .finish(); - Ok(()) - } -} -pub struct BoneArgs<'a> { - pub body_part: super::datatypes::BodyPart, - pub rotation_g: Option<&'a super::datatypes::math::Quat>, - pub bone_length: f32, - pub head_position_g: Option<&'a super::datatypes::math::Vec3f>, -} -impl<'a> Default for BoneArgs<'a> { - #[inline] - fn default() -> Self { - BoneArgs { - body_part: super::datatypes::BodyPart::NONE, - rotation_g: None, - bone_length: 0.0, - head_position_g: None, - } - } -} - -pub struct BoneBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> BoneBuilder<'a, 'b> { - #[inline] - pub fn add_body_part(&mut self, body_part: super::datatypes::BodyPart) { - self.fbb_.push_slot::(Bone::VT_BODY_PART, body_part, super::datatypes::BodyPart::NONE); - } - #[inline] - pub fn add_rotation_g(&mut self, rotation_g: &super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::datatypes::math::Quat>(Bone::VT_ROTATION_G, rotation_g); - } - #[inline] - pub fn add_bone_length(&mut self, bone_length: f32) { - self.fbb_.push_slot::(Bone::VT_BONE_LENGTH, bone_length, 0.0); - } - #[inline] - pub fn add_head_position_g(&mut self, head_position_g: &super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::datatypes::math::Vec3f>(Bone::VT_HEAD_POSITION_G, head_position_g); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BoneBuilder<'a, 'b> { - let start = _fbb.start_table(); - BoneBuilder { - 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 Bone<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("Bone"); - ds.field("body_part", &self.body_part()); - ds.field("rotation_g", &self.rotation_g()); - ds.field("bone_length", &self.bone_length()); - ds.field("head_position_g", &self.head_position_g()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum BoneOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct Bone<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for Bone<'a> { + type Inner = Bone<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> Bone<'a> { + pub const VT_BODY_PART: flatbuffers::VOffsetT = 4; + pub const VT_ROTATION_G: flatbuffers::VOffsetT = 6; + pub const VT_BONE_LENGTH: flatbuffers::VOffsetT = 8; + pub const VT_HEAD_POSITION_G: flatbuffers::VOffsetT = 10; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + Bone { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args BoneArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = BoneBuilder::new(_fbb); + if let Some(x) = args.head_position_g { builder.add_head_position_g(x); } + builder.add_bone_length(args.bone_length); + if let Some(x) = args.rotation_g { builder.add_rotation_g(x); } + builder.add_body_part(args.body_part); + builder.finish() + } + + + #[inline] + pub fn body_part(&self) -> super::datatypes::BodyPart { + self._tab.get::(Bone::VT_BODY_PART, Some(super::datatypes::BodyPart::NONE)).unwrap() + } + /// The global rotation of the bone. + /// + /// Note that the identity rotation is where a bone's tail is towards -y (assuming + /// the head of the bone is the origin) + #[inline] + pub fn rotation_g(&self) -> Option<&'a super::datatypes::math::Quat> { + self._tab.get::(Bone::VT_ROTATION_G, None) + } + #[inline] + pub fn bone_length(&self) -> f32 { + self._tab.get::(Bone::VT_BONE_LENGTH, Some(0.0)).unwrap() + } + /// The global position of the head of this bone. + /// + /// The head of a bone is joint/node of the bone touching the parent bone. The + /// parent is defined as the bone closer to the HMD. + #[inline] + pub fn head_position_g(&self) -> Option<&'a super::datatypes::math::Vec3f> { + self._tab.get::(Bone::VT_HEAD_POSITION_G, None) + } +} + +impl flatbuffers::Verifiable for Bone<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("body_part", Self::VT_BODY_PART, false)? + .visit_field::("rotation_g", Self::VT_ROTATION_G, false)? + .visit_field::("bone_length", Self::VT_BONE_LENGTH, false)? + .visit_field::("head_position_g", Self::VT_HEAD_POSITION_G, false)? + .finish(); + Ok(()) + } +} +pub struct BoneArgs<'a> { + pub body_part: super::datatypes::BodyPart, + pub rotation_g: Option<&'a super::datatypes::math::Quat>, + pub bone_length: f32, + pub head_position_g: Option<&'a super::datatypes::math::Vec3f>, +} +impl<'a> Default for BoneArgs<'a> { + #[inline] + fn default() -> Self { + BoneArgs { + body_part: super::datatypes::BodyPart::NONE, + rotation_g: None, + bone_length: 0.0, + head_position_g: None, + } + } +} + +pub struct BoneBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> BoneBuilder<'a, 'b> { + #[inline] + pub fn add_body_part(&mut self, body_part: super::datatypes::BodyPart) { + self.fbb_.push_slot::(Bone::VT_BODY_PART, body_part, super::datatypes::BodyPart::NONE); + } + #[inline] + pub fn add_rotation_g(&mut self, rotation_g: &super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::datatypes::math::Quat>(Bone::VT_ROTATION_G, rotation_g); + } + #[inline] + pub fn add_bone_length(&mut self, bone_length: f32) { + self.fbb_.push_slot::(Bone::VT_BONE_LENGTH, bone_length, 0.0); + } + #[inline] + pub fn add_head_position_g(&mut self, head_position_g: &super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::datatypes::math::Vec3f>(Bone::VT_HEAD_POSITION_G, head_position_g); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BoneBuilder<'a, 'b> { + let start = _fbb.start_table(); + BoneBuilder { + 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 std::fmt::Debug for Bone<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("Bone"); + ds.field("body_part", &self.body_part()); + ds.field("rotation_g", &self.rotation_g()); + ds.field("bone_length", &self.bone_length()); + ds.field("head_position_g", &self.head_position_g()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs index eb68a0a4..c69fda19 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs @@ -1,150 +1,146 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 DataFeedConfigOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// All information related to the configuration of a data feed. This may be sent -/// as part of a `StartFeed`. -pub struct DataFeedConfig<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for DataFeedConfig<'a> { - type Inner = DataFeedConfig<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> DataFeedConfig<'a> { - pub const VT_MINIMUM_TIME_SINCE_LAST: flatbuffers::VOffsetT = 4; - pub const VT_DATA_MASK: flatbuffers::VOffsetT = 6; - pub const VT_SYNTHETIC_TRACKERS_MASK: flatbuffers::VOffsetT = 8; - pub const VT_BONE_MASK: flatbuffers::VOffsetT = 10; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - DataFeedConfig { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args DataFeedConfigArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = DataFeedConfigBuilder::new(_fbb); - if let Some(x) = args.synthetic_trackers_mask { builder.add_synthetic_trackers_mask(x); } - if let Some(x) = args.data_mask { builder.add_data_mask(x); } - builder.add_minimum_time_since_last(args.minimum_time_since_last); - builder.add_bone_mask(args.bone_mask); - builder.finish() - } - - - /// Minimum delay in milliseconds between new data updates. This value will be - /// ignored when used for a `PollDataFeed`. - #[inline] - pub fn minimum_time_since_last(&self) -> u16 { - self._tab.get::(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, Some(0)).unwrap() - } - #[inline] - pub fn data_mask(&self) -> Option> { - self._tab.get::>(DataFeedConfig::VT_DATA_MASK, None) - } - #[inline] - pub fn synthetic_trackers_mask(&self) -> Option> { - self._tab.get::>(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, None) - } - #[inline] - pub fn bone_mask(&self) -> bool { - self._tab.get::(DataFeedConfig::VT_BONE_MASK, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for DataFeedConfig<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("minimum_time_since_last", Self::VT_MINIMUM_TIME_SINCE_LAST, false)? - .visit_field::>("data_mask", Self::VT_DATA_MASK, false)? - .visit_field::>("synthetic_trackers_mask", Self::VT_SYNTHETIC_TRACKERS_MASK, false)? - .visit_field::("bone_mask", Self::VT_BONE_MASK, false)? - .finish(); - Ok(()) - } -} -pub struct DataFeedConfigArgs<'a> { - pub minimum_time_since_last: u16, - pub data_mask: Option>>, - pub synthetic_trackers_mask: Option>>, - pub bone_mask: bool, -} -impl<'a> Default for DataFeedConfigArgs<'a> { - #[inline] - fn default() -> Self { - DataFeedConfigArgs { - minimum_time_since_last: 0, - data_mask: None, - synthetic_trackers_mask: None, - bone_mask: false, - } - } -} - -pub struct DataFeedConfigBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> DataFeedConfigBuilder<'a, 'b> { - #[inline] - pub fn add_minimum_time_since_last(&mut self, minimum_time_since_last: u16) { - self.fbb_.push_slot::(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, minimum_time_since_last, 0); - } - #[inline] - pub fn add_data_mask(&mut self, data_mask: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(DataFeedConfig::VT_DATA_MASK, data_mask); - } - #[inline] - pub fn add_synthetic_trackers_mask(&mut self, synthetic_trackers_mask: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, synthetic_trackers_mask); - } - #[inline] - pub fn add_bone_mask(&mut self, bone_mask: bool) { - self.fbb_.push_slot::(DataFeedConfig::VT_BONE_MASK, bone_mask, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedConfigBuilder<'a, 'b> { - let start = _fbb.start_table(); - DataFeedConfigBuilder { - 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 DataFeedConfig<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("DataFeedConfig"); - ds.field("minimum_time_since_last", &self.minimum_time_since_last()); - ds.field("data_mask", &self.data_mask()); - ds.field("synthetic_trackers_mask", &self.synthetic_trackers_mask()); - ds.field("bone_mask", &self.bone_mask()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DataFeedConfigOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// All information related to the configuration of a data feed. This may be sent +/// as part of a `StartFeed`. +pub struct DataFeedConfig<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DataFeedConfig<'a> { + type Inner = DataFeedConfig<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> DataFeedConfig<'a> { + pub const VT_MINIMUM_TIME_SINCE_LAST: flatbuffers::VOffsetT = 4; + pub const VT_DATA_MASK: flatbuffers::VOffsetT = 6; + pub const VT_SYNTHETIC_TRACKERS_MASK: flatbuffers::VOffsetT = 8; + pub const VT_BONE_MASK: flatbuffers::VOffsetT = 10; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DataFeedConfig { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DataFeedConfigArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = DataFeedConfigBuilder::new(_fbb); + if let Some(x) = args.synthetic_trackers_mask { builder.add_synthetic_trackers_mask(x); } + if let Some(x) = args.data_mask { builder.add_data_mask(x); } + builder.add_minimum_time_since_last(args.minimum_time_since_last); + builder.add_bone_mask(args.bone_mask); + builder.finish() + } + + + /// Minimum delay in milliseconds between new data updates. This value will be + /// ignored when used for a `PollDataFeed`. + #[inline] + pub fn minimum_time_since_last(&self) -> u16 { + self._tab.get::(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, Some(0)).unwrap() + } + #[inline] + pub fn data_mask(&self) -> Option> { + self._tab.get::>(DataFeedConfig::VT_DATA_MASK, None) + } + #[inline] + pub fn synthetic_trackers_mask(&self) -> Option> { + self._tab.get::>(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, None) + } + #[inline] + pub fn bone_mask(&self) -> bool { + self._tab.get::(DataFeedConfig::VT_BONE_MASK, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for DataFeedConfig<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("minimum_time_since_last", Self::VT_MINIMUM_TIME_SINCE_LAST, false)? + .visit_field::>("data_mask", Self::VT_DATA_MASK, false)? + .visit_field::>("synthetic_trackers_mask", Self::VT_SYNTHETIC_TRACKERS_MASK, false)? + .visit_field::("bone_mask", Self::VT_BONE_MASK, false)? + .finish(); + Ok(()) + } +} +pub struct DataFeedConfigArgs<'a> { + pub minimum_time_since_last: u16, + pub data_mask: Option>>, + pub synthetic_trackers_mask: Option>>, + pub bone_mask: bool, +} +impl<'a> Default for DataFeedConfigArgs<'a> { + #[inline] + fn default() -> Self { + DataFeedConfigArgs { + minimum_time_since_last: 0, + data_mask: None, + synthetic_trackers_mask: None, + bone_mask: false, + } + } +} + +pub struct DataFeedConfigBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DataFeedConfigBuilder<'a, 'b> { + #[inline] + pub fn add_minimum_time_since_last(&mut self, minimum_time_since_last: u16) { + self.fbb_.push_slot::(DataFeedConfig::VT_MINIMUM_TIME_SINCE_LAST, minimum_time_since_last, 0); + } + #[inline] + pub fn add_data_mask(&mut self, data_mask: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(DataFeedConfig::VT_DATA_MASK, data_mask); + } + #[inline] + pub fn add_synthetic_trackers_mask(&mut self, synthetic_trackers_mask: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(DataFeedConfig::VT_SYNTHETIC_TRACKERS_MASK, synthetic_trackers_mask); + } + #[inline] + pub fn add_bone_mask(&mut self, bone_mask: bool) { + self.fbb_.push_slot::(DataFeedConfig::VT_BONE_MASK, bone_mask, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedConfigBuilder<'a, 'b> { + let start = _fbb.start_table(); + DataFeedConfigBuilder { + 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 std::fmt::Debug for DataFeedConfig<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("DataFeedConfig"); + ds.field("minimum_time_since_last", &self.minimum_time_since_last()); + ds.field("data_mask", &self.data_mask()); + ds.field("synthetic_trackers_mask", &self.synthetic_trackers_mask()); + ds.field("bone_mask", &self.bone_mask()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs index 28893363..8f9a0fc8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs @@ -1,111 +1,107 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_DATA_FEED_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_DATA_FEED_MESSAGE: 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_DATA_FEED_MESSAGE: [DataFeedMessage; 5] = [ - DataFeedMessage::NONE, - DataFeedMessage::PollDataFeed, - DataFeedMessage::StartDataFeed, - DataFeedMessage::DataFeedUpdate, - DataFeedMessage::DataFeedConfig, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct DataFeedMessage(pub u8); -#[allow(non_upper_case_globals)] -impl DataFeedMessage { - pub const NONE: Self = Self(0); - pub const PollDataFeed: Self = Self(1); - pub const StartDataFeed: Self = Self(2); - pub const DataFeedUpdate: Self = Self(3); - pub const DataFeedConfig: Self = Self(4); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 4; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::PollDataFeed, - Self::StartDataFeed, - Self::DataFeedUpdate, - Self::DataFeedConfig, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::PollDataFeed => Some("PollDataFeed"), - Self::StartDataFeed => Some("StartDataFeed"), - Self::DataFeedUpdate => Some("DataFeedUpdate"), - Self::DataFeedConfig => Some("DataFeedConfig"), - _ => None, - } - } -} -impl core::fmt::Debug for DataFeedMessage { - 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 DataFeedMessage { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for DataFeedMessage { - type Output = DataFeedMessage; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for DataFeedMessage { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for DataFeedMessage { - #[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 DataFeedMessage {} -pub struct DataFeedMessageUnionTableOffset {} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_DATA_FEED_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_DATA_FEED_MESSAGE: 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_DATA_FEED_MESSAGE: [DataFeedMessage; 5] = [ + DataFeedMessage::NONE, + DataFeedMessage::PollDataFeed, + DataFeedMessage::StartDataFeed, + DataFeedMessage::DataFeedUpdate, + DataFeedMessage::DataFeedConfig, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct DataFeedMessage(pub u8); +#[allow(non_upper_case_globals)] +impl DataFeedMessage { + pub const NONE: Self = Self(0); + pub const PollDataFeed: Self = Self(1); + pub const StartDataFeed: Self = Self(2); + pub const DataFeedUpdate: Self = Self(3); + pub const DataFeedConfig: Self = Self(4); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 4; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::PollDataFeed, + Self::StartDataFeed, + Self::DataFeedUpdate, + Self::DataFeedConfig, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::PollDataFeed => Some("PollDataFeed"), + Self::StartDataFeed => Some("StartDataFeed"), + Self::DataFeedUpdate => Some("DataFeedUpdate"), + Self::DataFeedConfig => Some("DataFeedConfig"), + _ => None, + } + } +} +impl std::fmt::Debug for DataFeedMessage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 DataFeedMessage { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for DataFeedMessage { + type Output = DataFeedMessage; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for DataFeedMessage { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for DataFeedMessage { + #[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 DataFeedMessage {} +pub struct DataFeedMessageUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs index 8333fd24..78889b6a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs @@ -1,198 +1,194 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 DataFeedMessageHeaderOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct DataFeedMessageHeader<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for DataFeedMessageHeader<'a> { - type Inner = DataFeedMessageHeader<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> DataFeedMessageHeader<'a> { - pub const VT_MESSAGE_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - DataFeedMessageHeader { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args DataFeedMessageHeaderArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = DataFeedMessageHeaderBuilder::new(_fbb); - if let Some(x) = args.message { builder.add_message(x); } - builder.add_message_type(args.message_type); - builder.finish() - } - - - #[inline] - pub fn message_type(&self) -> DataFeedMessage { - self._tab.get::(DataFeedMessageHeader::VT_MESSAGE_TYPE, Some(DataFeedMessage::NONE)).unwrap() - } - #[inline] - pub fn message(&self) -> Option> { - self._tab.get::>>(DataFeedMessageHeader::VT_MESSAGE, None) - } - #[inline] - #[allow(non_snake_case)] - pub fn message_as_poll_data_feed(&self) -> Option> { - if self.message_type() == DataFeedMessage::PollDataFeed { - self.message().map(PollDataFeed::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_start_data_feed(&self) -> Option> { - if self.message_type() == DataFeedMessage::StartDataFeed { - self.message().map(StartDataFeed::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_data_feed_update(&self) -> Option> { - if self.message_type() == DataFeedMessage::DataFeedUpdate { - self.message().map(DataFeedUpdate::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_data_feed_config(&self) -> Option> { - if self.message_type() == DataFeedMessage::DataFeedConfig { - self.message().map(DataFeedConfig::init_from_table) - } else { - None - } - } - -} - -impl flatbuffers::Verifiable for DataFeedMessageHeader<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_union::("message_type", Self::VT_MESSAGE_TYPE, "message", Self::VT_MESSAGE, false, |key, v, pos| { - match key { - DataFeedMessage::PollDataFeed => v.verify_union_variant::>("DataFeedMessage::PollDataFeed", pos), - DataFeedMessage::StartDataFeed => v.verify_union_variant::>("DataFeedMessage::StartDataFeed", pos), - DataFeedMessage::DataFeedUpdate => v.verify_union_variant::>("DataFeedMessage::DataFeedUpdate", pos), - DataFeedMessage::DataFeedConfig => v.verify_union_variant::>("DataFeedMessage::DataFeedConfig", pos), - _ => Ok(()), - } - })? - .finish(); - Ok(()) - } -} -pub struct DataFeedMessageHeaderArgs { - pub message_type: DataFeedMessage, - pub message: Option>, -} -impl<'a> Default for DataFeedMessageHeaderArgs { - #[inline] - fn default() -> Self { - DataFeedMessageHeaderArgs { - message_type: DataFeedMessage::NONE, - message: None, - } - } -} - -pub struct DataFeedMessageHeaderBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> DataFeedMessageHeaderBuilder<'a, 'b> { - #[inline] - pub fn add_message_type(&mut self, message_type: DataFeedMessage) { - self.fbb_.push_slot::(DataFeedMessageHeader::VT_MESSAGE_TYPE, message_type, DataFeedMessage::NONE); - } - #[inline] - pub fn add_message(&mut self, message: flatbuffers::WIPOffset) { - self.fbb_.push_slot_always::>(DataFeedMessageHeader::VT_MESSAGE, message); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedMessageHeaderBuilder<'a, 'b> { - let start = _fbb.start_table(); - DataFeedMessageHeaderBuilder { - 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 DataFeedMessageHeader<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("DataFeedMessageHeader"); - ds.field("message_type", &self.message_type()); - match self.message_type() { - DataFeedMessage::PollDataFeed => { - if let Some(x) = self.message_as_poll_data_feed() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - DataFeedMessage::StartDataFeed => { - if let Some(x) = self.message_as_start_data_feed() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - DataFeedMessage::DataFeedUpdate => { - if let Some(x) = self.message_as_data_feed_update() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - DataFeedMessage::DataFeedConfig => { - if let Some(x) = self.message_as_data_feed_config() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - _ => { - let x: Option<()> = None; - ds.field("message", &x) - }, - }; - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DataFeedMessageHeaderOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct DataFeedMessageHeader<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DataFeedMessageHeader<'a> { + type Inner = DataFeedMessageHeader<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> DataFeedMessageHeader<'a> { + pub const VT_MESSAGE_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DataFeedMessageHeader { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DataFeedMessageHeaderArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = DataFeedMessageHeaderBuilder::new(_fbb); + if let Some(x) = args.message { builder.add_message(x); } + builder.add_message_type(args.message_type); + builder.finish() + } + + + #[inline] + pub fn message_type(&self) -> DataFeedMessage { + self._tab.get::(DataFeedMessageHeader::VT_MESSAGE_TYPE, Some(DataFeedMessage::NONE)).unwrap() + } + #[inline] + pub fn message(&self) -> Option> { + self._tab.get::>>(DataFeedMessageHeader::VT_MESSAGE, None) + } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_poll_data_feed(&self) -> Option> { + if self.message_type() == DataFeedMessage::PollDataFeed { + self.message().map(PollDataFeed::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_start_data_feed(&self) -> Option> { + if self.message_type() == DataFeedMessage::StartDataFeed { + self.message().map(StartDataFeed::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_data_feed_update(&self) -> Option> { + if self.message_type() == DataFeedMessage::DataFeedUpdate { + self.message().map(DataFeedUpdate::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_data_feed_config(&self) -> Option> { + if self.message_type() == DataFeedMessage::DataFeedConfig { + self.message().map(DataFeedConfig::init_from_table) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for DataFeedMessageHeader<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_union::("message_type", Self::VT_MESSAGE_TYPE, "message", Self::VT_MESSAGE, false, |key, v, pos| { + match key { + DataFeedMessage::PollDataFeed => v.verify_union_variant::>("DataFeedMessage::PollDataFeed", pos), + DataFeedMessage::StartDataFeed => v.verify_union_variant::>("DataFeedMessage::StartDataFeed", pos), + DataFeedMessage::DataFeedUpdate => v.verify_union_variant::>("DataFeedMessage::DataFeedUpdate", pos), + DataFeedMessage::DataFeedConfig => v.verify_union_variant::>("DataFeedMessage::DataFeedConfig", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct DataFeedMessageHeaderArgs { + pub message_type: DataFeedMessage, + pub message: Option>, +} +impl<'a> Default for DataFeedMessageHeaderArgs { + #[inline] + fn default() -> Self { + DataFeedMessageHeaderArgs { + message_type: DataFeedMessage::NONE, + message: None, + } + } +} + +pub struct DataFeedMessageHeaderBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DataFeedMessageHeaderBuilder<'a, 'b> { + #[inline] + pub fn add_message_type(&mut self, message_type: DataFeedMessage) { + self.fbb_.push_slot::(DataFeedMessageHeader::VT_MESSAGE_TYPE, message_type, DataFeedMessage::NONE); + } + #[inline] + pub fn add_message(&mut self, message: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(DataFeedMessageHeader::VT_MESSAGE, message); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedMessageHeaderBuilder<'a, 'b> { + let start = _fbb.start_table(); + DataFeedMessageHeaderBuilder { + 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 std::fmt::Debug for DataFeedMessageHeader<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("DataFeedMessageHeader"); + ds.field("message_type", &self.message_type()); + match self.message_type() { + DataFeedMessage::PollDataFeed => { + if let Some(x) = self.message_as_poll_data_feed() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + DataFeedMessage::StartDataFeed => { + if let Some(x) = self.message_as_start_data_feed() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + DataFeedMessage::DataFeedUpdate => { + if let Some(x) = self.message_as_data_feed_update() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + DataFeedMessage::DataFeedConfig => { + if let Some(x) = self.message_as_data_feed_config() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("message", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs index c79ff929..516ed76c 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs @@ -1,140 +1,136 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 DataFeedUpdateOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// All of the data components related to a single data feed. A data feed is comprised -/// of device data, and tracker data. -/// -/// A data feed might send data only when it changes/updates, and we should make no -/// assumptions that the data is actually delivered. If you want to guarantee -/// delivery and avoid dropped observations of data (such as a user-initiated -/// button press), it is better to use the RPC system. -pub struct DataFeedUpdate<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for DataFeedUpdate<'a> { - type Inner = DataFeedUpdate<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> DataFeedUpdate<'a> { - pub const VT_DEVICES: flatbuffers::VOffsetT = 4; - pub const VT_SYNTHETIC_TRACKERS: flatbuffers::VOffsetT = 6; - pub const VT_BONES: flatbuffers::VOffsetT = 8; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - DataFeedUpdate { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args DataFeedUpdateArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = DataFeedUpdateBuilder::new(_fbb); - if let Some(x) = args.bones { builder.add_bones(x); } - if let Some(x) = args.synthetic_trackers { builder.add_synthetic_trackers(x); } - if let Some(x) = args.devices { builder.add_devices(x); } - builder.finish() - } - - - #[inline] - pub fn devices(&self) -> Option>>> { - self._tab.get::>>>(DataFeedUpdate::VT_DEVICES, None) - } - #[inline] - pub fn synthetic_trackers(&self) -> Option>>> { - self._tab.get::>>>(DataFeedUpdate::VT_SYNTHETIC_TRACKERS, None) - } - /// This must represent a set, where there is no more than one bone for a `BodyPart`. - #[inline] - pub fn bones(&self) -> Option>>> { - self._tab.get::>>>(DataFeedUpdate::VT_BONES, None) - } -} - -impl flatbuffers::Verifiable for DataFeedUpdate<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("devices", Self::VT_DEVICES, false)? - .visit_field::>>>("synthetic_trackers", Self::VT_SYNTHETIC_TRACKERS, false)? - .visit_field::>>>("bones", Self::VT_BONES, false)? - .finish(); - Ok(()) - } -} -pub struct DataFeedUpdateArgs<'a> { - pub devices: Option>>>>, - pub synthetic_trackers: Option>>>>, - pub bones: Option>>>>, -} -impl<'a> Default for DataFeedUpdateArgs<'a> { - #[inline] - fn default() -> Self { - DataFeedUpdateArgs { - devices: None, - synthetic_trackers: None, - bones: None, - } - } -} - -pub struct DataFeedUpdateBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> DataFeedUpdateBuilder<'a, 'b> { - #[inline] - pub fn add_devices(&mut self, devices: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(DataFeedUpdate::VT_DEVICES, devices); - } - #[inline] - pub fn add_synthetic_trackers(&mut self, synthetic_trackers: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(DataFeedUpdate::VT_SYNTHETIC_TRACKERS, synthetic_trackers); - } - #[inline] - pub fn add_bones(&mut self, bones: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(DataFeedUpdate::VT_BONES, bones); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedUpdateBuilder<'a, 'b> { - let start = _fbb.start_table(); - DataFeedUpdateBuilder { - 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 DataFeedUpdate<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("DataFeedUpdate"); - ds.field("devices", &self.devices()); - ds.field("synthetic_trackers", &self.synthetic_trackers()); - ds.field("bones", &self.bones()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DataFeedUpdateOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// All of the data components related to a single data feed. A data feed is comprised +/// of device data, and tracker data. +/// +/// A data feed might send data only when it changes/updates, and we should make no +/// assumptions that the data is actually delivered. If you want to guarantee +/// delivery and avoid dropped observations of data (such as a user-initiated +/// button press), it is better to use the RPC system. +pub struct DataFeedUpdate<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DataFeedUpdate<'a> { + type Inner = DataFeedUpdate<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> DataFeedUpdate<'a> { + pub const VT_DEVICES: flatbuffers::VOffsetT = 4; + pub const VT_SYNTHETIC_TRACKERS: flatbuffers::VOffsetT = 6; + pub const VT_BONES: flatbuffers::VOffsetT = 8; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DataFeedUpdate { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DataFeedUpdateArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = DataFeedUpdateBuilder::new(_fbb); + if let Some(x) = args.bones { builder.add_bones(x); } + if let Some(x) = args.synthetic_trackers { builder.add_synthetic_trackers(x); } + if let Some(x) = args.devices { builder.add_devices(x); } + builder.finish() + } + + + #[inline] + pub fn devices(&self) -> Option>>> { + self._tab.get::>>>(DataFeedUpdate::VT_DEVICES, None) + } + #[inline] + pub fn synthetic_trackers(&self) -> Option>>> { + self._tab.get::>>>(DataFeedUpdate::VT_SYNTHETIC_TRACKERS, None) + } + /// This must represent a set, where there is no more than one bone for a `BodyPart`. + #[inline] + pub fn bones(&self) -> Option>>> { + self._tab.get::>>>(DataFeedUpdate::VT_BONES, None) + } +} + +impl flatbuffers::Verifiable for DataFeedUpdate<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("devices", Self::VT_DEVICES, false)? + .visit_field::>>>("synthetic_trackers", Self::VT_SYNTHETIC_TRACKERS, false)? + .visit_field::>>>("bones", Self::VT_BONES, false)? + .finish(); + Ok(()) + } +} +pub struct DataFeedUpdateArgs<'a> { + pub devices: Option>>>>, + pub synthetic_trackers: Option>>>>, + pub bones: Option>>>>, +} +impl<'a> Default for DataFeedUpdateArgs<'a> { + #[inline] + fn default() -> Self { + DataFeedUpdateArgs { + devices: None, + synthetic_trackers: None, + bones: None, + } + } +} + +pub struct DataFeedUpdateBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DataFeedUpdateBuilder<'a, 'b> { + #[inline] + pub fn add_devices(&mut self, devices: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(DataFeedUpdate::VT_DEVICES, devices); + } + #[inline] + pub fn add_synthetic_trackers(&mut self, synthetic_trackers: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(DataFeedUpdate::VT_SYNTHETIC_TRACKERS, synthetic_trackers); + } + #[inline] + pub fn add_bones(&mut self, bones: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(DataFeedUpdate::VT_BONES, bones); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DataFeedUpdateBuilder<'a, 'b> { + let start = _fbb.start_table(); + DataFeedUpdateBuilder { + 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 std::fmt::Debug for DataFeedUpdate<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("DataFeedUpdate"); + ds.field("devices", &self.devices()); + ds.field("synthetic_trackers", &self.synthetic_trackers()); + ds.field("bones", &self.bones()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs index 87f645c7..9f93c7b1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs @@ -1,168 +1,164 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 DeviceDataOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Describes all possible information about a hardware device. For example, a -/// vive tracker is a single hardware device, and a slime tracker with two -/// extensions is a single hardware device but two trackers. -pub struct DeviceData<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for DeviceData<'a> { - type Inner = DeviceData<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> DeviceData<'a> { - pub const VT_ID: flatbuffers::VOffsetT = 4; - pub const VT_CUSTOM_NAME: flatbuffers::VOffsetT = 6; - pub const VT_HARDWARE_INFO: flatbuffers::VOffsetT = 8; - pub const VT_HARDWARE_STATUS: flatbuffers::VOffsetT = 10; - pub const VT_TRACKERS: flatbuffers::VOffsetT = 12; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - DeviceData { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args DeviceDataArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = DeviceDataBuilder::new(_fbb); - if let Some(x) = args.trackers { builder.add_trackers(x); } - if let Some(x) = args.hardware_status { builder.add_hardware_status(x); } - if let Some(x) = args.hardware_info { builder.add_hardware_info(x); } - if let Some(x) = args.custom_name { builder.add_custom_name(x); } - if let Some(x) = args.id { builder.add_id(x); } - builder.finish() - } - - - #[inline] - pub fn id(&self) -> Option<&'a super::super::datatypes::DeviceId> { - self._tab.get::(DeviceData::VT_ID, None) - } - /// The dynamically changeable name of the device. This might be set by the - /// user to help them remember which tracker is which. - #[inline] - pub fn custom_name(&self) -> Option<&'a str> { - self._tab.get::>(DeviceData::VT_CUSTOM_NAME, None) - } - /// Mostly-static info about the device hardware - #[inline] - pub fn hardware_info(&self) -> Option> { - self._tab.get::>(DeviceData::VT_HARDWARE_INFO, None) - } - /// General info about the status of the device - #[inline] - pub fn hardware_status(&self) -> Option> { - self._tab.get::>(DeviceData::VT_HARDWARE_STATUS, None) - } - /// Info about all trackers attached to this device - #[inline] - pub fn trackers(&self) -> Option>>> { - self._tab.get::>>>(DeviceData::VT_TRACKERS, None) - } -} - -impl flatbuffers::Verifiable for DeviceData<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("id", Self::VT_ID, false)? - .visit_field::>("custom_name", Self::VT_CUSTOM_NAME, false)? - .visit_field::>("hardware_info", Self::VT_HARDWARE_INFO, false)? - .visit_field::>("hardware_status", Self::VT_HARDWARE_STATUS, false)? - .visit_field::>>>("trackers", Self::VT_TRACKERS, false)? - .finish(); - Ok(()) - } -} -pub struct DeviceDataArgs<'a> { - pub id: Option<&'a super::super::datatypes::DeviceId>, - pub custom_name: Option>, - pub hardware_info: Option>>, - pub hardware_status: Option>>, - pub trackers: Option>>>>, -} -impl<'a> Default for DeviceDataArgs<'a> { - #[inline] - fn default() -> Self { - DeviceDataArgs { - id: None, - custom_name: None, - hardware_info: None, - hardware_status: None, - trackers: None, - } - } -} - -pub struct DeviceDataBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> DeviceDataBuilder<'a, 'b> { - #[inline] - pub fn add_id(&mut self, id: &super::super::datatypes::DeviceId) { - self.fbb_.push_slot_always::<&super::super::datatypes::DeviceId>(DeviceData::VT_ID, id); - } - #[inline] - pub fn add_custom_name(&mut self, custom_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(DeviceData::VT_CUSTOM_NAME, custom_name); - } - #[inline] - pub fn add_hardware_info(&mut self, hardware_info: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(DeviceData::VT_HARDWARE_INFO, hardware_info); - } - #[inline] - pub fn add_hardware_status(&mut self, hardware_status: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(DeviceData::VT_HARDWARE_STATUS, hardware_status); - } - #[inline] - pub fn add_trackers(&mut self, trackers: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(DeviceData::VT_TRACKERS, trackers); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DeviceDataBuilder<'a, 'b> { - let start = _fbb.start_table(); - DeviceDataBuilder { - 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 DeviceData<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("DeviceData"); - ds.field("id", &self.id()); - ds.field("custom_name", &self.custom_name()); - ds.field("hardware_info", &self.hardware_info()); - ds.field("hardware_status", &self.hardware_status()); - ds.field("trackers", &self.trackers()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DeviceDataOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Describes all possible information about a hardware device. For example, a +/// vive tracker is a single hardware device, and a slime tracker with two +/// extensions is a single hardware device but two trackers. +pub struct DeviceData<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DeviceData<'a> { + type Inner = DeviceData<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> DeviceData<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_CUSTOM_NAME: flatbuffers::VOffsetT = 6; + pub const VT_HARDWARE_INFO: flatbuffers::VOffsetT = 8; + pub const VT_HARDWARE_STATUS: flatbuffers::VOffsetT = 10; + pub const VT_TRACKERS: flatbuffers::VOffsetT = 12; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DeviceData { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DeviceDataArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = DeviceDataBuilder::new(_fbb); + if let Some(x) = args.trackers { builder.add_trackers(x); } + if let Some(x) = args.hardware_status { builder.add_hardware_status(x); } + if let Some(x) = args.hardware_info { builder.add_hardware_info(x); } + if let Some(x) = args.custom_name { builder.add_custom_name(x); } + if let Some(x) = args.id { builder.add_id(x); } + builder.finish() + } + + + #[inline] + pub fn id(&self) -> Option<&'a super::super::datatypes::DeviceId> { + self._tab.get::(DeviceData::VT_ID, None) + } + /// The dynamically changeable name of the device. This might be set by the + /// user to help them remember which tracker is which. + #[inline] + pub fn custom_name(&self) -> Option<&'a str> { + self._tab.get::>(DeviceData::VT_CUSTOM_NAME, None) + } + /// Mostly-static info about the device hardware + #[inline] + pub fn hardware_info(&self) -> Option> { + self._tab.get::>(DeviceData::VT_HARDWARE_INFO, None) + } + /// General info about the status of the device + #[inline] + pub fn hardware_status(&self) -> Option> { + self._tab.get::>(DeviceData::VT_HARDWARE_STATUS, None) + } + /// Info about all trackers attached to this device + #[inline] + pub fn trackers(&self) -> Option>>> { + self._tab.get::>>>(DeviceData::VT_TRACKERS, None) + } +} + +impl flatbuffers::Verifiable for DeviceData<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .visit_field::>("custom_name", Self::VT_CUSTOM_NAME, false)? + .visit_field::>("hardware_info", Self::VT_HARDWARE_INFO, false)? + .visit_field::>("hardware_status", Self::VT_HARDWARE_STATUS, false)? + .visit_field::>>>("trackers", Self::VT_TRACKERS, false)? + .finish(); + Ok(()) + } +} +pub struct DeviceDataArgs<'a> { + pub id: Option<&'a super::super::datatypes::DeviceId>, + pub custom_name: Option>, + pub hardware_info: Option>>, + pub hardware_status: Option>>, + pub trackers: Option>>>>, +} +impl<'a> Default for DeviceDataArgs<'a> { + #[inline] + fn default() -> Self { + DeviceDataArgs { + id: None, + custom_name: None, + hardware_info: None, + hardware_status: None, + trackers: None, + } + } +} + +pub struct DeviceDataBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DeviceDataBuilder<'a, 'b> { + #[inline] + pub fn add_id(&mut self, id: &super::super::datatypes::DeviceId) { + self.fbb_.push_slot_always::<&super::super::datatypes::DeviceId>(DeviceData::VT_ID, id); + } + #[inline] + pub fn add_custom_name(&mut self, custom_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(DeviceData::VT_CUSTOM_NAME, custom_name); + } + #[inline] + pub fn add_hardware_info(&mut self, hardware_info: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(DeviceData::VT_HARDWARE_INFO, hardware_info); + } + #[inline] + pub fn add_hardware_status(&mut self, hardware_status: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(DeviceData::VT_HARDWARE_STATUS, hardware_status); + } + #[inline] + pub fn add_trackers(&mut self, trackers: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(DeviceData::VT_TRACKERS, trackers); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DeviceDataBuilder<'a, 'b> { + let start = _fbb.start_table(); + DeviceDataBuilder { + 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 std::fmt::Debug for DeviceData<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("DeviceData"); + ds.field("id", &self.id()); + ds.field("custom_name", &self.custom_name()); + ds.field("hardware_info", &self.hardware_info()); + ds.field("hardware_status", &self.hardware_status()); + ds.field("trackers", &self.trackers()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs index 9f3a3f73..760456cf 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs @@ -1,126 +1,122 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 DeviceDataMaskOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// A mask of values to be reported in subsequent DeviceStatus. Values set to `false` -/// or `null` will not reported. By default, all fields are false/null. -/// -/// If you set a value to `true`, it is not guaranteed that the sender actually has -/// such a value to send. In this case, they will probably send `null`, and the receiver -/// has the choice to disconnect due to missing data. -pub struct DeviceDataMask<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for DeviceDataMask<'a> { - type Inner = DeviceDataMask<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> DeviceDataMask<'a> { - pub const VT_TRACKER_DATA: flatbuffers::VOffsetT = 4; - pub const VT_DEVICE_DATA: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - DeviceDataMask { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args DeviceDataMaskArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = DeviceDataMaskBuilder::new(_fbb); - if let Some(x) = args.tracker_data { builder.add_tracker_data(x); } - builder.add_device_data(args.device_data); - builder.finish() - } - - - /// Which tracker data should be sent in this data feed - #[inline] - pub fn tracker_data(&self) -> Option> { - self._tab.get::>(DeviceDataMask::VT_TRACKER_DATA, None) - } - /// true if device data should be sent in this data feed - #[inline] - pub fn device_data(&self) -> bool { - self._tab.get::(DeviceDataMask::VT_DEVICE_DATA, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for DeviceDataMask<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("tracker_data", Self::VT_TRACKER_DATA, false)? - .visit_field::("device_data", Self::VT_DEVICE_DATA, false)? - .finish(); - Ok(()) - } -} -pub struct DeviceDataMaskArgs<'a> { - pub tracker_data: Option>>, - pub device_data: bool, -} -impl<'a> Default for DeviceDataMaskArgs<'a> { - #[inline] - fn default() -> Self { - DeviceDataMaskArgs { - tracker_data: None, - device_data: false, - } - } -} - -pub struct DeviceDataMaskBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> DeviceDataMaskBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_data(&mut self, tracker_data: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(DeviceDataMask::VT_TRACKER_DATA, tracker_data); - } - #[inline] - pub fn add_device_data(&mut self, device_data: bool) { - self.fbb_.push_slot::(DeviceDataMask::VT_DEVICE_DATA, device_data, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DeviceDataMaskBuilder<'a, 'b> { - let start = _fbb.start_table(); - DeviceDataMaskBuilder { - 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 DeviceDataMask<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("DeviceDataMask"); - ds.field("tracker_data", &self.tracker_data()); - ds.field("device_data", &self.device_data()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum DeviceDataMaskOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// A mask of values to be reported in subsequent DeviceStatus. Values set to `false` +/// or `null` will not reported. By default, all fields are false/null. +/// +/// If you set a value to `true`, it is not guaranteed that the sender actually has +/// such a value to send. In this case, they will probably send `null`, and the receiver +/// has the choice to disconnect due to missing data. +pub struct DeviceDataMask<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for DeviceDataMask<'a> { + type Inner = DeviceDataMask<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> DeviceDataMask<'a> { + pub const VT_TRACKER_DATA: flatbuffers::VOffsetT = 4; + pub const VT_DEVICE_DATA: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + DeviceDataMask { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args DeviceDataMaskArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = DeviceDataMaskBuilder::new(_fbb); + if let Some(x) = args.tracker_data { builder.add_tracker_data(x); } + builder.add_device_data(args.device_data); + builder.finish() + } + + + /// Which tracker data should be sent in this data feed + #[inline] + pub fn tracker_data(&self) -> Option> { + self._tab.get::>(DeviceDataMask::VT_TRACKER_DATA, None) + } + /// true if device data should be sent in this data feed + #[inline] + pub fn device_data(&self) -> bool { + self._tab.get::(DeviceDataMask::VT_DEVICE_DATA, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for DeviceDataMask<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("tracker_data", Self::VT_TRACKER_DATA, false)? + .visit_field::("device_data", Self::VT_DEVICE_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct DeviceDataMaskArgs<'a> { + pub tracker_data: Option>>, + pub device_data: bool, +} +impl<'a> Default for DeviceDataMaskArgs<'a> { + #[inline] + fn default() -> Self { + DeviceDataMaskArgs { + tracker_data: None, + device_data: false, + } + } +} + +pub struct DeviceDataMaskBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> DeviceDataMaskBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_data(&mut self, tracker_data: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(DeviceDataMask::VT_TRACKER_DATA, tracker_data); + } + #[inline] + pub fn add_device_data(&mut self, device_data: bool) { + self.fbb_.push_slot::(DeviceDataMask::VT_DEVICE_DATA, device_data, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> DeviceDataMaskBuilder<'a, 'b> { + let start = _fbb.start_table(); + DeviceDataMaskBuilder { + 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 std::fmt::Debug for DeviceDataMask<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("DeviceDataMask"); + ds.field("tracker_data", &self.tracker_data()); + ds.field("device_data", &self.device_data()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs index 0258bc50..58553edb 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs @@ -1,106 +1,102 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 PollDataFeedOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Requests for a single `Update` to be sent. This is helpful when getting -/// initial info about the device. -pub struct PollDataFeed<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for PollDataFeed<'a> { - type Inner = PollDataFeed<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> PollDataFeed<'a> { - pub const VT_CONFIG: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - PollDataFeed { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args PollDataFeedArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = PollDataFeedBuilder::new(_fbb); - if let Some(x) = args.config { builder.add_config(x); } - builder.finish() - } - - - #[inline] - pub fn config(&self) -> Option> { - self._tab.get::>(PollDataFeed::VT_CONFIG, None) - } -} - -impl flatbuffers::Verifiable for PollDataFeed<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("config", Self::VT_CONFIG, false)? - .finish(); - Ok(()) - } -} -pub struct PollDataFeedArgs<'a> { - pub config: Option>>, -} -impl<'a> Default for PollDataFeedArgs<'a> { - #[inline] - fn default() -> Self { - PollDataFeedArgs { - config: None, - } - } -} - -pub struct PollDataFeedBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> PollDataFeedBuilder<'a, 'b> { - #[inline] - pub fn add_config(&mut self, config: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(PollDataFeed::VT_CONFIG, config); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PollDataFeedBuilder<'a, 'b> { - let start = _fbb.start_table(); - PollDataFeedBuilder { - 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 PollDataFeed<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("PollDataFeed"); - ds.field("config", &self.config()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum PollDataFeedOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests for a single `Update` to be sent. This is helpful when getting +/// initial info about the device. +pub struct PollDataFeed<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for PollDataFeed<'a> { + type Inner = PollDataFeed<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> PollDataFeed<'a> { + pub const VT_CONFIG: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + PollDataFeed { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args PollDataFeedArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = PollDataFeedBuilder::new(_fbb); + if let Some(x) = args.config { builder.add_config(x); } + builder.finish() + } + + + #[inline] + pub fn config(&self) -> Option> { + self._tab.get::>(PollDataFeed::VT_CONFIG, None) + } +} + +impl flatbuffers::Verifiable for PollDataFeed<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("config", Self::VT_CONFIG, false)? + .finish(); + Ok(()) + } +} +pub struct PollDataFeedArgs<'a> { + pub config: Option>>, +} +impl<'a> Default for PollDataFeedArgs<'a> { + #[inline] + fn default() -> Self { + PollDataFeedArgs { + config: None, + } + } +} + +pub struct PollDataFeedBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> PollDataFeedBuilder<'a, 'b> { + #[inline] + pub fn add_config(&mut self, config: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(PollDataFeed::VT_CONFIG, config); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PollDataFeedBuilder<'a, 'b> { + let start = _fbb.start_table(); + PollDataFeedBuilder { + 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 std::fmt::Debug for PollDataFeed<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("PollDataFeed"); + ds.field("config", &self.config()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs index 77d9a0bd..8b735181 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs @@ -1,112 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 StartDataFeedOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Requests for the other party to send `data_feeds`. -/// For example, GUI requests for position data to be sent from server. -/// -/// When sending a new `StartFeed`, the old data feeds should stop being sent. -/// We still support multiple data feeds at the same time, because `data_feeds` -/// is a list. -/// -/// Multiple data feeds are useful to get data at different frequencies. -pub struct StartDataFeed<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for StartDataFeed<'a> { - type Inner = StartDataFeed<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> StartDataFeed<'a> { - pub const VT_DATA_FEEDS: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - StartDataFeed { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StartDataFeedArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StartDataFeedBuilder::new(_fbb); - if let Some(x) = args.data_feeds { builder.add_data_feeds(x); } - builder.finish() - } - - - #[inline] - pub fn data_feeds(&self) -> Option>>> { - self._tab.get::>>>(StartDataFeed::VT_DATA_FEEDS, None) - } -} - -impl flatbuffers::Verifiable for StartDataFeed<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data_feeds", Self::VT_DATA_FEEDS, false)? - .finish(); - Ok(()) - } -} -pub struct StartDataFeedArgs<'a> { - pub data_feeds: Option>>>>, -} -impl<'a> Default for StartDataFeedArgs<'a> { - #[inline] - fn default() -> Self { - StartDataFeedArgs { - data_feeds: None, - } - } -} - -pub struct StartDataFeedBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> StartDataFeedBuilder<'a, 'b> { - #[inline] - pub fn add_data_feeds(&mut self, data_feeds: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(StartDataFeed::VT_DATA_FEEDS, data_feeds); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StartDataFeedBuilder<'a, 'b> { - let start = _fbb.start_table(); - StartDataFeedBuilder { - 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 StartDataFeed<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("StartDataFeed"); - ds.field("data_feeds", &self.data_feeds()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StartDataFeedOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests for the other party to send `data_feeds`. +/// For example, GUI requests for position data to be sent from server. +/// +/// When sending a new `StartFeed`, the old data feeds should stop being sent. +/// We still support multiple data feeds at the same time, because `data_feeds` +/// is a list. +/// +/// Multiple data feeds are useful to get data at different frequencies. +pub struct StartDataFeed<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for StartDataFeed<'a> { + type Inner = StartDataFeed<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> StartDataFeed<'a> { + pub const VT_DATA_FEEDS: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + StartDataFeed { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StartDataFeedArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StartDataFeedBuilder::new(_fbb); + if let Some(x) = args.data_feeds { builder.add_data_feeds(x); } + builder.finish() + } + + + #[inline] + pub fn data_feeds(&self) -> Option>>> { + self._tab.get::>>>(StartDataFeed::VT_DATA_FEEDS, None) + } +} + +impl flatbuffers::Verifiable for StartDataFeed<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("data_feeds", Self::VT_DATA_FEEDS, false)? + .finish(); + Ok(()) + } +} +pub struct StartDataFeedArgs<'a> { + pub data_feeds: Option>>>>, +} +impl<'a> Default for StartDataFeedArgs<'a> { + #[inline] + fn default() -> Self { + StartDataFeedArgs { + data_feeds: None, + } + } +} + +pub struct StartDataFeedBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StartDataFeedBuilder<'a, 'b> { + #[inline] + pub fn add_data_feeds(&mut self, data_feeds: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(StartDataFeed::VT_DATA_FEEDS, data_feeds); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StartDataFeedBuilder<'a, 'b> { + let start = _fbb.start_table(); + StartDataFeedBuilder { + 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 std::fmt::Debug for StartDataFeed<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("StartDataFeed"); + ds.field("data_feeds", &self.data_feeds()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs index b62130ef..1bd9c921 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs @@ -1,211 +1,207 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 TrackerDataOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Describes all possible information about a tracker. A tracker is anything that -/// provides kinematic data about a particular body part. -/// -/// Trackers may be synthetic/computed or instead part of an actual hardware device. -/// There can be multiple trackers per hardware device. -pub struct TrackerData<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TrackerData<'a> { - type Inner = TrackerData<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> TrackerData<'a> { - pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; - pub const VT_INFO: flatbuffers::VOffsetT = 6; - pub const VT_STATUS: flatbuffers::VOffsetT = 8; - pub const VT_ROTATION: flatbuffers::VOffsetT = 10; - pub const VT_POSITION: flatbuffers::VOffsetT = 12; - pub const VT_RAW_ROT_VEL: flatbuffers::VOffsetT = 14; - pub const VT_RAW_TRANS_ACCEL: flatbuffers::VOffsetT = 16; - pub const VT_TEMP: flatbuffers::VOffsetT = 18; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TrackerData { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TrackerDataArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TrackerDataBuilder::new(_fbb); - if let Some(x) = args.temp { builder.add_temp(x); } - if let Some(x) = args.raw_trans_accel { builder.add_raw_trans_accel(x); } - if let Some(x) = args.raw_rot_vel { builder.add_raw_rot_vel(x); } - if let Some(x) = args.position { builder.add_position(x); } - if let Some(x) = args.rotation { builder.add_rotation(x); } - if let Some(x) = args.info { builder.add_info(x); } - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.add_status(args.status); - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - self._tab.get::>(TrackerData::VT_TRACKER_ID, None) - } - #[inline] - pub fn info(&self) -> Option> { - self._tab.get::>(TrackerData::VT_INFO, None) - } - #[inline] - pub fn status(&self) -> super::super::datatypes::TrackerStatus { - self._tab.get::(TrackerData::VT_STATUS, Some(super::super::datatypes::TrackerStatus::NONE)).unwrap() - } - #[inline] - pub fn rotation(&self) -> Option<&'a super::super::datatypes::math::Quat> { - self._tab.get::(TrackerData::VT_ROTATION, None) - } - /// Position, in meters - #[inline] - pub fn position(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - self._tab.get::(TrackerData::VT_POSITION, None) - } - /// Raw rotational velocity, in euler angles - #[inline] - pub fn raw_rot_vel(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - self._tab.get::(TrackerData::VT_RAW_ROT_VEL, None) - } - /// Raw translational acceleration, in m/s^2 - #[inline] - pub fn raw_trans_accel(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { - self._tab.get::(TrackerData::VT_RAW_TRANS_ACCEL, None) - } - /// Temperature in degrees celsius - #[inline] - pub fn temp(&self) -> Option<&'a super::super::datatypes::Temperature> { - self._tab.get::(TrackerData::VT_TEMP, None) - } -} - -impl flatbuffers::Verifiable for TrackerData<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("tracker_id", Self::VT_TRACKER_ID, false)? - .visit_field::>("info", Self::VT_INFO, false)? - .visit_field::("status", Self::VT_STATUS, false)? - .visit_field::("rotation", Self::VT_ROTATION, false)? - .visit_field::("position", Self::VT_POSITION, false)? - .visit_field::("raw_rot_vel", Self::VT_RAW_ROT_VEL, false)? - .visit_field::("raw_trans_accel", Self::VT_RAW_TRANS_ACCEL, false)? - .visit_field::("temp", Self::VT_TEMP, false)? - .finish(); - Ok(()) - } -} -pub struct TrackerDataArgs<'a> { - pub tracker_id: Option>>, - pub info: Option>>, - pub status: super::super::datatypes::TrackerStatus, - pub rotation: Option<&'a super::super::datatypes::math::Quat>, - pub position: Option<&'a super::super::datatypes::math::Vec3f>, - pub raw_rot_vel: Option<&'a super::super::datatypes::math::Vec3f>, - pub raw_trans_accel: Option<&'a super::super::datatypes::math::Vec3f>, - pub temp: Option<&'a super::super::datatypes::Temperature>, -} -impl<'a> Default for TrackerDataArgs<'a> { - #[inline] - fn default() -> Self { - TrackerDataArgs { - tracker_id: None, - info: None, - status: super::super::datatypes::TrackerStatus::NONE, - rotation: None, - position: None, - raw_rot_vel: None, - raw_trans_accel: None, - temp: None, - } - } -} - -pub struct TrackerDataBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TrackerDataBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TrackerData::VT_TRACKER_ID, tracker_id); - } - #[inline] - pub fn add_info(&mut self, info: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TrackerData::VT_INFO, info); - } - #[inline] - pub fn add_status(&mut self, status: super::super::datatypes::TrackerStatus) { - self.fbb_.push_slot::(TrackerData::VT_STATUS, status, super::super::datatypes::TrackerStatus::NONE); - } - #[inline] - pub fn add_rotation(&mut self, rotation: &super::super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerData::VT_ROTATION, rotation); - } - #[inline] - pub fn add_position(&mut self, position: &super::super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_POSITION, position); - } - #[inline] - pub fn add_raw_rot_vel(&mut self, raw_rot_vel: &super::super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_ROT_VEL, raw_rot_vel); - } - #[inline] - pub fn add_raw_trans_accel(&mut self, raw_trans_accel: &super::super::datatypes::math::Vec3f) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_TRANS_ACCEL, raw_trans_accel); - } - #[inline] - pub fn add_temp(&mut self, temp: &super::super::datatypes::Temperature) { - self.fbb_.push_slot_always::<&super::super::datatypes::Temperature>(TrackerData::VT_TEMP, temp); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerDataBuilder<'a, 'b> { - let start = _fbb.start_table(); - TrackerDataBuilder { - 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 TrackerData<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TrackerData"); - ds.field("tracker_id", &self.tracker_id()); - ds.field("info", &self.info()); - ds.field("status", &self.status()); - ds.field("rotation", &self.rotation()); - ds.field("position", &self.position()); - ds.field("raw_rot_vel", &self.raw_rot_vel()); - ds.field("raw_trans_accel", &self.raw_trans_accel()); - ds.field("temp", &self.temp()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackerDataOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Describes all possible information about a tracker. A tracker is anything that +/// provides kinematic data about a particular body part. +/// +/// Trackers may be synthetic/computed or instead part of an actual hardware device. +/// There can be multiple trackers per hardware device. +pub struct TrackerData<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackerData<'a> { + type Inner = TrackerData<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TrackerData<'a> { + pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; + pub const VT_INFO: flatbuffers::VOffsetT = 6; + pub const VT_STATUS: flatbuffers::VOffsetT = 8; + pub const VT_ROTATION: flatbuffers::VOffsetT = 10; + pub const VT_POSITION: flatbuffers::VOffsetT = 12; + pub const VT_RAW_ROT_VEL: flatbuffers::VOffsetT = 14; + pub const VT_RAW_TRANS_ACCEL: flatbuffers::VOffsetT = 16; + pub const VT_TEMP: flatbuffers::VOffsetT = 18; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackerData { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TrackerDataArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackerDataBuilder::new(_fbb); + if let Some(x) = args.temp { builder.add_temp(x); } + if let Some(x) = args.raw_trans_accel { builder.add_raw_trans_accel(x); } + if let Some(x) = args.raw_rot_vel { builder.add_raw_rot_vel(x); } + if let Some(x) = args.position { builder.add_position(x); } + if let Some(x) = args.rotation { builder.add_rotation(x); } + if let Some(x) = args.info { builder.add_info(x); } + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.add_status(args.status); + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + self._tab.get::>(TrackerData::VT_TRACKER_ID, None) + } + #[inline] + pub fn info(&self) -> Option> { + self._tab.get::>(TrackerData::VT_INFO, None) + } + #[inline] + pub fn status(&self) -> super::super::datatypes::TrackerStatus { + self._tab.get::(TrackerData::VT_STATUS, Some(super::super::datatypes::TrackerStatus::NONE)).unwrap() + } + #[inline] + pub fn rotation(&self) -> Option<&'a super::super::datatypes::math::Quat> { + self._tab.get::(TrackerData::VT_ROTATION, None) + } + /// Position, in meters + #[inline] + pub fn position(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + self._tab.get::(TrackerData::VT_POSITION, None) + } + /// Raw rotational velocity, in euler angles + #[inline] + pub fn raw_rot_vel(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + self._tab.get::(TrackerData::VT_RAW_ROT_VEL, None) + } + /// Raw translational acceleration, in m/s^2 + #[inline] + pub fn raw_trans_accel(&self) -> Option<&'a super::super::datatypes::math::Vec3f> { + self._tab.get::(TrackerData::VT_RAW_TRANS_ACCEL, None) + } + /// Temperature in degrees celsius + #[inline] + pub fn temp(&self) -> Option<&'a super::super::datatypes::Temperature> { + self._tab.get::(TrackerData::VT_TEMP, None) + } +} + +impl flatbuffers::Verifiable for TrackerData<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("tracker_id", Self::VT_TRACKER_ID, false)? + .visit_field::>("info", Self::VT_INFO, false)? + .visit_field::("status", Self::VT_STATUS, false)? + .visit_field::("rotation", Self::VT_ROTATION, false)? + .visit_field::("position", Self::VT_POSITION, false)? + .visit_field::("raw_rot_vel", Self::VT_RAW_ROT_VEL, false)? + .visit_field::("raw_trans_accel", Self::VT_RAW_TRANS_ACCEL, false)? + .visit_field::("temp", Self::VT_TEMP, false)? + .finish(); + Ok(()) + } +} +pub struct TrackerDataArgs<'a> { + pub tracker_id: Option>>, + pub info: Option>>, + pub status: super::super::datatypes::TrackerStatus, + pub rotation: Option<&'a super::super::datatypes::math::Quat>, + pub position: Option<&'a super::super::datatypes::math::Vec3f>, + pub raw_rot_vel: Option<&'a super::super::datatypes::math::Vec3f>, + pub raw_trans_accel: Option<&'a super::super::datatypes::math::Vec3f>, + pub temp: Option<&'a super::super::datatypes::Temperature>, +} +impl<'a> Default for TrackerDataArgs<'a> { + #[inline] + fn default() -> Self { + TrackerDataArgs { + tracker_id: None, + info: None, + status: super::super::datatypes::TrackerStatus::NONE, + rotation: None, + position: None, + raw_rot_vel: None, + raw_trans_accel: None, + temp: None, + } + } +} + +pub struct TrackerDataBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackerDataBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TrackerData::VT_TRACKER_ID, tracker_id); + } + #[inline] + pub fn add_info(&mut self, info: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TrackerData::VT_INFO, info); + } + #[inline] + pub fn add_status(&mut self, status: super::super::datatypes::TrackerStatus) { + self.fbb_.push_slot::(TrackerData::VT_STATUS, status, super::super::datatypes::TrackerStatus::NONE); + } + #[inline] + pub fn add_rotation(&mut self, rotation: &super::super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerData::VT_ROTATION, rotation); + } + #[inline] + pub fn add_position(&mut self, position: &super::super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_POSITION, position); + } + #[inline] + pub fn add_raw_rot_vel(&mut self, raw_rot_vel: &super::super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_ROT_VEL, raw_rot_vel); + } + #[inline] + pub fn add_raw_trans_accel(&mut self, raw_trans_accel: &super::super::datatypes::math::Vec3f) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Vec3f>(TrackerData::VT_RAW_TRANS_ACCEL, raw_trans_accel); + } + #[inline] + pub fn add_temp(&mut self, temp: &super::super::datatypes::Temperature) { + self.fbb_.push_slot_always::<&super::super::datatypes::Temperature>(TrackerData::VT_TEMP, temp); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerDataBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackerDataBuilder { + 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 std::fmt::Debug for TrackerData<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TrackerData"); + ds.field("tracker_id", &self.tracker_id()); + ds.field("info", &self.info()); + ds.field("status", &self.status()); + ds.field("rotation", &self.rotation()); + ds.field("position", &self.position()); + ds.field("raw_rot_vel", &self.raw_rot_vel()); + ds.field("raw_trans_accel", &self.raw_trans_accel()); + ds.field("temp", &self.temp()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs index 42b981ce..78f6c014 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs @@ -1,189 +1,185 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 TrackerDataMaskOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// A mask of the different components in `TrackerComponent` -pub struct TrackerDataMask<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TrackerDataMask<'a> { - type Inner = TrackerDataMask<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> TrackerDataMask<'a> { - pub const VT_INFO: flatbuffers::VOffsetT = 4; - pub const VT_STATUS: flatbuffers::VOffsetT = 6; - pub const VT_ROTATION: flatbuffers::VOffsetT = 8; - pub const VT_POSITION: flatbuffers::VOffsetT = 10; - pub const VT_RAW_ROT_VEL: flatbuffers::VOffsetT = 12; - pub const VT_RAW_TRANS_ACCEL: flatbuffers::VOffsetT = 14; - pub const VT_TEMP: flatbuffers::VOffsetT = 16; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TrackerDataMask { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TrackerDataMaskArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = TrackerDataMaskBuilder::new(_fbb); - builder.add_temp(args.temp); - builder.add_raw_trans_accel(args.raw_trans_accel); - builder.add_raw_rot_vel(args.raw_rot_vel); - builder.add_position(args.position); - builder.add_rotation(args.rotation); - builder.add_status(args.status); - builder.add_info(args.info); - builder.finish() - } - - - #[inline] - pub fn info(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_INFO, Some(false)).unwrap() - } - #[inline] - pub fn status(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_STATUS, Some(false)).unwrap() - } - #[inline] - pub fn rotation(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_ROTATION, Some(false)).unwrap() - } - #[inline] - pub fn position(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_POSITION, Some(false)).unwrap() - } - #[inline] - pub fn raw_rot_vel(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_RAW_ROT_VEL, Some(false)).unwrap() - } - #[inline] - pub fn raw_trans_accel(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_RAW_TRANS_ACCEL, Some(false)).unwrap() - } - #[inline] - pub fn temp(&self) -> bool { - self._tab.get::(TrackerDataMask::VT_TEMP, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for TrackerDataMask<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("info", Self::VT_INFO, false)? - .visit_field::("status", Self::VT_STATUS, false)? - .visit_field::("rotation", Self::VT_ROTATION, false)? - .visit_field::("position", Self::VT_POSITION, false)? - .visit_field::("raw_rot_vel", Self::VT_RAW_ROT_VEL, false)? - .visit_field::("raw_trans_accel", Self::VT_RAW_TRANS_ACCEL, false)? - .visit_field::("temp", Self::VT_TEMP, false)? - .finish(); - Ok(()) - } -} -pub struct TrackerDataMaskArgs { - pub info: bool, - pub status: bool, - pub rotation: bool, - pub position: bool, - pub raw_rot_vel: bool, - pub raw_trans_accel: bool, - pub temp: bool, -} -impl<'a> Default for TrackerDataMaskArgs { - #[inline] - fn default() -> Self { - TrackerDataMaskArgs { - info: false, - status: false, - rotation: false, - position: false, - raw_rot_vel: false, - raw_trans_accel: false, - temp: false, - } - } -} - -pub struct TrackerDataMaskBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TrackerDataMaskBuilder<'a, 'b> { - #[inline] - pub fn add_info(&mut self, info: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_INFO, info, false); - } - #[inline] - pub fn add_status(&mut self, status: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_STATUS, status, false); - } - #[inline] - pub fn add_rotation(&mut self, rotation: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_ROTATION, rotation, false); - } - #[inline] - pub fn add_position(&mut self, position: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_POSITION, position, false); - } - #[inline] - pub fn add_raw_rot_vel(&mut self, raw_rot_vel: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_RAW_ROT_VEL, raw_rot_vel, false); - } - #[inline] - pub fn add_raw_trans_accel(&mut self, raw_trans_accel: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_RAW_TRANS_ACCEL, raw_trans_accel, false); - } - #[inline] - pub fn add_temp(&mut self, temp: bool) { - self.fbb_.push_slot::(TrackerDataMask::VT_TEMP, temp, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerDataMaskBuilder<'a, 'b> { - let start = _fbb.start_table(); - TrackerDataMaskBuilder { - 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 TrackerDataMask<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TrackerDataMask"); - ds.field("info", &self.info()); - ds.field("status", &self.status()); - ds.field("rotation", &self.rotation()); - ds.field("position", &self.position()); - ds.field("raw_rot_vel", &self.raw_rot_vel()); - ds.field("raw_trans_accel", &self.raw_trans_accel()); - ds.field("temp", &self.temp()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackerDataMaskOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// A mask of the different components in `TrackerComponent` +pub struct TrackerDataMask<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackerDataMask<'a> { + type Inner = TrackerDataMask<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TrackerDataMask<'a> { + pub const VT_INFO: flatbuffers::VOffsetT = 4; + pub const VT_STATUS: flatbuffers::VOffsetT = 6; + pub const VT_ROTATION: flatbuffers::VOffsetT = 8; + pub const VT_POSITION: flatbuffers::VOffsetT = 10; + pub const VT_RAW_ROT_VEL: flatbuffers::VOffsetT = 12; + pub const VT_RAW_TRANS_ACCEL: flatbuffers::VOffsetT = 14; + pub const VT_TEMP: flatbuffers::VOffsetT = 16; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackerDataMask { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TrackerDataMaskArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackerDataMaskBuilder::new(_fbb); + builder.add_temp(args.temp); + builder.add_raw_trans_accel(args.raw_trans_accel); + builder.add_raw_rot_vel(args.raw_rot_vel); + builder.add_position(args.position); + builder.add_rotation(args.rotation); + builder.add_status(args.status); + builder.add_info(args.info); + builder.finish() + } + + + #[inline] + pub fn info(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_INFO, Some(false)).unwrap() + } + #[inline] + pub fn status(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_STATUS, Some(false)).unwrap() + } + #[inline] + pub fn rotation(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_ROTATION, Some(false)).unwrap() + } + #[inline] + pub fn position(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_POSITION, Some(false)).unwrap() + } + #[inline] + pub fn raw_rot_vel(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_RAW_ROT_VEL, Some(false)).unwrap() + } + #[inline] + pub fn raw_trans_accel(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_RAW_TRANS_ACCEL, Some(false)).unwrap() + } + #[inline] + pub fn temp(&self) -> bool { + self._tab.get::(TrackerDataMask::VT_TEMP, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for TrackerDataMask<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("info", Self::VT_INFO, false)? + .visit_field::("status", Self::VT_STATUS, false)? + .visit_field::("rotation", Self::VT_ROTATION, false)? + .visit_field::("position", Self::VT_POSITION, false)? + .visit_field::("raw_rot_vel", Self::VT_RAW_ROT_VEL, false)? + .visit_field::("raw_trans_accel", Self::VT_RAW_TRANS_ACCEL, false)? + .visit_field::("temp", Self::VT_TEMP, false)? + .finish(); + Ok(()) + } +} +pub struct TrackerDataMaskArgs { + pub info: bool, + pub status: bool, + pub rotation: bool, + pub position: bool, + pub raw_rot_vel: bool, + pub raw_trans_accel: bool, + pub temp: bool, +} +impl<'a> Default for TrackerDataMaskArgs { + #[inline] + fn default() -> Self { + TrackerDataMaskArgs { + info: false, + status: false, + rotation: false, + position: false, + raw_rot_vel: false, + raw_trans_accel: false, + temp: false, + } + } +} + +pub struct TrackerDataMaskBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackerDataMaskBuilder<'a, 'b> { + #[inline] + pub fn add_info(&mut self, info: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_INFO, info, false); + } + #[inline] + pub fn add_status(&mut self, status: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_STATUS, status, false); + } + #[inline] + pub fn add_rotation(&mut self, rotation: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_ROTATION, rotation, false); + } + #[inline] + pub fn add_position(&mut self, position: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_POSITION, position, false); + } + #[inline] + pub fn add_raw_rot_vel(&mut self, raw_rot_vel: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_RAW_ROT_VEL, raw_rot_vel, false); + } + #[inline] + pub fn add_raw_trans_accel(&mut self, raw_trans_accel: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_RAW_TRANS_ACCEL, raw_trans_accel, false); + } + #[inline] + pub fn add_temp(&mut self, temp: bool) { + self.fbb_.push_slot::(TrackerDataMask::VT_TEMP, temp, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerDataMaskBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackerDataMaskBuilder { + 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 std::fmt::Debug for TrackerDataMask<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TrackerDataMask"); + ds.field("info", &self.info()); + ds.field("status", &self.status()); + ds.field("rotation", &self.rotation()); + ds.field("position", &self.position()); + ds.field("raw_rot_vel", &self.raw_rot_vel()); + ds.field("raw_trans_accel", &self.raw_trans_accel()); + ds.field("temp", &self.temp()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs index 688b9da2..9c933994 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs @@ -1,208 +1,204 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 TrackerInfoOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Static description of a tracker -pub struct TrackerInfo<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TrackerInfo<'a> { - type Inner = TrackerInfo<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> TrackerInfo<'a> { - pub const VT_IMU_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_BODY_PART: flatbuffers::VOffsetT = 6; - pub const VT_POLL_RATE: flatbuffers::VOffsetT = 8; - pub const VT_MOUNTING_ORIENTATION: flatbuffers::VOffsetT = 10; - pub const VT_EDITABLE: flatbuffers::VOffsetT = 12; - pub const VT_COMPUTED: flatbuffers::VOffsetT = 14; - pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 16; - pub const VT_CUSTOM_NAME: flatbuffers::VOffsetT = 18; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TrackerInfo { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TrackerInfoArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TrackerInfoBuilder::new(_fbb); - if let Some(x) = args.custom_name { builder.add_custom_name(x); } - if let Some(x) = args.display_name { builder.add_display_name(x); } - if let Some(x) = args.mounting_orientation { builder.add_mounting_orientation(x); } - if let Some(x) = args.poll_rate { builder.add_poll_rate(x); } - builder.add_imu_type(args.imu_type); - builder.add_computed(args.computed); - builder.add_editable(args.editable); - builder.add_body_part(args.body_part); - builder.finish() - } - - - #[inline] - pub fn imu_type(&self) -> super::super::datatypes::hardware_info::ImuType { - self._tab.get::(TrackerInfo::VT_IMU_TYPE, Some(super::super::datatypes::hardware_info::ImuType::Other)).unwrap() - } - /// The user-assigned role of the tracker. - #[inline] - pub fn body_part(&self) -> super::super::datatypes::BodyPart { - self._tab.get::(TrackerInfo::VT_BODY_PART, Some(super::super::datatypes::BodyPart::NONE)).unwrap() - } - /// average samples per second - #[inline] - pub fn poll_rate(&self) -> Option<&'a super::super::datatypes::HzF32> { - self._tab.get::(TrackerInfo::VT_POLL_RATE, None) - } - /// The orientation of the tracker when mounted on the body - #[inline] - pub fn mounting_orientation(&self) -> Option<&'a super::super::datatypes::math::Quat> { - self._tab.get::(TrackerInfo::VT_MOUNTING_ORIENTATION, None) - } - #[inline] - pub fn editable(&self) -> bool { - self._tab.get::(TrackerInfo::VT_EDITABLE, Some(false)).unwrap() - } - #[inline] - pub fn computed(&self) -> bool { - self._tab.get::(TrackerInfo::VT_COMPUTED, Some(false)).unwrap() - } - /// A human-friendly name to display as the name of the tracker. - #[inline] - pub fn display_name(&self) -> Option<&'a str> { - self._tab.get::>(TrackerInfo::VT_DISPLAY_NAME, None) - } - /// name to display as the name of the tracker set by the user - #[inline] - pub fn custom_name(&self) -> Option<&'a str> { - self._tab.get::>(TrackerInfo::VT_CUSTOM_NAME, None) - } -} - -impl flatbuffers::Verifiable for TrackerInfo<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("imu_type", Self::VT_IMU_TYPE, false)? - .visit_field::("body_part", Self::VT_BODY_PART, false)? - .visit_field::("poll_rate", Self::VT_POLL_RATE, false)? - .visit_field::("mounting_orientation", Self::VT_MOUNTING_ORIENTATION, false)? - .visit_field::("editable", Self::VT_EDITABLE, false)? - .visit_field::("computed", Self::VT_COMPUTED, false)? - .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? - .visit_field::>("custom_name", Self::VT_CUSTOM_NAME, false)? - .finish(); - Ok(()) - } -} -pub struct TrackerInfoArgs<'a> { - pub imu_type: super::super::datatypes::hardware_info::ImuType, - pub body_part: super::super::datatypes::BodyPart, - pub poll_rate: Option<&'a super::super::datatypes::HzF32>, - pub mounting_orientation: Option<&'a super::super::datatypes::math::Quat>, - pub editable: bool, - pub computed: bool, - pub display_name: Option>, - pub custom_name: Option>, -} -impl<'a> Default for TrackerInfoArgs<'a> { - #[inline] - fn default() -> Self { - TrackerInfoArgs { - imu_type: super::super::datatypes::hardware_info::ImuType::Other, - body_part: super::super::datatypes::BodyPart::NONE, - poll_rate: None, - mounting_orientation: None, - editable: false, - computed: false, - display_name: None, - custom_name: None, - } - } -} - -pub struct TrackerInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TrackerInfoBuilder<'a, 'b> { - #[inline] - pub fn add_imu_type(&mut self, imu_type: super::super::datatypes::hardware_info::ImuType) { - self.fbb_.push_slot::(TrackerInfo::VT_IMU_TYPE, imu_type, super::super::datatypes::hardware_info::ImuType::Other); - } - #[inline] - pub fn add_body_part(&mut self, body_part: super::super::datatypes::BodyPart) { - self.fbb_.push_slot::(TrackerInfo::VT_BODY_PART, body_part, super::super::datatypes::BodyPart::NONE); - } - #[inline] - pub fn add_poll_rate(&mut self, poll_rate: &super::super::datatypes::HzF32) { - self.fbb_.push_slot_always::<&super::super::datatypes::HzF32>(TrackerInfo::VT_POLL_RATE, poll_rate); - } - #[inline] - pub fn add_mounting_orientation(&mut self, mounting_orientation: &super::super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerInfo::VT_MOUNTING_ORIENTATION, mounting_orientation); - } - #[inline] - pub fn add_editable(&mut self, editable: bool) { - self.fbb_.push_slot::(TrackerInfo::VT_EDITABLE, editable, false); - } - #[inline] - pub fn add_computed(&mut self, computed: bool) { - self.fbb_.push_slot::(TrackerInfo::VT_COMPUTED, computed, false); - } - #[inline] - pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(TrackerInfo::VT_DISPLAY_NAME, display_name); - } - #[inline] - pub fn add_custom_name(&mut self, custom_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(TrackerInfo::VT_CUSTOM_NAME, custom_name); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerInfoBuilder<'a, 'b> { - let start = _fbb.start_table(); - TrackerInfoBuilder { - 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 TrackerInfo<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TrackerInfo"); - ds.field("imu_type", &self.imu_type()); - ds.field("body_part", &self.body_part()); - ds.field("poll_rate", &self.poll_rate()); - ds.field("mounting_orientation", &self.mounting_orientation()); - ds.field("editable", &self.editable()); - ds.field("computed", &self.computed()); - ds.field("display_name", &self.display_name()); - ds.field("custom_name", &self.custom_name()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackerInfoOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Static description of a tracker +pub struct TrackerInfo<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackerInfo<'a> { + type Inner = TrackerInfo<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TrackerInfo<'a> { + pub const VT_IMU_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_BODY_PART: flatbuffers::VOffsetT = 6; + pub const VT_POLL_RATE: flatbuffers::VOffsetT = 8; + pub const VT_MOUNTING_ORIENTATION: flatbuffers::VOffsetT = 10; + pub const VT_EDITABLE: flatbuffers::VOffsetT = 12; + pub const VT_COMPUTED: flatbuffers::VOffsetT = 14; + pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 16; + pub const VT_CUSTOM_NAME: flatbuffers::VOffsetT = 18; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackerInfo { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TrackerInfoArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackerInfoBuilder::new(_fbb); + if let Some(x) = args.custom_name { builder.add_custom_name(x); } + if let Some(x) = args.display_name { builder.add_display_name(x); } + if let Some(x) = args.mounting_orientation { builder.add_mounting_orientation(x); } + if let Some(x) = args.poll_rate { builder.add_poll_rate(x); } + builder.add_imu_type(args.imu_type); + builder.add_computed(args.computed); + builder.add_editable(args.editable); + builder.add_body_part(args.body_part); + builder.finish() + } + + + #[inline] + pub fn imu_type(&self) -> super::super::datatypes::hardware_info::ImuType { + self._tab.get::(TrackerInfo::VT_IMU_TYPE, Some(super::super::datatypes::hardware_info::ImuType::Other)).unwrap() + } + /// The user-assigned role of the tracker. + #[inline] + pub fn body_part(&self) -> super::super::datatypes::BodyPart { + self._tab.get::(TrackerInfo::VT_BODY_PART, Some(super::super::datatypes::BodyPart::NONE)).unwrap() + } + /// average samples per second + #[inline] + pub fn poll_rate(&self) -> Option<&'a super::super::datatypes::HzF32> { + self._tab.get::(TrackerInfo::VT_POLL_RATE, None) + } + /// The orientation of the tracker when mounted on the body + #[inline] + pub fn mounting_orientation(&self) -> Option<&'a super::super::datatypes::math::Quat> { + self._tab.get::(TrackerInfo::VT_MOUNTING_ORIENTATION, None) + } + #[inline] + pub fn editable(&self) -> bool { + self._tab.get::(TrackerInfo::VT_EDITABLE, Some(false)).unwrap() + } + #[inline] + pub fn computed(&self) -> bool { + self._tab.get::(TrackerInfo::VT_COMPUTED, Some(false)).unwrap() + } + /// A human-friendly name to display as the name of the tracker. + #[inline] + pub fn display_name(&self) -> Option<&'a str> { + self._tab.get::>(TrackerInfo::VT_DISPLAY_NAME, None) + } + /// name to display as the name of the tracker set by the user + #[inline] + pub fn custom_name(&self) -> Option<&'a str> { + self._tab.get::>(TrackerInfo::VT_CUSTOM_NAME, None) + } +} + +impl flatbuffers::Verifiable for TrackerInfo<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("imu_type", Self::VT_IMU_TYPE, false)? + .visit_field::("body_part", Self::VT_BODY_PART, false)? + .visit_field::("poll_rate", Self::VT_POLL_RATE, false)? + .visit_field::("mounting_orientation", Self::VT_MOUNTING_ORIENTATION, false)? + .visit_field::("editable", Self::VT_EDITABLE, false)? + .visit_field::("computed", Self::VT_COMPUTED, false)? + .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? + .visit_field::>("custom_name", Self::VT_CUSTOM_NAME, false)? + .finish(); + Ok(()) + } +} +pub struct TrackerInfoArgs<'a> { + pub imu_type: super::super::datatypes::hardware_info::ImuType, + pub body_part: super::super::datatypes::BodyPart, + pub poll_rate: Option<&'a super::super::datatypes::HzF32>, + pub mounting_orientation: Option<&'a super::super::datatypes::math::Quat>, + pub editable: bool, + pub computed: bool, + pub display_name: Option>, + pub custom_name: Option>, +} +impl<'a> Default for TrackerInfoArgs<'a> { + #[inline] + fn default() -> Self { + TrackerInfoArgs { + imu_type: super::super::datatypes::hardware_info::ImuType::Other, + body_part: super::super::datatypes::BodyPart::NONE, + poll_rate: None, + mounting_orientation: None, + editable: false, + computed: false, + display_name: None, + custom_name: None, + } + } +} + +pub struct TrackerInfoBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackerInfoBuilder<'a, 'b> { + #[inline] + pub fn add_imu_type(&mut self, imu_type: super::super::datatypes::hardware_info::ImuType) { + self.fbb_.push_slot::(TrackerInfo::VT_IMU_TYPE, imu_type, super::super::datatypes::hardware_info::ImuType::Other); + } + #[inline] + pub fn add_body_part(&mut self, body_part: super::super::datatypes::BodyPart) { + self.fbb_.push_slot::(TrackerInfo::VT_BODY_PART, body_part, super::super::datatypes::BodyPart::NONE); + } + #[inline] + pub fn add_poll_rate(&mut self, poll_rate: &super::super::datatypes::HzF32) { + self.fbb_.push_slot_always::<&super::super::datatypes::HzF32>(TrackerInfo::VT_POLL_RATE, poll_rate); + } + #[inline] + pub fn add_mounting_orientation(&mut self, mounting_orientation: &super::super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::super::datatypes::math::Quat>(TrackerInfo::VT_MOUNTING_ORIENTATION, mounting_orientation); + } + #[inline] + pub fn add_editable(&mut self, editable: bool) { + self.fbb_.push_slot::(TrackerInfo::VT_EDITABLE, editable, false); + } + #[inline] + pub fn add_computed(&mut self, computed: bool) { + self.fbb_.push_slot::(TrackerInfo::VT_COMPUTED, computed, false); + } + #[inline] + pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(TrackerInfo::VT_DISPLAY_NAME, display_name); + } + #[inline] + pub fn add_custom_name(&mut self, custom_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(TrackerInfo::VT_CUSTOM_NAME, custom_name); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerInfoBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackerInfoBuilder { + 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 std::fmt::Debug for TrackerInfo<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TrackerInfo"); + ds.field("imu_type", &self.imu_type()); + ds.field("body_part", &self.body_part()); + ds.field("poll_rate", &self.poll_rate()); + ds.field("mounting_orientation", &self.mounting_orientation()); + ds.field("editable", &self.editable()); + ds.field("computed", &self.computed()); + ds.field("display_name", &self.display_name()); + ds.field("custom_name", &self.custom_name()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs index 72dd2cff..a8d60444 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs @@ -1,179 +1,175 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_BODY_PART: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_BODY_PART: u8 = 21; -#[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_BODY_PART: [BodyPart; 22] = [ - BodyPart::NONE, - BodyPart::HEAD, - BodyPart::NECK, - BodyPart::CHEST, - BodyPart::WAIST, - BodyPart::HIP, - BodyPart::LEFT_UPPER_LEG, - BodyPart::RIGHT_UPPER_LEG, - BodyPart::LEFT_LOWER_LEG, - BodyPart::RIGHT_LOWER_LEG, - BodyPart::LEFT_FOOT, - BodyPart::RIGHT_FOOT, - BodyPart::LEFT_CONTROLLER, - BodyPart::RIGHT_CONTROLLER, - BodyPart::LEFT_LOWER_ARM, - BodyPart::RIGHT_LOWER_ARM, - BodyPart::LEFT_UPPER_ARM, - BodyPart::RIGHT_UPPER_ARM, - BodyPart::LEFT_HAND, - BodyPart::RIGHT_HAND, - BodyPart::LEFT_SHOULDER, - BodyPart::RIGHT_SHOULDER, -]; - -/// Different parts of the body. Roughly maps to each possible bone in the skeleton. -/// These are *NOT* the trackers. -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct BodyPart(pub u8); -#[allow(non_upper_case_globals)] -impl BodyPart { - pub const NONE: Self = Self(0); - pub const HEAD: Self = Self(1); - pub const NECK: Self = Self(2); - pub const CHEST: Self = Self(3); - pub const WAIST: Self = Self(4); - pub const HIP: Self = Self(5); - pub const LEFT_UPPER_LEG: Self = Self(6); - pub const RIGHT_UPPER_LEG: Self = Self(7); - pub const LEFT_LOWER_LEG: Self = Self(8); - pub const RIGHT_LOWER_LEG: Self = Self(9); - pub const LEFT_FOOT: Self = Self(10); - pub const RIGHT_FOOT: Self = Self(11); - pub const LEFT_CONTROLLER: Self = Self(12); - pub const RIGHT_CONTROLLER: Self = Self(13); - pub const LEFT_LOWER_ARM: Self = Self(14); - pub const RIGHT_LOWER_ARM: Self = Self(15); - pub const LEFT_UPPER_ARM: Self = Self(16); - pub const RIGHT_UPPER_ARM: Self = Self(17); - pub const LEFT_HAND: Self = Self(18); - pub const RIGHT_HAND: Self = Self(19); - pub const LEFT_SHOULDER: Self = Self(20); - pub const RIGHT_SHOULDER: Self = Self(21); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 21; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::HEAD, - Self::NECK, - Self::CHEST, - Self::WAIST, - Self::HIP, - Self::LEFT_UPPER_LEG, - Self::RIGHT_UPPER_LEG, - Self::LEFT_LOWER_LEG, - Self::RIGHT_LOWER_LEG, - Self::LEFT_FOOT, - Self::RIGHT_FOOT, - Self::LEFT_CONTROLLER, - Self::RIGHT_CONTROLLER, - Self::LEFT_LOWER_ARM, - Self::RIGHT_LOWER_ARM, - Self::LEFT_UPPER_ARM, - Self::RIGHT_UPPER_ARM, - Self::LEFT_HAND, - Self::RIGHT_HAND, - Self::LEFT_SHOULDER, - Self::RIGHT_SHOULDER, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::HEAD => Some("HEAD"), - Self::NECK => Some("NECK"), - Self::CHEST => Some("CHEST"), - Self::WAIST => Some("WAIST"), - Self::HIP => Some("HIP"), - Self::LEFT_UPPER_LEG => Some("LEFT_UPPER_LEG"), - Self::RIGHT_UPPER_LEG => Some("RIGHT_UPPER_LEG"), - Self::LEFT_LOWER_LEG => Some("LEFT_LOWER_LEG"), - Self::RIGHT_LOWER_LEG => Some("RIGHT_LOWER_LEG"), - Self::LEFT_FOOT => Some("LEFT_FOOT"), - Self::RIGHT_FOOT => Some("RIGHT_FOOT"), - Self::LEFT_CONTROLLER => Some("LEFT_CONTROLLER"), - Self::RIGHT_CONTROLLER => Some("RIGHT_CONTROLLER"), - Self::LEFT_LOWER_ARM => Some("LEFT_LOWER_ARM"), - Self::RIGHT_LOWER_ARM => Some("RIGHT_LOWER_ARM"), - Self::LEFT_UPPER_ARM => Some("LEFT_UPPER_ARM"), - Self::RIGHT_UPPER_ARM => Some("RIGHT_UPPER_ARM"), - Self::LEFT_HAND => Some("LEFT_HAND"), - Self::RIGHT_HAND => Some("RIGHT_HAND"), - Self::LEFT_SHOULDER => Some("LEFT_SHOULDER"), - Self::RIGHT_SHOULDER => Some("RIGHT_SHOULDER"), - _ => None, - } - } -} -impl core::fmt::Debug for BodyPart { - 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 BodyPart { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for BodyPart { - type Output = BodyPart; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for BodyPart { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for BodyPart { - #[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 BodyPart {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_BODY_PART: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_BODY_PART: u8 = 21; +#[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_BODY_PART: [BodyPart; 22] = [ + BodyPart::NONE, + BodyPart::HEAD, + BodyPart::NECK, + BodyPart::CHEST, + BodyPart::WAIST, + BodyPart::HIP, + BodyPart::LEFT_UPPER_LEG, + BodyPart::RIGHT_UPPER_LEG, + BodyPart::LEFT_LOWER_LEG, + BodyPart::RIGHT_LOWER_LEG, + BodyPart::LEFT_FOOT, + BodyPart::RIGHT_FOOT, + BodyPart::LEFT_CONTROLLER, + BodyPart::RIGHT_CONTROLLER, + BodyPart::LEFT_LOWER_ARM, + BodyPart::RIGHT_LOWER_ARM, + BodyPart::LEFT_UPPER_ARM, + BodyPart::RIGHT_UPPER_ARM, + BodyPart::LEFT_HAND, + BodyPart::RIGHT_HAND, + BodyPart::LEFT_SHOULDER, + BodyPart::RIGHT_SHOULDER, +]; + +/// Different parts of the body. Roughly maps to each possible bone in the skeleton. +/// These are *NOT* the trackers. +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct BodyPart(pub u8); +#[allow(non_upper_case_globals)] +impl BodyPart { + pub const NONE: Self = Self(0); + pub const HEAD: Self = Self(1); + pub const NECK: Self = Self(2); + pub const CHEST: Self = Self(3); + pub const WAIST: Self = Self(4); + pub const HIP: Self = Self(5); + pub const LEFT_UPPER_LEG: Self = Self(6); + pub const RIGHT_UPPER_LEG: Self = Self(7); + pub const LEFT_LOWER_LEG: Self = Self(8); + pub const RIGHT_LOWER_LEG: Self = Self(9); + pub const LEFT_FOOT: Self = Self(10); + pub const RIGHT_FOOT: Self = Self(11); + pub const LEFT_CONTROLLER: Self = Self(12); + pub const RIGHT_CONTROLLER: Self = Self(13); + pub const LEFT_LOWER_ARM: Self = Self(14); + pub const RIGHT_LOWER_ARM: Self = Self(15); + pub const LEFT_UPPER_ARM: Self = Self(16); + pub const RIGHT_UPPER_ARM: Self = Self(17); + pub const LEFT_HAND: Self = Self(18); + pub const RIGHT_HAND: Self = Self(19); + pub const LEFT_SHOULDER: Self = Self(20); + pub const RIGHT_SHOULDER: Self = Self(21); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 21; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::HEAD, + Self::NECK, + Self::CHEST, + Self::WAIST, + Self::HIP, + Self::LEFT_UPPER_LEG, + Self::RIGHT_UPPER_LEG, + Self::LEFT_LOWER_LEG, + Self::RIGHT_LOWER_LEG, + Self::LEFT_FOOT, + Self::RIGHT_FOOT, + Self::LEFT_CONTROLLER, + Self::RIGHT_CONTROLLER, + Self::LEFT_LOWER_ARM, + Self::RIGHT_LOWER_ARM, + Self::LEFT_UPPER_ARM, + Self::RIGHT_UPPER_ARM, + Self::LEFT_HAND, + Self::RIGHT_HAND, + Self::LEFT_SHOULDER, + Self::RIGHT_SHOULDER, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::HEAD => Some("HEAD"), + Self::NECK => Some("NECK"), + Self::CHEST => Some("CHEST"), + Self::WAIST => Some("WAIST"), + Self::HIP => Some("HIP"), + Self::LEFT_UPPER_LEG => Some("LEFT_UPPER_LEG"), + Self::RIGHT_UPPER_LEG => Some("RIGHT_UPPER_LEG"), + Self::LEFT_LOWER_LEG => Some("LEFT_LOWER_LEG"), + Self::RIGHT_LOWER_LEG => Some("RIGHT_LOWER_LEG"), + Self::LEFT_FOOT => Some("LEFT_FOOT"), + Self::RIGHT_FOOT => Some("RIGHT_FOOT"), + Self::LEFT_CONTROLLER => Some("LEFT_CONTROLLER"), + Self::RIGHT_CONTROLLER => Some("RIGHT_CONTROLLER"), + Self::LEFT_LOWER_ARM => Some("LEFT_LOWER_ARM"), + Self::RIGHT_LOWER_ARM => Some("RIGHT_LOWER_ARM"), + Self::LEFT_UPPER_ARM => Some("LEFT_UPPER_ARM"), + Self::RIGHT_UPPER_ARM => Some("RIGHT_UPPER_ARM"), + Self::LEFT_HAND => Some("LEFT_HAND"), + Self::RIGHT_HAND => Some("RIGHT_HAND"), + Self::LEFT_SHOULDER => Some("LEFT_SHOULDER"), + Self::RIGHT_SHOULDER => Some("RIGHT_SHOULDER"), + _ => None, + } + } +} +impl std::fmt::Debug for BodyPart { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 BodyPart { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for BodyPart { + type Output = BodyPart; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for BodyPart { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for BodyPart { + #[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 BodyPart {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs new file mode 100644 index 00000000..138d6fd1 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs @@ -0,0 +1,100 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum BytesOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct Bytes<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for Bytes<'a> { + type Inner = Bytes<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> Bytes<'a> { + pub const VT_B: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + Bytes { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args BytesArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = BytesBuilder::new(_fbb); + if let Some(x) = args.b { builder.add_b(x); } + builder.finish() + } + + + #[inline] + pub fn b(&self) -> Option<&'a [u8]> { + self._tab.get::>>(Bytes::VT_B, None).map(|v| v.safe_slice()) + } +} + +impl flatbuffers::Verifiable for Bytes<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>("b", Self::VT_B, false)? + .finish(); + Ok(()) + } +} +pub struct BytesArgs<'a> { + pub b: Option>>, +} +impl<'a> Default for BytesArgs<'a> { + #[inline] + fn default() -> Self { + BytesArgs { + b: None, + } + } +} + +pub struct BytesBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> BytesBuilder<'a, 'b> { + #[inline] + pub fn add_b(&mut self, b: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(Bytes::VT_B, b); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> BytesBuilder<'a, 'b> { + let start = _fbb.start_table(); + BytesBuilder { + 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 std::fmt::Debug for Bytes<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("Bytes"); + ds.field("b", &self.b()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs index 454b9dbe..9b0216c2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs @@ -1,112 +1,108 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -/// A unique ID for the device. IDs are not guaranteed to be the same after -/// the connection is terminated. -// struct DeviceId, aligned to 1 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct DeviceId(pub [u8; 1]); -impl Default for DeviceId { - fn default() -> Self { - Self([0; 1]) - } -} -impl core::fmt::Debug for DeviceId { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("DeviceId") - .field("id", &self.id()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for DeviceId {} -impl flatbuffers::SafeSliceAccess for DeviceId {} -impl<'a> flatbuffers::Follow<'a> for DeviceId { - type Inner = &'a DeviceId; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a DeviceId>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a DeviceId { - type Inner = &'a DeviceId; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for DeviceId { - type Output = DeviceId; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const DeviceId as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b DeviceId { - type Output = DeviceId; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const DeviceId as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for DeviceId { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> DeviceId { - #[allow(clippy::too_many_arguments)] - pub fn new( - id: u8, - ) -> Self { - let mut s = Self([0; 1]); - s.set_id(id); - s - } - - pub fn id(&self) -> u8 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_id(&mut self, x: u8) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const u8 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// A unique ID for the device. IDs are not guaranteed to be the same after +/// the connection is terminated. +// struct DeviceId, aligned to 1 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct DeviceId(pub [u8; 1]); +impl Default for DeviceId { + fn default() -> Self { + Self([0; 1]) + } +} +impl std::fmt::Debug for DeviceId { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("DeviceId") + .field("id", &self.id()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for DeviceId {} +impl flatbuffers::SafeSliceAccess for DeviceId {} +impl<'a> flatbuffers::Follow<'a> for DeviceId { + type Inner = &'a DeviceId; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a DeviceId>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a DeviceId { + type Inner = &'a DeviceId; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for DeviceId { + type Output = DeviceId; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const DeviceId as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b DeviceId { + type Output = DeviceId; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const DeviceId as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for DeviceId { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> DeviceId { + #[allow(clippy::too_many_arguments)] + pub fn new( + id: u8, + ) -> Self { + let mut s = Self([0; 1]); + s.set_id(id); + s + } + + pub fn id(&self) -> u8 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_id(&mut self, x: u8) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const u8 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs index 60992db2..ba6f4d53 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs @@ -1,102 +1,98 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_FILTERING_TYPE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_FILTERING_TYPE: u8 = 2; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_FILTERING_TYPE: [FilteringType; 3] = [ - FilteringType::NONE, - FilteringType::SMOOTHING, - FilteringType::PREDICTION, -]; - -/// Used for filtering tracker rotations in software -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct FilteringType(pub u8); -#[allow(non_upper_case_globals)] -impl FilteringType { - pub const NONE: Self = Self(0); - pub const SMOOTHING: Self = Self(1); - pub const PREDICTION: Self = Self(2); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 2; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::SMOOTHING, - Self::PREDICTION, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::SMOOTHING => Some("SMOOTHING"), - Self::PREDICTION => Some("PREDICTION"), - _ => None, - } - } -} -impl core::fmt::Debug for FilteringType { - 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 FilteringType { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for FilteringType { - type Output = FilteringType; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for FilteringType { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for FilteringType { - #[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 FilteringType {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_FILTERING_TYPE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_FILTERING_TYPE: u8 = 2; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_FILTERING_TYPE: [FilteringType; 3] = [ + FilteringType::NONE, + FilteringType::SMOOTHING, + FilteringType::PREDICTION, +]; + +/// Used for filtering tracker rotations in software +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct FilteringType(pub u8); +#[allow(non_upper_case_globals)] +impl FilteringType { + pub const NONE: Self = Self(0); + pub const SMOOTHING: Self = Self(1); + pub const PREDICTION: Self = Self(2); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 2; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::SMOOTHING, + Self::PREDICTION, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::SMOOTHING => Some("SMOOTHING"), + Self::PREDICTION => Some("PREDICTION"), + _ => None, + } + } +} +impl std::fmt::Debug for FilteringType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 FilteringType { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for FilteringType { + type Output = FilteringType; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for FilteringType { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for FilteringType { + #[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 FilteringType {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs index cb3714cc..b6b3238d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs @@ -1,106 +1,102 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_FIRMWARE_ERROR_CODE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_FIRMWARE_ERROR_CODE: 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_FIRMWARE_ERROR_CODE: [FirmwareErrorCode; 4] = [ - FirmwareErrorCode::Other, - FirmwareErrorCode::Disconnected, - FirmwareErrorCode::Occluded, - FirmwareErrorCode::ImuError, -]; - -/// A list of error codes for error conditions on the device -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct FirmwareErrorCode(pub u8); -#[allow(non_upper_case_globals)] -impl FirmwareErrorCode { - pub const Other: Self = Self(0); - pub const Disconnected: Self = Self(1); - pub const Occluded: Self = Self(2); - pub const ImuError: Self = Self(3); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 3; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Other, - Self::Disconnected, - Self::Occluded, - Self::ImuError, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Other => Some("Other"), - Self::Disconnected => Some("Disconnected"), - Self::Occluded => Some("Occluded"), - Self::ImuError => Some("ImuError"), - _ => None, - } - } -} -impl core::fmt::Debug for FirmwareErrorCode { - 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 FirmwareErrorCode { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for FirmwareErrorCode { - type Output = FirmwareErrorCode; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for FirmwareErrorCode { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for FirmwareErrorCode { - #[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 FirmwareErrorCode {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_FIRMWARE_ERROR_CODE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_FIRMWARE_ERROR_CODE: 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_FIRMWARE_ERROR_CODE: [FirmwareErrorCode; 4] = [ + FirmwareErrorCode::Other, + FirmwareErrorCode::Disconnected, + FirmwareErrorCode::Occluded, + FirmwareErrorCode::ImuError, +]; + +/// A list of error codes for error conditions on the device +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct FirmwareErrorCode(pub u8); +#[allow(non_upper_case_globals)] +impl FirmwareErrorCode { + pub const Other: Self = Self(0); + pub const Disconnected: Self = Self(1); + pub const Occluded: Self = Self(2); + pub const ImuError: Self = Self(3); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 3; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Other, + Self::Disconnected, + Self::Occluded, + Self::ImuError, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Other => Some("Other"), + Self::Disconnected => Some("Disconnected"), + Self::Occluded => Some("Occluded"), + Self::ImuError => Some("ImuError"), + _ => None, + } + } +} +impl std::fmt::Debug for FirmwareErrorCode { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 FirmwareErrorCode { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for FirmwareErrorCode { + type Output = FirmwareErrorCode; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for FirmwareErrorCode { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for FirmwareErrorCode { + #[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 FirmwareErrorCode {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs index 060c60e8..b1605dc8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs @@ -1,189 +1,185 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 FirmwareStatusMaskOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// A mask of the data in `FirmwareStatus` -pub struct FirmwareStatusMask<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for FirmwareStatusMask<'a> { - type Inner = FirmwareStatusMask<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> FirmwareStatusMask<'a> { - pub const VT_ERROR_STATUS: flatbuffers::VOffsetT = 4; - pub const VT_TPS: flatbuffers::VOffsetT = 6; - pub const VT_PING: flatbuffers::VOffsetT = 8; - pub const VT_RSSI: flatbuffers::VOffsetT = 10; - pub const VT_MCU_TEMP: flatbuffers::VOffsetT = 12; - pub const VT_BATTERY_VOLTAGE: flatbuffers::VOffsetT = 14; - pub const VT_BATTERY_PCT_ESTIMATE: flatbuffers::VOffsetT = 16; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - FirmwareStatusMask { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args FirmwareStatusMaskArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = FirmwareStatusMaskBuilder::new(_fbb); - builder.add_battery_pct_estimate(args.battery_pct_estimate); - builder.add_battery_voltage(args.battery_voltage); - builder.add_mcu_temp(args.mcu_temp); - builder.add_rssi(args.rssi); - builder.add_ping(args.ping); - builder.add_tps(args.tps); - builder.add_error_status(args.error_status); - builder.finish() - } - - - #[inline] - pub fn error_status(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_ERROR_STATUS, Some(false)).unwrap() - } - #[inline] - pub fn tps(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_TPS, Some(false)).unwrap() - } - #[inline] - pub fn ping(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_PING, Some(false)).unwrap() - } - #[inline] - pub fn rssi(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_RSSI, Some(false)).unwrap() - } - #[inline] - pub fn mcu_temp(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_MCU_TEMP, Some(false)).unwrap() - } - #[inline] - pub fn battery_voltage(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_BATTERY_VOLTAGE, Some(false)).unwrap() - } - #[inline] - pub fn battery_pct_estimate(&self) -> bool { - self._tab.get::(FirmwareStatusMask::VT_BATTERY_PCT_ESTIMATE, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for FirmwareStatusMask<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("error_status", Self::VT_ERROR_STATUS, false)? - .visit_field::("tps", Self::VT_TPS, false)? - .visit_field::("ping", Self::VT_PING, false)? - .visit_field::("rssi", Self::VT_RSSI, false)? - .visit_field::("mcu_temp", Self::VT_MCU_TEMP, false)? - .visit_field::("battery_voltage", Self::VT_BATTERY_VOLTAGE, false)? - .visit_field::("battery_pct_estimate", Self::VT_BATTERY_PCT_ESTIMATE, false)? - .finish(); - Ok(()) - } -} -pub struct FirmwareStatusMaskArgs { - pub error_status: bool, - pub tps: bool, - pub ping: bool, - pub rssi: bool, - pub mcu_temp: bool, - pub battery_voltage: bool, - pub battery_pct_estimate: bool, -} -impl<'a> Default for FirmwareStatusMaskArgs { - #[inline] - fn default() -> Self { - FirmwareStatusMaskArgs { - error_status: false, - tps: false, - ping: false, - rssi: false, - mcu_temp: false, - battery_voltage: false, - battery_pct_estimate: false, - } - } -} - -pub struct FirmwareStatusMaskBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> FirmwareStatusMaskBuilder<'a, 'b> { - #[inline] - pub fn add_error_status(&mut self, error_status: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_ERROR_STATUS, error_status, false); - } - #[inline] - pub fn add_tps(&mut self, tps: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_TPS, tps, false); - } - #[inline] - pub fn add_ping(&mut self, ping: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_PING, ping, false); - } - #[inline] - pub fn add_rssi(&mut self, rssi: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_RSSI, rssi, false); - } - #[inline] - pub fn add_mcu_temp(&mut self, mcu_temp: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_MCU_TEMP, mcu_temp, false); - } - #[inline] - pub fn add_battery_voltage(&mut self, battery_voltage: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_BATTERY_VOLTAGE, battery_voltage, false); - } - #[inline] - pub fn add_battery_pct_estimate(&mut self, battery_pct_estimate: bool) { - self.fbb_.push_slot::(FirmwareStatusMask::VT_BATTERY_PCT_ESTIMATE, battery_pct_estimate, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FirmwareStatusMaskBuilder<'a, 'b> { - let start = _fbb.start_table(); - FirmwareStatusMaskBuilder { - 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 FirmwareStatusMask<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("FirmwareStatusMask"); - ds.field("error_status", &self.error_status()); - ds.field("tps", &self.tps()); - ds.field("ping", &self.ping()); - ds.field("rssi", &self.rssi()); - ds.field("mcu_temp", &self.mcu_temp()); - ds.field("battery_voltage", &self.battery_voltage()); - ds.field("battery_pct_estimate", &self.battery_pct_estimate()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum FirmwareStatusMaskOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// A mask of the data in `FirmwareStatus` +pub struct FirmwareStatusMask<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for FirmwareStatusMask<'a> { + type Inner = FirmwareStatusMask<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> FirmwareStatusMask<'a> { + pub const VT_ERROR_STATUS: flatbuffers::VOffsetT = 4; + pub const VT_TPS: flatbuffers::VOffsetT = 6; + pub const VT_PING: flatbuffers::VOffsetT = 8; + pub const VT_RSSI: flatbuffers::VOffsetT = 10; + pub const VT_MCU_TEMP: flatbuffers::VOffsetT = 12; + pub const VT_BATTERY_VOLTAGE: flatbuffers::VOffsetT = 14; + pub const VT_BATTERY_PCT_ESTIMATE: flatbuffers::VOffsetT = 16; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + FirmwareStatusMask { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args FirmwareStatusMaskArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = FirmwareStatusMaskBuilder::new(_fbb); + builder.add_battery_pct_estimate(args.battery_pct_estimate); + builder.add_battery_voltage(args.battery_voltage); + builder.add_mcu_temp(args.mcu_temp); + builder.add_rssi(args.rssi); + builder.add_ping(args.ping); + builder.add_tps(args.tps); + builder.add_error_status(args.error_status); + builder.finish() + } + + + #[inline] + pub fn error_status(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_ERROR_STATUS, Some(false)).unwrap() + } + #[inline] + pub fn tps(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_TPS, Some(false)).unwrap() + } + #[inline] + pub fn ping(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_PING, Some(false)).unwrap() + } + #[inline] + pub fn rssi(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_RSSI, Some(false)).unwrap() + } + #[inline] + pub fn mcu_temp(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_MCU_TEMP, Some(false)).unwrap() + } + #[inline] + pub fn battery_voltage(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_BATTERY_VOLTAGE, Some(false)).unwrap() + } + #[inline] + pub fn battery_pct_estimate(&self) -> bool { + self._tab.get::(FirmwareStatusMask::VT_BATTERY_PCT_ESTIMATE, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for FirmwareStatusMask<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("error_status", Self::VT_ERROR_STATUS, false)? + .visit_field::("tps", Self::VT_TPS, false)? + .visit_field::("ping", Self::VT_PING, false)? + .visit_field::("rssi", Self::VT_RSSI, false)? + .visit_field::("mcu_temp", Self::VT_MCU_TEMP, false)? + .visit_field::("battery_voltage", Self::VT_BATTERY_VOLTAGE, false)? + .visit_field::("battery_pct_estimate", Self::VT_BATTERY_PCT_ESTIMATE, false)? + .finish(); + Ok(()) + } +} +pub struct FirmwareStatusMaskArgs { + pub error_status: bool, + pub tps: bool, + pub ping: bool, + pub rssi: bool, + pub mcu_temp: bool, + pub battery_voltage: bool, + pub battery_pct_estimate: bool, +} +impl<'a> Default for FirmwareStatusMaskArgs { + #[inline] + fn default() -> Self { + FirmwareStatusMaskArgs { + error_status: false, + tps: false, + ping: false, + rssi: false, + mcu_temp: false, + battery_voltage: false, + battery_pct_estimate: false, + } + } +} + +pub struct FirmwareStatusMaskBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> FirmwareStatusMaskBuilder<'a, 'b> { + #[inline] + pub fn add_error_status(&mut self, error_status: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_ERROR_STATUS, error_status, false); + } + #[inline] + pub fn add_tps(&mut self, tps: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_TPS, tps, false); + } + #[inline] + pub fn add_ping(&mut self, ping: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_PING, ping, false); + } + #[inline] + pub fn add_rssi(&mut self, rssi: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_RSSI, rssi, false); + } + #[inline] + pub fn add_mcu_temp(&mut self, mcu_temp: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_MCU_TEMP, mcu_temp, false); + } + #[inline] + pub fn add_battery_voltage(&mut self, battery_voltage: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_BATTERY_VOLTAGE, battery_voltage, false); + } + #[inline] + pub fn add_battery_pct_estimate(&mut self, battery_pct_estimate: bool) { + self.fbb_.push_slot::(FirmwareStatusMask::VT_BATTERY_PCT_ESTIMATE, battery_pct_estimate, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FirmwareStatusMaskBuilder<'a, 'b> { + let start = _fbb.start_table(); + FirmwareStatusMaskBuilder { + 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 std::fmt::Debug for FirmwareStatusMask<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("FirmwareStatusMask"); + ds.field("error_status", &self.error_status()); + ds.field("tps", &self.tps()); + ds.field("ping", &self.ping()); + ds.field("rssi", &self.rssi()); + ds.field("mcu_temp", &self.mcu_temp()); + ds.field("battery_voltage", &self.battery_voltage()); + ds.field("battery_pct_estimate", &self.battery_pct_estimate()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs index 5c8b39da..4c9c51e2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs @@ -1,113 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -/// A MAC address or a bluetooth address, or some other uniquely identifying address -/// associated with the endpoint that we are communicating with. If it doesn't take -/// up the full set of bytes, it is aligned towards the least significant bits. -// struct HardwareAddress, aligned to 8 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct HardwareAddress(pub [u8; 8]); -impl Default for HardwareAddress { - fn default() -> Self { - Self([0; 8]) - } -} -impl core::fmt::Debug for HardwareAddress { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("HardwareAddress") - .field("addr", &self.addr()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for HardwareAddress {} -impl flatbuffers::SafeSliceAccess for HardwareAddress {} -impl<'a> flatbuffers::Follow<'a> for HardwareAddress { - type Inner = &'a HardwareAddress; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a HardwareAddress>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a HardwareAddress { - type Inner = &'a HardwareAddress; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for HardwareAddress { - type Output = HardwareAddress; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const HardwareAddress as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b HardwareAddress { - type Output = HardwareAddress; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const HardwareAddress as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for HardwareAddress { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> HardwareAddress { - #[allow(clippy::too_many_arguments)] - pub fn new( - addr: u64, - ) -> Self { - let mut s = Self([0; 8]); - s.set_addr(addr); - s - } - - pub fn addr(&self) -> u64 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_addr(&mut self, x: u64) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const u64 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// A MAC address or a bluetooth address, or some other uniquely identifying address +/// associated with the endpoint that we are communicating with. If it doesn't take +/// up the full set of bytes, it is aligned towards the least significant bits. +// struct HardwareAddress, aligned to 8 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct HardwareAddress(pub [u8; 8]); +impl Default for HardwareAddress { + fn default() -> Self { + Self([0; 8]) + } +} +impl std::fmt::Debug for HardwareAddress { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("HardwareAddress") + .field("addr", &self.addr()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for HardwareAddress {} +impl flatbuffers::SafeSliceAccess for HardwareAddress {} +impl<'a> flatbuffers::Follow<'a> for HardwareAddress { + type Inner = &'a HardwareAddress; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a HardwareAddress>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a HardwareAddress { + type Inner = &'a HardwareAddress; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for HardwareAddress { + type Output = HardwareAddress; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const HardwareAddress as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b HardwareAddress { + type Output = HardwareAddress; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const HardwareAddress as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for HardwareAddress { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> HardwareAddress { + #[allow(clippy::too_many_arguments)] + pub fn new( + addr: u64, + ) -> Self { + let mut s = Self([0; 8]); + s.set_addr(addr); + s + } + + pub fn addr(&self) -> u64 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_addr(&mut self, x: u64) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const u64 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs index 01544ca9..41098369 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs @@ -1,208 +1,204 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 HardwareInfoOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Mostly static info about the device's hardware/firmware. -pub struct HardwareInfo<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for HardwareInfo<'a> { - type Inner = HardwareInfo<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> HardwareInfo<'a> { - pub const VT_MCU_ID: flatbuffers::VOffsetT = 4; - pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 6; - pub const VT_MODEL: flatbuffers::VOffsetT = 8; - pub const VT_MANUFACTURER: flatbuffers::VOffsetT = 10; - pub const VT_HARDWARE_REVISION: flatbuffers::VOffsetT = 12; - pub const VT_FIRMWARE_VERSION: flatbuffers::VOffsetT = 14; - pub const VT_HARDWARE_ADDRESS: flatbuffers::VOffsetT = 16; - pub const VT_IP_ADDRESS: flatbuffers::VOffsetT = 18; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HardwareInfo { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args HardwareInfoArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HardwareInfoBuilder::new(_fbb); - if let Some(x) = args.ip_address { builder.add_ip_address(x); } - if let Some(x) = args.hardware_address { builder.add_hardware_address(x); } - if let Some(x) = args.firmware_version { builder.add_firmware_version(x); } - if let Some(x) = args.hardware_revision { builder.add_hardware_revision(x); } - if let Some(x) = args.manufacturer { builder.add_manufacturer(x); } - if let Some(x) = args.model { builder.add_model(x); } - if let Some(x) = args.display_name { builder.add_display_name(x); } - builder.add_mcu_id(args.mcu_id); - builder.finish() - } - - - #[inline] - pub fn mcu_id(&self) -> McuType { - self._tab.get::(HardwareInfo::VT_MCU_ID, Some(McuType::Other)).unwrap() - } - /// A human-friendly name to display as the name of the device. - #[inline] - pub fn display_name(&self) -> Option<&'a str> { - self._tab.get::>(HardwareInfo::VT_DISPLAY_NAME, None) - } - /// A human-friendly string for the device model. - #[inline] - pub fn model(&self) -> Option<&'a str> { - self._tab.get::>(HardwareInfo::VT_MODEL, None) - } - /// A human-friendly string for the manufacturer of the device. - #[inline] - pub fn manufacturer(&self) -> Option<&'a str> { - self._tab.get::>(HardwareInfo::VT_MANUFACTURER, None) - } - /// The hardware version of the device. For example, pcb version. - #[inline] - pub fn hardware_revision(&self) -> Option<&'a str> { - self._tab.get::>(HardwareInfo::VT_HARDWARE_REVISION, None) - } - /// The version of the slimevr firmware that the device is running. - #[inline] - pub fn firmware_version(&self) -> Option<&'a str> { - self._tab.get::>(HardwareInfo::VT_FIRMWARE_VERSION, None) - } - #[inline] - pub fn hardware_address(&self) -> Option<&'a HardwareAddress> { - self._tab.get::(HardwareInfo::VT_HARDWARE_ADDRESS, None) - } - #[inline] - pub fn ip_address(&self) -> Option<&'a super::Ipv4Address> { - self._tab.get::(HardwareInfo::VT_IP_ADDRESS, None) - } -} - -impl flatbuffers::Verifiable for HardwareInfo<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("mcu_id", Self::VT_MCU_ID, false)? - .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? - .visit_field::>("model", Self::VT_MODEL, false)? - .visit_field::>("manufacturer", Self::VT_MANUFACTURER, false)? - .visit_field::>("hardware_revision", Self::VT_HARDWARE_REVISION, false)? - .visit_field::>("firmware_version", Self::VT_FIRMWARE_VERSION, false)? - .visit_field::("hardware_address", Self::VT_HARDWARE_ADDRESS, false)? - .visit_field::("ip_address", Self::VT_IP_ADDRESS, false)? - .finish(); - Ok(()) - } -} -pub struct HardwareInfoArgs<'a> { - pub mcu_id: McuType, - pub display_name: Option>, - pub model: Option>, - pub manufacturer: Option>, - pub hardware_revision: Option>, - pub firmware_version: Option>, - pub hardware_address: Option<&'a HardwareAddress>, - pub ip_address: Option<&'a super::Ipv4Address>, -} -impl<'a> Default for HardwareInfoArgs<'a> { - #[inline] - fn default() -> Self { - HardwareInfoArgs { - mcu_id: McuType::Other, - display_name: None, - model: None, - manufacturer: None, - hardware_revision: None, - firmware_version: None, - hardware_address: None, - ip_address: None, - } - } -} - -pub struct HardwareInfoBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> HardwareInfoBuilder<'a, 'b> { - #[inline] - pub fn add_mcu_id(&mut self, mcu_id: McuType) { - self.fbb_.push_slot::(HardwareInfo::VT_MCU_ID, mcu_id, McuType::Other); - } - #[inline] - pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_DISPLAY_NAME, display_name); - } - #[inline] - pub fn add_model(&mut self, model: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_MODEL, model); - } - #[inline] - pub fn add_manufacturer(&mut self, manufacturer: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_MANUFACTURER, manufacturer); - } - #[inline] - pub fn add_hardware_revision(&mut self, hardware_revision: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_HARDWARE_REVISION, hardware_revision); - } - #[inline] - pub fn add_firmware_version(&mut self, firmware_version: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(HardwareInfo::VT_FIRMWARE_VERSION, firmware_version); - } - #[inline] - pub fn add_hardware_address(&mut self, hardware_address: &HardwareAddress) { - self.fbb_.push_slot_always::<&HardwareAddress>(HardwareInfo::VT_HARDWARE_ADDRESS, hardware_address); - } - #[inline] - pub fn add_ip_address(&mut self, ip_address: &super::Ipv4Address) { - self.fbb_.push_slot_always::<&super::Ipv4Address>(HardwareInfo::VT_IP_ADDRESS, ip_address); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HardwareInfoBuilder<'a, 'b> { - let start = _fbb.start_table(); - HardwareInfoBuilder { - 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 HardwareInfo<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HardwareInfo"); - ds.field("mcu_id", &self.mcu_id()); - ds.field("display_name", &self.display_name()); - ds.field("model", &self.model()); - ds.field("manufacturer", &self.manufacturer()); - ds.field("hardware_revision", &self.hardware_revision()); - ds.field("firmware_version", &self.firmware_version()); - ds.field("hardware_address", &self.hardware_address()); - ds.field("ip_address", &self.ip_address()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum HardwareInfoOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Mostly static info about the device's hardware/firmware. +pub struct HardwareInfo<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for HardwareInfo<'a> { + type Inner = HardwareInfo<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> HardwareInfo<'a> { + pub const VT_MCU_ID: flatbuffers::VOffsetT = 4; + pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 6; + pub const VT_MODEL: flatbuffers::VOffsetT = 8; + pub const VT_MANUFACTURER: flatbuffers::VOffsetT = 10; + pub const VT_HARDWARE_REVISION: flatbuffers::VOffsetT = 12; + pub const VT_FIRMWARE_VERSION: flatbuffers::VOffsetT = 14; + pub const VT_HARDWARE_ADDRESS: flatbuffers::VOffsetT = 16; + pub const VT_IP_ADDRESS: flatbuffers::VOffsetT = 18; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HardwareInfo { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args HardwareInfoArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = HardwareInfoBuilder::new(_fbb); + if let Some(x) = args.ip_address { builder.add_ip_address(x); } + if let Some(x) = args.hardware_address { builder.add_hardware_address(x); } + if let Some(x) = args.firmware_version { builder.add_firmware_version(x); } + if let Some(x) = args.hardware_revision { builder.add_hardware_revision(x); } + if let Some(x) = args.manufacturer { builder.add_manufacturer(x); } + if let Some(x) = args.model { builder.add_model(x); } + if let Some(x) = args.display_name { builder.add_display_name(x); } + builder.add_mcu_id(args.mcu_id); + builder.finish() + } + + + #[inline] + pub fn mcu_id(&self) -> McuType { + self._tab.get::(HardwareInfo::VT_MCU_ID, Some(McuType::Other)).unwrap() + } + /// A human-friendly name to display as the name of the device. + #[inline] + pub fn display_name(&self) -> Option<&'a str> { + self._tab.get::>(HardwareInfo::VT_DISPLAY_NAME, None) + } + /// A human-friendly string for the device model. + #[inline] + pub fn model(&self) -> Option<&'a str> { + self._tab.get::>(HardwareInfo::VT_MODEL, None) + } + /// A human-friendly string for the manufacturer of the device. + #[inline] + pub fn manufacturer(&self) -> Option<&'a str> { + self._tab.get::>(HardwareInfo::VT_MANUFACTURER, None) + } + /// The hardware version of the device. For example, pcb version. + #[inline] + pub fn hardware_revision(&self) -> Option<&'a str> { + self._tab.get::>(HardwareInfo::VT_HARDWARE_REVISION, None) + } + /// The version of the slimevr firmware that the device is running. + #[inline] + pub fn firmware_version(&self) -> Option<&'a str> { + self._tab.get::>(HardwareInfo::VT_FIRMWARE_VERSION, None) + } + #[inline] + pub fn hardware_address(&self) -> Option<&'a HardwareAddress> { + self._tab.get::(HardwareInfo::VT_HARDWARE_ADDRESS, None) + } + #[inline] + pub fn ip_address(&self) -> Option<&'a super::Ipv4Address> { + self._tab.get::(HardwareInfo::VT_IP_ADDRESS, None) + } +} + +impl flatbuffers::Verifiable for HardwareInfo<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("mcu_id", Self::VT_MCU_ID, false)? + .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? + .visit_field::>("model", Self::VT_MODEL, false)? + .visit_field::>("manufacturer", Self::VT_MANUFACTURER, false)? + .visit_field::>("hardware_revision", Self::VT_HARDWARE_REVISION, false)? + .visit_field::>("firmware_version", Self::VT_FIRMWARE_VERSION, false)? + .visit_field::("hardware_address", Self::VT_HARDWARE_ADDRESS, false)? + .visit_field::("ip_address", Self::VT_IP_ADDRESS, false)? + .finish(); + Ok(()) + } +} +pub struct HardwareInfoArgs<'a> { + pub mcu_id: McuType, + pub display_name: Option>, + pub model: Option>, + pub manufacturer: Option>, + pub hardware_revision: Option>, + pub firmware_version: Option>, + pub hardware_address: Option<&'a HardwareAddress>, + pub ip_address: Option<&'a super::Ipv4Address>, +} +impl<'a> Default for HardwareInfoArgs<'a> { + #[inline] + fn default() -> Self { + HardwareInfoArgs { + mcu_id: McuType::Other, + display_name: None, + model: None, + manufacturer: None, + hardware_revision: None, + firmware_version: None, + hardware_address: None, + ip_address: None, + } + } +} + +pub struct HardwareInfoBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> HardwareInfoBuilder<'a, 'b> { + #[inline] + pub fn add_mcu_id(&mut self, mcu_id: McuType) { + self.fbb_.push_slot::(HardwareInfo::VT_MCU_ID, mcu_id, McuType::Other); + } + #[inline] + pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_DISPLAY_NAME, display_name); + } + #[inline] + pub fn add_model(&mut self, model: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_MODEL, model); + } + #[inline] + pub fn add_manufacturer(&mut self, manufacturer: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_MANUFACTURER, manufacturer); + } + #[inline] + pub fn add_hardware_revision(&mut self, hardware_revision: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_HARDWARE_REVISION, hardware_revision); + } + #[inline] + pub fn add_firmware_version(&mut self, firmware_version: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(HardwareInfo::VT_FIRMWARE_VERSION, firmware_version); + } + #[inline] + pub fn add_hardware_address(&mut self, hardware_address: &HardwareAddress) { + self.fbb_.push_slot_always::<&HardwareAddress>(HardwareInfo::VT_HARDWARE_ADDRESS, hardware_address); + } + #[inline] + pub fn add_ip_address(&mut self, ip_address: &super::Ipv4Address) { + self.fbb_.push_slot_always::<&super::Ipv4Address>(HardwareInfo::VT_IP_ADDRESS, ip_address); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HardwareInfoBuilder<'a, 'b> { + let start = _fbb.start_table(); + HardwareInfoBuilder { + 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 std::fmt::Debug for HardwareInfo<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("HardwareInfo"); + ds.field("mcu_id", &self.mcu_id()); + ds.field("display_name", &self.display_name()); + ds.field("model", &self.model()); + ds.field("manufacturer", &self.manufacturer()); + ds.field("hardware_revision", &self.hardware_revision()); + ds.field("firmware_version", &self.firmware_version()); + ds.field("hardware_address", &self.hardware_address()); + ds.field("ip_address", &self.ip_address()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs index 3b7c309d..1515f470 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs @@ -1,205 +1,201 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 HardwareStatusOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Mostly-dynamic status info about a tracked device's firmware -pub struct HardwareStatus<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for HardwareStatus<'a> { - type Inner = HardwareStatus<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> HardwareStatus<'a> { - pub const VT_ERROR_STATUS: flatbuffers::VOffsetT = 4; - pub const VT_TPS: flatbuffers::VOffsetT = 6; - pub const VT_PING: flatbuffers::VOffsetT = 8; - pub const VT_RSSI: flatbuffers::VOffsetT = 10; - pub const VT_MCU_TEMP: flatbuffers::VOffsetT = 12; - pub const VT_BATTERY_VOLTAGE: flatbuffers::VOffsetT = 14; - pub const VT_BATTERY_PCT_ESTIMATE: flatbuffers::VOffsetT = 16; - pub const VT_LOG_DATA: flatbuffers::VOffsetT = 18; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HardwareStatus { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args HardwareStatusArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = HardwareStatusBuilder::new(_fbb); - if let Some(x) = args.log_data { builder.add_log_data(x); } - if let Some(x) = args.battery_voltage { builder.add_battery_voltage(x); } - if let Some(x) = args.mcu_temp { builder.add_mcu_temp(x); } - if let Some(x) = args.rssi { builder.add_rssi(x); } - if let Some(x) = args.ping { builder.add_ping(x); } - if let Some(x) = args.battery_pct_estimate { builder.add_battery_pct_estimate(x); } - if let Some(x) = args.tps { builder.add_tps(x); } - if let Some(x) = args.error_status { builder.add_error_status(x); } - builder.finish() - } - - - #[inline] - pub fn error_status(&self) -> Option { - self._tab.get::(HardwareStatus::VT_ERROR_STATUS, None) - } - #[inline] - pub fn tps(&self) -> Option { - self._tab.get::(HardwareStatus::VT_TPS, None) - } - #[inline] - pub fn ping(&self) -> Option { - self._tab.get::(HardwareStatus::VT_PING, None) - } - /// “Received Signal Strength Indicator" between device and wifi adapter in dBm - #[inline] - pub fn rssi(&self) -> Option { - self._tab.get::(HardwareStatus::VT_RSSI, None) - } - /// Temperature in degrees celsius - #[inline] - pub fn mcu_temp(&self) -> Option { - self._tab.get::(HardwareStatus::VT_MCU_TEMP, None) - } - #[inline] - pub fn battery_voltage(&self) -> Option { - self._tab.get::(HardwareStatus::VT_BATTERY_VOLTAGE, None) - } - #[inline] - pub fn battery_pct_estimate(&self) -> Option { - self._tab.get::(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, None) - } - #[inline] - pub fn log_data(&self) -> Option> { - self._tab.get::>(HardwareStatus::VT_LOG_DATA, None) - } -} - -impl flatbuffers::Verifiable for HardwareStatus<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("error_status", Self::VT_ERROR_STATUS, false)? - .visit_field::("tps", Self::VT_TPS, false)? - .visit_field::("ping", Self::VT_PING, false)? - .visit_field::("rssi", Self::VT_RSSI, false)? - .visit_field::("mcu_temp", Self::VT_MCU_TEMP, false)? - .visit_field::("battery_voltage", Self::VT_BATTERY_VOLTAGE, false)? - .visit_field::("battery_pct_estimate", Self::VT_BATTERY_PCT_ESTIMATE, false)? - .visit_field::>("log_data", Self::VT_LOG_DATA, false)? - .finish(); - Ok(()) - } -} -pub struct HardwareStatusArgs<'a> { - pub error_status: Option, - pub tps: Option, - pub ping: Option, - pub rssi: Option, - pub mcu_temp: Option, - pub battery_voltage: Option, - pub battery_pct_estimate: Option, - pub log_data: Option>>, -} -impl<'a> Default for HardwareStatusArgs<'a> { - #[inline] - fn default() -> Self { - HardwareStatusArgs { - error_status: None, - tps: None, - ping: None, - rssi: None, - mcu_temp: None, - battery_voltage: None, - battery_pct_estimate: None, - log_data: None, - } - } -} - -pub struct HardwareStatusBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> HardwareStatusBuilder<'a, 'b> { - #[inline] - pub fn add_error_status(&mut self, error_status: super::FirmwareErrorCode) { - self.fbb_.push_slot_always::(HardwareStatus::VT_ERROR_STATUS, error_status); - } - #[inline] - pub fn add_tps(&mut self, tps: u8) { - self.fbb_.push_slot_always::(HardwareStatus::VT_TPS, tps); - } - #[inline] - pub fn add_ping(&mut self, ping: u16) { - self.fbb_.push_slot_always::(HardwareStatus::VT_PING, ping); - } - #[inline] - pub fn add_rssi(&mut self, rssi: i16) { - self.fbb_.push_slot_always::(HardwareStatus::VT_RSSI, rssi); - } - #[inline] - pub fn add_mcu_temp(&mut self, mcu_temp: f32) { - self.fbb_.push_slot_always::(HardwareStatus::VT_MCU_TEMP, mcu_temp); - } - #[inline] - pub fn add_battery_voltage(&mut self, battery_voltage: f32) { - self.fbb_.push_slot_always::(HardwareStatus::VT_BATTERY_VOLTAGE, battery_voltage); - } - #[inline] - pub fn add_battery_pct_estimate(&mut self, battery_pct_estimate: u8) { - self.fbb_.push_slot_always::(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, battery_pct_estimate); - } - #[inline] - pub fn add_log_data(&mut self, log_data: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(HardwareStatus::VT_LOG_DATA, log_data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HardwareStatusBuilder<'a, 'b> { - let start = _fbb.start_table(); - HardwareStatusBuilder { - 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 HardwareStatus<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HardwareStatus"); - ds.field("error_status", &self.error_status()); - ds.field("tps", &self.tps()); - ds.field("ping", &self.ping()); - ds.field("rssi", &self.rssi()); - ds.field("mcu_temp", &self.mcu_temp()); - ds.field("battery_voltage", &self.battery_voltage()); - ds.field("battery_pct_estimate", &self.battery_pct_estimate()); - ds.field("log_data", &self.log_data()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum HardwareStatusOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Mostly-dynamic status info about a tracked device's firmware +pub struct HardwareStatus<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for HardwareStatus<'a> { + type Inner = HardwareStatus<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> HardwareStatus<'a> { + pub const VT_ERROR_STATUS: flatbuffers::VOffsetT = 4; + pub const VT_TPS: flatbuffers::VOffsetT = 6; + pub const VT_PING: flatbuffers::VOffsetT = 8; + pub const VT_RSSI: flatbuffers::VOffsetT = 10; + pub const VT_MCU_TEMP: flatbuffers::VOffsetT = 12; + pub const VT_BATTERY_VOLTAGE: flatbuffers::VOffsetT = 14; + pub const VT_BATTERY_PCT_ESTIMATE: flatbuffers::VOffsetT = 16; + pub const VT_LOG_DATA: flatbuffers::VOffsetT = 18; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HardwareStatus { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args HardwareStatusArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = HardwareStatusBuilder::new(_fbb); + if let Some(x) = args.log_data { builder.add_log_data(x); } + if let Some(x) = args.battery_voltage { builder.add_battery_voltage(x); } + if let Some(x) = args.mcu_temp { builder.add_mcu_temp(x); } + if let Some(x) = args.rssi { builder.add_rssi(x); } + if let Some(x) = args.ping { builder.add_ping(x); } + if let Some(x) = args.battery_pct_estimate { builder.add_battery_pct_estimate(x); } + if let Some(x) = args.tps { builder.add_tps(x); } + if let Some(x) = args.error_status { builder.add_error_status(x); } + builder.finish() + } + + + #[inline] + pub fn error_status(&self) -> Option { + self._tab.get::(HardwareStatus::VT_ERROR_STATUS, None) + } + #[inline] + pub fn tps(&self) -> Option { + self._tab.get::(HardwareStatus::VT_TPS, None) + } + #[inline] + pub fn ping(&self) -> Option { + self._tab.get::(HardwareStatus::VT_PING, None) + } + /// “Received Signal Strength Indicator" between device and wifi adapter in dBm + #[inline] + pub fn rssi(&self) -> Option { + self._tab.get::(HardwareStatus::VT_RSSI, None) + } + /// Temperature in degrees celsius + #[inline] + pub fn mcu_temp(&self) -> Option { + self._tab.get::(HardwareStatus::VT_MCU_TEMP, None) + } + #[inline] + pub fn battery_voltage(&self) -> Option { + self._tab.get::(HardwareStatus::VT_BATTERY_VOLTAGE, None) + } + #[inline] + pub fn battery_pct_estimate(&self) -> Option { + self._tab.get::(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, None) + } + #[inline] + pub fn log_data(&self) -> Option> { + self._tab.get::>(HardwareStatus::VT_LOG_DATA, None) + } +} + +impl flatbuffers::Verifiable for HardwareStatus<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("error_status", Self::VT_ERROR_STATUS, false)? + .visit_field::("tps", Self::VT_TPS, false)? + .visit_field::("ping", Self::VT_PING, false)? + .visit_field::("rssi", Self::VT_RSSI, false)? + .visit_field::("mcu_temp", Self::VT_MCU_TEMP, false)? + .visit_field::("battery_voltage", Self::VT_BATTERY_VOLTAGE, false)? + .visit_field::("battery_pct_estimate", Self::VT_BATTERY_PCT_ESTIMATE, false)? + .visit_field::>("log_data", Self::VT_LOG_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct HardwareStatusArgs<'a> { + pub error_status: Option, + pub tps: Option, + pub ping: Option, + pub rssi: Option, + pub mcu_temp: Option, + pub battery_voltage: Option, + pub battery_pct_estimate: Option, + pub log_data: Option>>, +} +impl<'a> Default for HardwareStatusArgs<'a> { + #[inline] + fn default() -> Self { + HardwareStatusArgs { + error_status: None, + tps: None, + ping: None, + rssi: None, + mcu_temp: None, + battery_voltage: None, + battery_pct_estimate: None, + log_data: None, + } + } +} + +pub struct HardwareStatusBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> HardwareStatusBuilder<'a, 'b> { + #[inline] + pub fn add_error_status(&mut self, error_status: super::FirmwareErrorCode) { + self.fbb_.push_slot_always::(HardwareStatus::VT_ERROR_STATUS, error_status); + } + #[inline] + pub fn add_tps(&mut self, tps: u8) { + self.fbb_.push_slot_always::(HardwareStatus::VT_TPS, tps); + } + #[inline] + pub fn add_ping(&mut self, ping: u16) { + self.fbb_.push_slot_always::(HardwareStatus::VT_PING, ping); + } + #[inline] + pub fn add_rssi(&mut self, rssi: i16) { + self.fbb_.push_slot_always::(HardwareStatus::VT_RSSI, rssi); + } + #[inline] + pub fn add_mcu_temp(&mut self, mcu_temp: f32) { + self.fbb_.push_slot_always::(HardwareStatus::VT_MCU_TEMP, mcu_temp); + } + #[inline] + pub fn add_battery_voltage(&mut self, battery_voltage: f32) { + self.fbb_.push_slot_always::(HardwareStatus::VT_BATTERY_VOLTAGE, battery_voltage); + } + #[inline] + pub fn add_battery_pct_estimate(&mut self, battery_pct_estimate: u8) { + self.fbb_.push_slot_always::(HardwareStatus::VT_BATTERY_PCT_ESTIMATE, battery_pct_estimate); + } + #[inline] + pub fn add_log_data(&mut self, log_data: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(HardwareStatus::VT_LOG_DATA, log_data); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HardwareStatusBuilder<'a, 'b> { + let start = _fbb.start_table(); + HardwareStatusBuilder { + 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 std::fmt::Debug for HardwareStatus<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("HardwareStatus"); + ds.field("error_status", &self.error_status()); + ds.field("tps", &self.tps()); + ds.field("ping", &self.ping()); + ds.field("rssi", &self.rssi()); + ds.field("mcu_temp", &self.mcu_temp()); + ds.field("battery_voltage", &self.battery_voltage()); + ds.field("battery_pct_estimate", &self.battery_pct_estimate()); + ds.field("log_data", &self.log_data()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs index e6c22e93..9b26d5c1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs @@ -1,113 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_IMU_TYPE: u16 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_IMU_TYPE: u16 = 5; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_IMU_TYPE: [ImuType; 6] = [ - ImuType::Other, - ImuType::BNO085, - ImuType::BNO080, - ImuType::MPU6050, - ImuType::MPU9250, - ImuType::MPU6500, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ImuType(pub u16); -#[allow(non_upper_case_globals)] -impl ImuType { - pub const Other: Self = Self(0); - pub const BNO085: Self = Self(1); - pub const BNO080: Self = Self(2); - pub const MPU6050: Self = Self(3); - pub const MPU9250: Self = Self(4); - pub const MPU6500: Self = Self(5); - - pub const ENUM_MIN: u16 = 0; - pub const ENUM_MAX: u16 = 5; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Other, - Self::BNO085, - Self::BNO080, - Self::MPU6050, - Self::MPU9250, - Self::MPU6500, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Other => Some("Other"), - Self::BNO085 => Some("BNO085"), - Self::BNO080 => Some("BNO080"), - Self::MPU6050 => Some("MPU6050"), - Self::MPU9250 => Some("MPU9250"), - Self::MPU6500 => Some("MPU6500"), - _ => None, - } - } -} -impl core::fmt::Debug for ImuType { - 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 ImuType { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for ImuType { - type Output = ImuType; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for ImuType { - #[inline] - fn to_little_endian(self) -> Self { - let b = u16::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u16::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ImuType { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - u16::run_verifier(v, pos) - } -} - -impl flatbuffers::SimpleToVerifyInSlice for ImuType {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_IMU_TYPE: u16 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_IMU_TYPE: u16 = 5; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_IMU_TYPE: [ImuType; 6] = [ + ImuType::Other, + ImuType::BNO085, + ImuType::BNO080, + ImuType::MPU6050, + ImuType::MPU9250, + ImuType::MPU6500, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct ImuType(pub u16); +#[allow(non_upper_case_globals)] +impl ImuType { + pub const Other: Self = Self(0); + pub const BNO085: Self = Self(1); + pub const BNO080: Self = Self(2); + pub const MPU6050: Self = Self(3); + pub const MPU9250: Self = Self(4); + pub const MPU6500: Self = Self(5); + + pub const ENUM_MIN: u16 = 0; + pub const ENUM_MAX: u16 = 5; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Other, + Self::BNO085, + Self::BNO080, + Self::MPU6050, + Self::MPU9250, + Self::MPU6500, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Other => Some("Other"), + Self::BNO085 => Some("BNO085"), + Self::BNO080 => Some("BNO080"), + Self::MPU6050 => Some("MPU6050"), + Self::MPU9250 => Some("MPU9250"), + Self::MPU6500 => Some("MPU6500"), + _ => None, + } + } +} +impl std::fmt::Debug for ImuType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 ImuType { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for ImuType { + type Output = ImuType; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for ImuType { + #[inline] + fn to_little_endian(self) -> Self { + let b = u16::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u16::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for ImuType { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + u16::run_verifier(v, pos) + } +} + +impl flatbuffers::SimpleToVerifyInSlice for ImuType {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs index ddcfcc48..cf4c8280 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs @@ -1,109 +1,105 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_MCU_TYPE: u16 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_MCU_TYPE: u16 = 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_MCU_TYPE: [McuType; 5] = [ - McuType::Other, - McuType::ESP8266, - McuType::ESP32_S2, - McuType::ESP32_S3, - McuType::ESP32_C3, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct McuType(pub u16); -#[allow(non_upper_case_globals)] -impl McuType { - pub const Other: Self = Self(0); - pub const ESP8266: Self = Self(1); - pub const ESP32_S2: Self = Self(2); - pub const ESP32_S3: Self = Self(3); - pub const ESP32_C3: Self = Self(4); - - pub const ENUM_MIN: u16 = 0; - pub const ENUM_MAX: u16 = 4; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Other, - Self::ESP8266, - Self::ESP32_S2, - Self::ESP32_S3, - Self::ESP32_C3, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Other => Some("Other"), - Self::ESP8266 => Some("ESP8266"), - Self::ESP32_S2 => Some("ESP32_S2"), - Self::ESP32_S3 => Some("ESP32_S3"), - Self::ESP32_C3 => Some("ESP32_C3"), - _ => None, - } - } -} -impl core::fmt::Debug for McuType { - 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 McuType { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for McuType { - type Output = McuType; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for McuType { - #[inline] - fn to_little_endian(self) -> Self { - let b = u16::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u16::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for McuType { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - u16::run_verifier(v, pos) - } -} - -impl flatbuffers::SimpleToVerifyInSlice for McuType {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_MCU_TYPE: u16 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_MCU_TYPE: u16 = 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_MCU_TYPE: [McuType; 5] = [ + McuType::Other, + McuType::ESP8266, + McuType::ESP32_S2, + McuType::ESP32_S3, + McuType::ESP32_C3, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct McuType(pub u16); +#[allow(non_upper_case_globals)] +impl McuType { + pub const Other: Self = Self(0); + pub const ESP8266: Self = Self(1); + pub const ESP32_S2: Self = Self(2); + pub const ESP32_S3: Self = Self(3); + pub const ESP32_C3: Self = Self(4); + + pub const ENUM_MIN: u16 = 0; + pub const ENUM_MAX: u16 = 4; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Other, + Self::ESP8266, + Self::ESP32_S2, + Self::ESP32_S3, + Self::ESP32_C3, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Other => Some("Other"), + Self::ESP8266 => Some("ESP8266"), + Self::ESP32_S2 => Some("ESP32_S2"), + Self::ESP32_S3 => Some("ESP32_S3"), + Self::ESP32_C3 => Some("ESP32_C3"), + _ => None, + } + } +} +impl std::fmt::Debug for McuType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 McuType { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for McuType { + type Output = McuType; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for McuType { + #[inline] + fn to_little_endian(self) -> Self { + let b = u16::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u16::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for McuType { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + u16::run_verifier(v, pos) + } +} + +impl flatbuffers::SimpleToVerifyInSlice for McuType {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs index 3ab7f493..75f8801c 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs @@ -1,111 +1,107 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -/// Frequency as 32 bit float -// struct HzF32, aligned to 4 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct HzF32(pub [u8; 4]); -impl Default for HzF32 { - fn default() -> Self { - Self([0; 4]) - } -} -impl core::fmt::Debug for HzF32 { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("HzF32") - .field("f", &self.f()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for HzF32 {} -impl flatbuffers::SafeSliceAccess for HzF32 {} -impl<'a> flatbuffers::Follow<'a> for HzF32 { - type Inner = &'a HzF32; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a HzF32>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a HzF32 { - type Inner = &'a HzF32; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for HzF32 { - type Output = HzF32; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const HzF32 as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b HzF32 { - type Output = HzF32; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const HzF32 as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for HzF32 { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> HzF32 { - #[allow(clippy::too_many_arguments)] - pub fn new( - f: f32, - ) -> Self { - let mut s = Self([0; 4]); - s.set_f(f); - s - } - - pub fn f(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_f(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// Frequency as 32 bit float +// struct HzF32, aligned to 4 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct HzF32(pub [u8; 4]); +impl Default for HzF32 { + fn default() -> Self { + Self([0; 4]) + } +} +impl std::fmt::Debug for HzF32 { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("HzF32") + .field("f", &self.f()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for HzF32 {} +impl flatbuffers::SafeSliceAccess for HzF32 {} +impl<'a> flatbuffers::Follow<'a> for HzF32 { + type Inner = &'a HzF32; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a HzF32>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a HzF32 { + type Inner = &'a HzF32; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for HzF32 { + type Output = HzF32; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const HzF32 as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b HzF32 { + type Output = HzF32; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const HzF32 as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for HzF32 { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> HzF32 { + #[allow(clippy::too_many_arguments)] + pub fn new( + f: f32, + ) -> Self { + let mut s = Self([0; 4]); + s.set_f(f); + s + } + + pub fn f(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_f(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs index 9fca7bc4..3cb299e2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs @@ -1,11 +1,7 @@ // automatically generated by the FlatBuffers compiler, do not modify -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 std::mem; +use std::cmp::Ordering; use self::flatbuffers::{EndianScalar, Follow}; use super::*; /// The 4 bytes of an ip address are stored in 32 bits in big endian order. @@ -19,8 +15,8 @@ impl Default for Ipv4Address { Self([0; 4]) } } -impl core::fmt::Debug for Ipv4Address { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { +impl std::fmt::Debug for Ipv4Address { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.debug_struct("Ipv4Address") .field("addr", &self.addr()) .finish() @@ -48,7 +44,7 @@ impl<'b> flatbuffers::Push for Ipv4Address { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::core::slice::from_raw_parts(self as *const Ipv4Address as *const u8, Self::size()) + ::std::slice::from_raw_parts(self as *const Ipv4Address as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -59,7 +55,7 @@ impl<'b> flatbuffers::Push for &'b Ipv4Address { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Ipv4Address as *const u8, Self::size()) + ::std::slice::from_raw_parts(*self as *const Ipv4Address as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs index ede0c828..5d6e46ef 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs @@ -1,119 +1,115 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 LogDataOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// General purpose logging datatype -pub struct LogData<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for LogData<'a> { - type Inner = LogData<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> LogData<'a> { - pub const VT_MESSAGE: flatbuffers::VOffsetT = 4; - pub const VT_DATA: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - LogData { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args LogDataArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = LogDataBuilder::new(_fbb); - if let Some(x) = args.data { builder.add_data(x); } - if let Some(x) = args.message { builder.add_message(x); } - builder.finish() - } - - - #[inline] - pub fn message(&self) -> Option<&'a str> { - self._tab.get::>(LogData::VT_MESSAGE, None) - } - #[inline] - pub fn data(&self) -> Option<&'a [u8]> { - self._tab.get::>>(LogData::VT_DATA, None).map(|v| v.safe_slice()) - } -} - -impl flatbuffers::Verifiable for LogData<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("message", Self::VT_MESSAGE, false)? - .visit_field::>>("data", Self::VT_DATA, false)? - .finish(); - Ok(()) - } -} -pub struct LogDataArgs<'a> { - pub message: Option>, - pub data: Option>>, -} -impl<'a> Default for LogDataArgs<'a> { - #[inline] - fn default() -> Self { - LogDataArgs { - message: None, - data: None, - } - } -} - -pub struct LogDataBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> LogDataBuilder<'a, 'b> { - #[inline] - pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(LogData::VT_MESSAGE, message); - } - #[inline] - pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(LogData::VT_DATA, data); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LogDataBuilder<'a, 'b> { - let start = _fbb.start_table(); - LogDataBuilder { - 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 LogData<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("LogData"); - ds.field("message", &self.message()); - ds.field("data", &self.data()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum LogDataOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// General purpose logging datatype +pub struct LogData<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for LogData<'a> { + type Inner = LogData<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> LogData<'a> { + pub const VT_MESSAGE: flatbuffers::VOffsetT = 4; + pub const VT_DATA: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + LogData { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args LogDataArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = LogDataBuilder::new(_fbb); + if let Some(x) = args.data { builder.add_data(x); } + if let Some(x) = args.message { builder.add_message(x); } + builder.finish() + } + + + #[inline] + pub fn message(&self) -> Option<&'a str> { + self._tab.get::>(LogData::VT_MESSAGE, None) + } + #[inline] + pub fn data(&self) -> Option<&'a [u8]> { + self._tab.get::>>(LogData::VT_DATA, None).map(|v| v.safe_slice()) + } +} + +impl flatbuffers::Verifiable for LogData<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("message", Self::VT_MESSAGE, false)? + .visit_field::>>("data", Self::VT_DATA, false)? + .finish(); + Ok(()) + } +} +pub struct LogDataArgs<'a> { + pub message: Option>, + pub data: Option>>, +} +impl<'a> Default for LogDataArgs<'a> { + #[inline] + fn default() -> Self { + LogDataArgs { + message: None, + data: None, + } + } +} + +pub struct LogDataBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> LogDataBuilder<'a, 'b> { + #[inline] + pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(LogData::VT_MESSAGE, message); + } + #[inline] + pub fn add_data(&mut self, data: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(LogData::VT_DATA, data); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> LogDataBuilder<'a, 'b> { + let start = _fbb.start_table(); + LogDataBuilder { + 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 std::fmt::Debug for LogData<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("LogData"); + ds.field("message", &self.message()); + ds.field("data", &self.data()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs index d0a87f2d..7f832de0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs @@ -1,188 +1,184 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -// struct Quat, aligned to 4 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct Quat(pub [u8; 16]); -impl Default for Quat { - fn default() -> Self { - Self([0; 16]) - } -} -impl core::fmt::Debug for Quat { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("Quat") - .field("x", &self.x()) - .field("y", &self.y()) - .field("z", &self.z()) - .field("w", &self.w()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for Quat {} -impl flatbuffers::SafeSliceAccess for Quat {} -impl<'a> flatbuffers::Follow<'a> for Quat { - type Inner = &'a Quat; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a Quat>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a Quat { - type Inner = &'a Quat; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for Quat { - type Output = Quat; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Quat as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Quat { - type Output = Quat; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Quat as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for Quat { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> Quat { - #[allow(clippy::too_many_arguments)] - pub fn new( - x: f32, - y: f32, - z: f32, - w: f32, - ) -> Self { - let mut s = Self([0; 16]); - s.set_x(x); - s.set_y(y); - s.set_z(z); - s.set_w(w); - s - } - - pub fn x(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_x(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - - pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[4..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_y(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[4..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - - pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[8..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_z(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[8..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - - pub fn w(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[12..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_w(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[12..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +// struct Quat, aligned to 4 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct Quat(pub [u8; 16]); +impl Default for Quat { + fn default() -> Self { + Self([0; 16]) + } +} +impl std::fmt::Debug for Quat { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("Quat") + .field("x", &self.x()) + .field("y", &self.y()) + .field("z", &self.z()) + .field("w", &self.w()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for Quat {} +impl flatbuffers::SafeSliceAccess for Quat {} +impl<'a> flatbuffers::Follow<'a> for Quat { + type Inner = &'a Quat; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a Quat>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a Quat { + type Inner = &'a Quat; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for Quat { + type Output = Quat; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const Quat as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b Quat { + type Output = Quat; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const Quat as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for Quat { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> Quat { + #[allow(clippy::too_many_arguments)] + pub fn new( + x: f32, + y: f32, + z: f32, + w: f32, + ) -> Self { + let mut s = Self([0; 16]); + s.set_x(x); + s.set_y(y); + s.set_z(z); + s.set_w(w); + s + } + + pub fn x(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_x(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + + pub fn y(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[4..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_y(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[4..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + + pub fn z(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[8..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_z(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[8..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + + pub fn w(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[12..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_w(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[12..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs index 60349862..3ca9f13f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs @@ -1,162 +1,158 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -// struct Vec3f, aligned to 4 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct Vec3f(pub [u8; 12]); -impl Default for Vec3f { - fn default() -> Self { - Self([0; 12]) - } -} -impl core::fmt::Debug for Vec3f { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("Vec3f") - .field("x", &self.x()) - .field("y", &self.y()) - .field("z", &self.z()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for Vec3f {} -impl flatbuffers::SafeSliceAccess for Vec3f {} -impl<'a> flatbuffers::Follow<'a> for Vec3f { - type Inner = &'a Vec3f; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a Vec3f>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a Vec3f { - type Inner = &'a Vec3f; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for Vec3f { - type Output = Vec3f; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Vec3f as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Vec3f { - type Output = Vec3f; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Vec3f as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for Vec3f { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> Vec3f { - #[allow(clippy::too_many_arguments)] - pub fn new( - x: f32, - y: f32, - z: f32, - ) -> Self { - let mut s = Self([0; 12]); - s.set_x(x); - s.set_y(y); - s.set_z(z); - s - } - - pub fn x(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_x(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - - pub fn y(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[4..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_y(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[4..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - - pub fn z(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[8..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_z(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[8..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +// struct Vec3f, aligned to 4 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct Vec3f(pub [u8; 12]); +impl Default for Vec3f { + fn default() -> Self { + Self([0; 12]) + } +} +impl std::fmt::Debug for Vec3f { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("Vec3f") + .field("x", &self.x()) + .field("y", &self.y()) + .field("z", &self.z()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for Vec3f {} +impl flatbuffers::SafeSliceAccess for Vec3f {} +impl<'a> flatbuffers::Follow<'a> for Vec3f { + type Inner = &'a Vec3f; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a Vec3f>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a Vec3f { + type Inner = &'a Vec3f; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for Vec3f { + type Output = Vec3f; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const Vec3f as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b Vec3f { + type Output = Vec3f; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const Vec3f as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for Vec3f { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> Vec3f { + #[allow(clippy::too_many_arguments)] + pub fn new( + x: f32, + y: f32, + z: f32, + ) -> Self { + let mut s = Self([0; 12]); + s.set_x(x); + s.set_y(y); + s.set_z(z); + s + } + + pub fn x(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_x(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + + pub fn y(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[4..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_y(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[4..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + + pub fn z(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[8..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_z(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[8..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs new file mode 100644 index 00000000..ebfe499b --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs @@ -0,0 +1,100 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum StringOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct String<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for String<'a> { + type Inner = String<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> String<'a> { + pub const VT_S: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + String { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args StringArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StringBuilder::new(_fbb); + if let Some(x) = args.s { builder.add_s(x); } + builder.finish() + } + + + #[inline] + pub fn s(&self) -> Option<&'a str> { + self._tab.get::>(String::VT_S, None) + } +} + +impl flatbuffers::Verifiable for String<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("s", Self::VT_S, false)? + .finish(); + Ok(()) + } +} +pub struct StringArgs<'a> { + pub s: Option>, +} +impl<'a> Default for StringArgs<'a> { + #[inline] + fn default() -> Self { + StringArgs { + s: None, + } + } +} + +pub struct StringBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> StringBuilder<'a, 'b> { + #[inline] + pub fn add_s(&mut self, s: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(String::VT_S, s); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StringBuilder<'a, 'b> { + let start = _fbb.start_table(); + StringBuilder { + 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 std::fmt::Debug for String<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("String"); + ds.field("s", &self.s()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs index 28abaf96..b6884285 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs @@ -1,111 +1,107 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -/// Temperature in degrees celsius -// struct Temperature, aligned to 4 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct Temperature(pub [u8; 4]); -impl Default for Temperature { - fn default() -> Self { - Self([0; 4]) - } -} -impl core::fmt::Debug for Temperature { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("Temperature") - .field("temp", &self.temp()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for Temperature {} -impl flatbuffers::SafeSliceAccess for Temperature {} -impl<'a> flatbuffers::Follow<'a> for Temperature { - type Inner = &'a Temperature; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a Temperature>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a Temperature { - type Inner = &'a Temperature; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for Temperature { - type Output = Temperature; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const Temperature as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b Temperature { - type Output = Temperature; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const Temperature as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for Temperature { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> Temperature { - #[allow(clippy::too_many_arguments)] - pub fn new( - temp: f32, - ) -> Self { - let mut s = Self([0; 4]); - s.set_temp(temp); - s - } - - pub fn temp(&self) -> f32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_temp(&mut self, x: f32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const f32 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +/// Temperature in degrees celsius +// struct Temperature, aligned to 4 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct Temperature(pub [u8; 4]); +impl Default for Temperature { + fn default() -> Self { + Self([0; 4]) + } +} +impl std::fmt::Debug for Temperature { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("Temperature") + .field("temp", &self.temp()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for Temperature {} +impl flatbuffers::SafeSliceAccess for Temperature {} +impl<'a> flatbuffers::Follow<'a> for Temperature { + type Inner = &'a Temperature; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a Temperature>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a Temperature { + type Inner = &'a Temperature; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for Temperature { + type Output = Temperature; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const Temperature as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b Temperature { + type Output = Temperature; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const Temperature as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for Temperature { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> Temperature { + #[allow(clippy::too_many_arguments)] + pub fn new( + temp: f32, + ) -> Self { + let mut s = Self([0; 4]); + s.set_temp(temp); + s + } + + pub fn temp(&self) -> f32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_temp(&mut self, x: f32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const f32 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs index 06b5296d..35a3fb75 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs @@ -1,121 +1,117 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 TrackerIdOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct TrackerId<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for TrackerId<'a> { - type Inner = TrackerId<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> TrackerId<'a> { - pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 4; - pub const VT_TRACKER_NUM: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TrackerId { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TrackerIdArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TrackerIdBuilder::new(_fbb); - if let Some(x) = args.device_id { builder.add_device_id(x); } - builder.add_tracker_num(args.tracker_num); - builder.finish() - } - - - /// The device the tracker is associated with. If there is no hardware device it is - /// associated with, this should be `null`. - #[inline] - pub fn device_id(&self) -> Option<&'a DeviceId> { - self._tab.get::(TrackerId::VT_DEVICE_ID, None) - } - /// There are possibly multiple trackers per device. This identifies which one. - #[inline] - pub fn tracker_num(&self) -> u8 { - self._tab.get::(TrackerId::VT_TRACKER_NUM, Some(0)).unwrap() - } -} - -impl flatbuffers::Verifiable for TrackerId<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("device_id", Self::VT_DEVICE_ID, false)? - .visit_field::("tracker_num", Self::VT_TRACKER_NUM, false)? - .finish(); - Ok(()) - } -} -pub struct TrackerIdArgs<'a> { - pub device_id: Option<&'a DeviceId>, - pub tracker_num: u8, -} -impl<'a> Default for TrackerIdArgs<'a> { - #[inline] - fn default() -> Self { - TrackerIdArgs { - device_id: None, - tracker_num: 0, - } - } -} - -pub struct TrackerIdBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> TrackerIdBuilder<'a, 'b> { - #[inline] - pub fn add_device_id(&mut self, device_id: &DeviceId) { - self.fbb_.push_slot_always::<&DeviceId>(TrackerId::VT_DEVICE_ID, device_id); - } - #[inline] - pub fn add_tracker_num(&mut self, tracker_num: u8) { - self.fbb_.push_slot::(TrackerId::VT_TRACKER_NUM, tracker_num, 0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerIdBuilder<'a, 'b> { - let start = _fbb.start_table(); - TrackerIdBuilder { - 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 TrackerId<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TrackerId"); - ds.field("device_id", &self.device_id()); - ds.field("tracker_num", &self.tracker_num()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TrackerIdOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct TrackerId<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TrackerId<'a> { + type Inner = TrackerId<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TrackerId<'a> { + pub const VT_DEVICE_ID: flatbuffers::VOffsetT = 4; + pub const VT_TRACKER_NUM: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TrackerId { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TrackerIdArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TrackerIdBuilder::new(_fbb); + if let Some(x) = args.device_id { builder.add_device_id(x); } + builder.add_tracker_num(args.tracker_num); + builder.finish() + } + + + /// The device the tracker is associated with. If there is no hardware device it is + /// associated with, this should be `null`. + #[inline] + pub fn device_id(&self) -> Option<&'a DeviceId> { + self._tab.get::(TrackerId::VT_DEVICE_ID, None) + } + /// There are possibly multiple trackers per device. This identifies which one. + #[inline] + pub fn tracker_num(&self) -> u8 { + self._tab.get::(TrackerId::VT_TRACKER_NUM, Some(0)).unwrap() + } +} + +impl flatbuffers::Verifiable for TrackerId<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("device_id", Self::VT_DEVICE_ID, false)? + .visit_field::("tracker_num", Self::VT_TRACKER_NUM, false)? + .finish(); + Ok(()) + } +} +pub struct TrackerIdArgs<'a> { + pub device_id: Option<&'a DeviceId>, + pub tracker_num: u8, +} +impl<'a> Default for TrackerIdArgs<'a> { + #[inline] + fn default() -> Self { + TrackerIdArgs { + device_id: None, + tracker_num: 0, + } + } +} + +pub struct TrackerIdBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TrackerIdBuilder<'a, 'b> { + #[inline] + pub fn add_device_id(&mut self, device_id: &DeviceId) { + self.fbb_.push_slot_always::<&DeviceId>(TrackerId::VT_DEVICE_ID, device_id); + } + #[inline] + pub fn add_tracker_num(&mut self, tracker_num: u8) { + self.fbb_.push_slot::(TrackerId::VT_TRACKER_NUM, tracker_num, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TrackerIdBuilder<'a, 'b> { + let start = _fbb.start_table(); + TrackerIdBuilder { + 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 std::fmt::Debug for TrackerId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TrackerId"); + ds.field("device_id", &self.device_id()); + ds.field("tracker_num", &self.tracker_num()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs index 07ce5b09..c81b793a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs @@ -1,181 +1,177 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_TRACKER_ROLE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_TRACKER_ROLE: u8 = 21; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_TRACKER_ROLE: [TrackerRole; 22] = [ - TrackerRole::NONE, - TrackerRole::WAIST, - TrackerRole::LEFT_FOOT, - TrackerRole::RIGHT_FOOT, - TrackerRole::CHEST, - TrackerRole::LEFT_KNEE, - TrackerRole::RIGHT_KNEE, - TrackerRole::LEFT_ELBOW, - TrackerRole::RIGHT_ELBOW, - TrackerRole::LEFT_SHOULDER, - TrackerRole::RIGHT_SHOULDER, - TrackerRole::LEFT_HAND, - TrackerRole::RIGHT_HAND, - TrackerRole::LEFT_CONTROLLER, - TrackerRole::RIGHT_CONTROLLER, - TrackerRole::HEAD, - TrackerRole::NECK, - TrackerRole::CAMERA, - TrackerRole::KEYBOARD, - TrackerRole::HMD, - TrackerRole::BEACON, - TrackerRole::GENERIC_CONTROLLER, -]; - -/// Possible tracker roles -/// They're not perfect match for SteamVR tracker roles, -/// because we support more possible roles. Host can -/// chose how to map it to their supported role. -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct TrackerRole(pub u8); -#[allow(non_upper_case_globals)] -impl TrackerRole { - pub const NONE: Self = Self(0); - pub const WAIST: Self = Self(1); - pub const LEFT_FOOT: Self = Self(2); - pub const RIGHT_FOOT: Self = Self(3); - pub const CHEST: Self = Self(4); - pub const LEFT_KNEE: Self = Self(5); - pub const RIGHT_KNEE: Self = Self(6); - pub const LEFT_ELBOW: Self = Self(7); - pub const RIGHT_ELBOW: Self = Self(8); - pub const LEFT_SHOULDER: Self = Self(9); - pub const RIGHT_SHOULDER: Self = Self(10); - pub const LEFT_HAND: Self = Self(11); - pub const RIGHT_HAND: Self = Self(12); - pub const LEFT_CONTROLLER: Self = Self(13); - pub const RIGHT_CONTROLLER: Self = Self(14); - pub const HEAD: Self = Self(15); - pub const NECK: Self = Self(16); - pub const CAMERA: Self = Self(17); - pub const KEYBOARD: Self = Self(18); - pub const HMD: Self = Self(19); - pub const BEACON: Self = Self(20); - pub const GENERIC_CONTROLLER: Self = Self(21); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 21; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::WAIST, - Self::LEFT_FOOT, - Self::RIGHT_FOOT, - Self::CHEST, - Self::LEFT_KNEE, - Self::RIGHT_KNEE, - Self::LEFT_ELBOW, - Self::RIGHT_ELBOW, - Self::LEFT_SHOULDER, - Self::RIGHT_SHOULDER, - Self::LEFT_HAND, - Self::RIGHT_HAND, - Self::LEFT_CONTROLLER, - Self::RIGHT_CONTROLLER, - Self::HEAD, - Self::NECK, - Self::CAMERA, - Self::KEYBOARD, - Self::HMD, - Self::BEACON, - Self::GENERIC_CONTROLLER, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::WAIST => Some("WAIST"), - Self::LEFT_FOOT => Some("LEFT_FOOT"), - Self::RIGHT_FOOT => Some("RIGHT_FOOT"), - Self::CHEST => Some("CHEST"), - Self::LEFT_KNEE => Some("LEFT_KNEE"), - Self::RIGHT_KNEE => Some("RIGHT_KNEE"), - Self::LEFT_ELBOW => Some("LEFT_ELBOW"), - Self::RIGHT_ELBOW => Some("RIGHT_ELBOW"), - Self::LEFT_SHOULDER => Some("LEFT_SHOULDER"), - Self::RIGHT_SHOULDER => Some("RIGHT_SHOULDER"), - Self::LEFT_HAND => Some("LEFT_HAND"), - Self::RIGHT_HAND => Some("RIGHT_HAND"), - Self::LEFT_CONTROLLER => Some("LEFT_CONTROLLER"), - Self::RIGHT_CONTROLLER => Some("RIGHT_CONTROLLER"), - Self::HEAD => Some("HEAD"), - Self::NECK => Some("NECK"), - Self::CAMERA => Some("CAMERA"), - Self::KEYBOARD => Some("KEYBOARD"), - Self::HMD => Some("HMD"), - Self::BEACON => Some("BEACON"), - Self::GENERIC_CONTROLLER => Some("GENERIC_CONTROLLER"), - _ => None, - } - } -} -impl core::fmt::Debug for TrackerRole { - 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 TrackerRole { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for TrackerRole { - type Output = TrackerRole; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for TrackerRole { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for TrackerRole { - #[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 TrackerRole {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_TRACKER_ROLE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_TRACKER_ROLE: u8 = 21; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_TRACKER_ROLE: [TrackerRole; 22] = [ + TrackerRole::NONE, + TrackerRole::WAIST, + TrackerRole::LEFT_FOOT, + TrackerRole::RIGHT_FOOT, + TrackerRole::CHEST, + TrackerRole::LEFT_KNEE, + TrackerRole::RIGHT_KNEE, + TrackerRole::LEFT_ELBOW, + TrackerRole::RIGHT_ELBOW, + TrackerRole::LEFT_SHOULDER, + TrackerRole::RIGHT_SHOULDER, + TrackerRole::LEFT_HAND, + TrackerRole::RIGHT_HAND, + TrackerRole::LEFT_CONTROLLER, + TrackerRole::RIGHT_CONTROLLER, + TrackerRole::HEAD, + TrackerRole::NECK, + TrackerRole::CAMERA, + TrackerRole::KEYBOARD, + TrackerRole::HMD, + TrackerRole::BEACON, + TrackerRole::GENERIC_CONTROLLER, +]; + +/// Possible tracker roles +/// They're not perfect match for SteamVR tracker roles, +/// because we support more possible roles. Host can +/// chose how to map it to their supported role. +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct TrackerRole(pub u8); +#[allow(non_upper_case_globals)] +impl TrackerRole { + pub const NONE: Self = Self(0); + pub const WAIST: Self = Self(1); + pub const LEFT_FOOT: Self = Self(2); + pub const RIGHT_FOOT: Self = Self(3); + pub const CHEST: Self = Self(4); + pub const LEFT_KNEE: Self = Self(5); + pub const RIGHT_KNEE: Self = Self(6); + pub const LEFT_ELBOW: Self = Self(7); + pub const RIGHT_ELBOW: Self = Self(8); + pub const LEFT_SHOULDER: Self = Self(9); + pub const RIGHT_SHOULDER: Self = Self(10); + pub const LEFT_HAND: Self = Self(11); + pub const RIGHT_HAND: Self = Self(12); + pub const LEFT_CONTROLLER: Self = Self(13); + pub const RIGHT_CONTROLLER: Self = Self(14); + pub const HEAD: Self = Self(15); + pub const NECK: Self = Self(16); + pub const CAMERA: Self = Self(17); + pub const KEYBOARD: Self = Self(18); + pub const HMD: Self = Self(19); + pub const BEACON: Self = Self(20); + pub const GENERIC_CONTROLLER: Self = Self(21); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 21; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::WAIST, + Self::LEFT_FOOT, + Self::RIGHT_FOOT, + Self::CHEST, + Self::LEFT_KNEE, + Self::RIGHT_KNEE, + Self::LEFT_ELBOW, + Self::RIGHT_ELBOW, + Self::LEFT_SHOULDER, + Self::RIGHT_SHOULDER, + Self::LEFT_HAND, + Self::RIGHT_HAND, + Self::LEFT_CONTROLLER, + Self::RIGHT_CONTROLLER, + Self::HEAD, + Self::NECK, + Self::CAMERA, + Self::KEYBOARD, + Self::HMD, + Self::BEACON, + Self::GENERIC_CONTROLLER, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::WAIST => Some("WAIST"), + Self::LEFT_FOOT => Some("LEFT_FOOT"), + Self::RIGHT_FOOT => Some("RIGHT_FOOT"), + Self::CHEST => Some("CHEST"), + Self::LEFT_KNEE => Some("LEFT_KNEE"), + Self::RIGHT_KNEE => Some("RIGHT_KNEE"), + Self::LEFT_ELBOW => Some("LEFT_ELBOW"), + Self::RIGHT_ELBOW => Some("RIGHT_ELBOW"), + Self::LEFT_SHOULDER => Some("LEFT_SHOULDER"), + Self::RIGHT_SHOULDER => Some("RIGHT_SHOULDER"), + Self::LEFT_HAND => Some("LEFT_HAND"), + Self::RIGHT_HAND => Some("RIGHT_HAND"), + Self::LEFT_CONTROLLER => Some("LEFT_CONTROLLER"), + Self::RIGHT_CONTROLLER => Some("RIGHT_CONTROLLER"), + Self::HEAD => Some("HEAD"), + Self::NECK => Some("NECK"), + Self::CAMERA => Some("CAMERA"), + Self::KEYBOARD => Some("KEYBOARD"), + Self::HMD => Some("HMD"), + Self::BEACON => Some("BEACON"), + Self::GENERIC_CONTROLLER => Some("GENERIC_CONTROLLER"), + _ => None, + } + } +} +impl std::fmt::Debug for TrackerRole { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 TrackerRole { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for TrackerRole { + type Output = TrackerRole; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for TrackerRole { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for TrackerRole { + #[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 TrackerRole {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs index 78fbd2d9..aa7f32e0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs @@ -1,113 +1,109 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_TRACKER_STATUS: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_TRACKER_STATUS: u8 = 5; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -#[allow(non_camel_case_types)] -pub const ENUM_VALUES_TRACKER_STATUS: [TrackerStatus; 6] = [ - TrackerStatus::NONE, - TrackerStatus::DISCONNECTED, - TrackerStatus::OK, - TrackerStatus::BUSY, - TrackerStatus::ERROR, - TrackerStatus::OCCLUDED, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct TrackerStatus(pub u8); -#[allow(non_upper_case_globals)] -impl TrackerStatus { - pub const NONE: Self = Self(0); - pub const DISCONNECTED: Self = Self(1); - pub const OK: Self = Self(2); - pub const BUSY: Self = Self(3); - pub const ERROR: Self = Self(4); - pub const OCCLUDED: Self = Self(5); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 5; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::DISCONNECTED, - Self::OK, - Self::BUSY, - Self::ERROR, - Self::OCCLUDED, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::DISCONNECTED => Some("DISCONNECTED"), - Self::OK => Some("OK"), - Self::BUSY => Some("BUSY"), - Self::ERROR => Some("ERROR"), - Self::OCCLUDED => Some("OCCLUDED"), - _ => None, - } - } -} -impl core::fmt::Debug for TrackerStatus { - 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 TrackerStatus { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for TrackerStatus { - type Output = TrackerStatus; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for TrackerStatus { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for TrackerStatus { - #[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 TrackerStatus {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_TRACKER_STATUS: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_TRACKER_STATUS: u8 = 5; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_TRACKER_STATUS: [TrackerStatus; 6] = [ + TrackerStatus::NONE, + TrackerStatus::DISCONNECTED, + TrackerStatus::OK, + TrackerStatus::BUSY, + TrackerStatus::ERROR, + TrackerStatus::OCCLUDED, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct TrackerStatus(pub u8); +#[allow(non_upper_case_globals)] +impl TrackerStatus { + pub const NONE: Self = Self(0); + pub const DISCONNECTED: Self = Self(1); + pub const OK: Self = Self(2); + pub const BUSY: Self = Self(3); + pub const ERROR: Self = Self(4); + pub const OCCLUDED: Self = Self(5); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 5; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::DISCONNECTED, + Self::OK, + Self::BUSY, + Self::ERROR, + Self::OCCLUDED, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::DISCONNECTED => Some("DISCONNECTED"), + Self::OK => Some("OK"), + Self::BUSY => Some("BUSY"), + Self::ERROR => Some("ERROR"), + Self::OCCLUDED => Some("OCCLUDED"), + _ => None, + } + } +} +impl std::fmt::Debug for TrackerStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 TrackerStatus { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for TrackerStatus { + type Output = TrackerStatus; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for TrackerStatus { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for TrackerStatus { + #[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 TrackerStatus {} diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs index 53412a7c..3093e451 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs @@ -1,111 +1,107 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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::*; -// struct TransactionId, aligned to 4 -#[repr(transparent)] -#[derive(Clone, Copy, PartialEq)] -pub struct TransactionId(pub [u8; 4]); -impl Default for TransactionId { - fn default() -> Self { - Self([0; 4]) - } -} -impl core::fmt::Debug for TransactionId { - fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { - f.debug_struct("TransactionId") - .field("id", &self.id()) - .finish() - } -} - -impl flatbuffers::SimpleToVerifyInSlice for TransactionId {} -impl flatbuffers::SafeSliceAccess for TransactionId {} -impl<'a> flatbuffers::Follow<'a> for TransactionId { - type Inner = &'a TransactionId; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - <&'a TransactionId>::follow(buf, loc) - } -} -impl<'a> flatbuffers::Follow<'a> for &'a TransactionId { - type Inner = &'a TransactionId; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - flatbuffers::follow_cast_ref::(buf, loc) - } -} -impl<'b> flatbuffers::Push for TransactionId { - type Output = TransactionId; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(self as *const TransactionId as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} -impl<'b> flatbuffers::Push for &'b TransactionId { - type Output = TransactionId; - - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - let src = unsafe { - ::core::slice::from_raw_parts(*self as *const TransactionId as *const u8, Self::size()) - }; - dst.copy_from_slice(src); - } -} - -impl<'a> flatbuffers::Verifiable for TransactionId { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.in_buffer::(pos) - } -} - -impl<'a> TransactionId { - #[allow(clippy::too_many_arguments)] - pub fn new( - id: u32, - ) -> Self { - let mut s = Self([0; 4]); - s.set_id(id); - s - } - - /// This is expected to overflow, networking logic should handle this case. - pub fn id(&self) -> u32 { - let mut mem = core::mem::MaybeUninit::::uninit(); - unsafe { - core::ptr::copy_nonoverlapping( - self.0[0..].as_ptr(), - mem.as_mut_ptr() as *mut u8, - core::mem::size_of::(), - ); - mem.assume_init() - }.from_little_endian() - } - - pub fn set_id(&mut self, x: u32) { - let x_le = x.to_little_endian(); - unsafe { - core::ptr::copy_nonoverlapping( - &x_le as *const u32 as *const u8, - self.0[0..].as_mut_ptr(), - core::mem::size_of::(), - ); - } - } - -} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +// struct TransactionId, aligned to 4 +#[repr(transparent)] +#[derive(Clone, Copy, PartialEq)] +pub struct TransactionId(pub [u8; 4]); +impl Default for TransactionId { + fn default() -> Self { + Self([0; 4]) + } +} +impl std::fmt::Debug for TransactionId { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + f.debug_struct("TransactionId") + .field("id", &self.id()) + .finish() + } +} + +impl flatbuffers::SimpleToVerifyInSlice for TransactionId {} +impl flatbuffers::SafeSliceAccess for TransactionId {} +impl<'a> flatbuffers::Follow<'a> for TransactionId { + type Inner = &'a TransactionId; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + <&'a TransactionId>::follow(buf, loc) + } +} +impl<'a> flatbuffers::Follow<'a> for &'a TransactionId { + type Inner = &'a TransactionId; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + flatbuffers::follow_cast_ref::(buf, loc) + } +} +impl<'b> flatbuffers::Push for TransactionId { + type Output = TransactionId; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(self as *const TransactionId as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} +impl<'b> flatbuffers::Push for &'b TransactionId { + type Output = TransactionId; + + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + let src = unsafe { + ::std::slice::from_raw_parts(*self as *const TransactionId as *const u8, Self::size()) + }; + dst.copy_from_slice(src); + } +} + +impl<'a> flatbuffers::Verifiable for TransactionId { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.in_buffer::(pos) + } +} + +impl<'a> TransactionId { + #[allow(clippy::too_many_arguments)] + pub fn new( + id: u32, + ) -> Self { + let mut s = Self([0; 4]); + s.set_id(id); + s + } + + /// This is expected to overflow, networking logic should handle this case. + pub fn id(&self) -> u32 { + let mut mem = core::mem::MaybeUninit::::uninit(); + unsafe { + core::ptr::copy_nonoverlapping( + self.0[0..].as_ptr(), + mem.as_mut_ptr() as *mut u8, + core::mem::size_of::(), + ); + mem.assume_init() + }.from_little_endian() + } + + pub fn set_id(&mut self, x: u32) { + let x_le = x.to_little_endian(); + unsafe { + core::ptr::copy_nonoverlapping( + &x_le as *const u32 as *const u8, + self.0[0..].as_mut_ptr(), + core::mem::size_of::(), + ); + } + } + +} + diff --git a/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs b/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs index 2767d4a3..809ecc77 100644 --- a/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs @@ -1,120 +1,130 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 MessageBundleOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// MessageBundle contains all of the messages for the data feed system and the -/// rpc system that will be sent in one buffer. -pub struct MessageBundle<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for MessageBundle<'a> { - type Inner = MessageBundle<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> MessageBundle<'a> { - pub const VT_DATA_FEED_MSGS: flatbuffers::VOffsetT = 4; - pub const VT_RPC_MSGS: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - MessageBundle { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args MessageBundleArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = MessageBundleBuilder::new(_fbb); - if let Some(x) = args.rpc_msgs { builder.add_rpc_msgs(x); } - if let Some(x) = args.data_feed_msgs { builder.add_data_feed_msgs(x); } - builder.finish() - } - - - #[inline] - pub fn data_feed_msgs(&self) -> Option>>> { - self._tab.get::>>>(MessageBundle::VT_DATA_FEED_MSGS, None) - } - #[inline] - pub fn rpc_msgs(&self) -> Option>>> { - self._tab.get::>>>(MessageBundle::VT_RPC_MSGS, None) - } -} - -impl flatbuffers::Verifiable for MessageBundle<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("data_feed_msgs", Self::VT_DATA_FEED_MSGS, false)? - .visit_field::>>>("rpc_msgs", Self::VT_RPC_MSGS, false)? - .finish(); - Ok(()) - } -} -pub struct MessageBundleArgs<'a> { - pub data_feed_msgs: Option>>>>, - pub rpc_msgs: Option>>>>, -} -impl<'a> Default for MessageBundleArgs<'a> { - #[inline] - fn default() -> Self { - MessageBundleArgs { - data_feed_msgs: None, - rpc_msgs: None, - } - } -} - -pub struct MessageBundleBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> MessageBundleBuilder<'a, 'b> { - #[inline] - pub fn add_data_feed_msgs(&mut self, data_feed_msgs: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(MessageBundle::VT_DATA_FEED_MSGS, data_feed_msgs); - } - #[inline] - pub fn add_rpc_msgs(&mut self, rpc_msgs: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(MessageBundle::VT_RPC_MSGS, rpc_msgs); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MessageBundleBuilder<'a, 'b> { - let start = _fbb.start_table(); - MessageBundleBuilder { - 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 MessageBundle<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("MessageBundle"); - ds.field("data_feed_msgs", &self.data_feed_msgs()); - ds.field("rpc_msgs", &self.rpc_msgs()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum MessageBundleOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// MessageBundle contains all of the messages for the data feed system and the +/// rpc system that will be sent in one buffer. +pub struct MessageBundle<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for MessageBundle<'a> { + type Inner = MessageBundle<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> MessageBundle<'a> { + pub const VT_DATA_FEED_MSGS: flatbuffers::VOffsetT = 4; + pub const VT_RPC_MSGS: flatbuffers::VOffsetT = 6; + pub const VT_PUB_SUB_MSGS: flatbuffers::VOffsetT = 8; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + MessageBundle { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args MessageBundleArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = MessageBundleBuilder::new(_fbb); + if let Some(x) = args.pub_sub_msgs { builder.add_pub_sub_msgs(x); } + if let Some(x) = args.rpc_msgs { builder.add_rpc_msgs(x); } + if let Some(x) = args.data_feed_msgs { builder.add_data_feed_msgs(x); } + builder.finish() + } + + + #[inline] + pub fn data_feed_msgs(&self) -> Option>>> { + self._tab.get::>>>(MessageBundle::VT_DATA_FEED_MSGS, None) + } + #[inline] + pub fn rpc_msgs(&self) -> Option>>> { + self._tab.get::>>>(MessageBundle::VT_RPC_MSGS, None) + } + #[inline] + pub fn pub_sub_msgs(&self) -> Option>>> { + self._tab.get::>>>(MessageBundle::VT_PUB_SUB_MSGS, None) + } +} + +impl flatbuffers::Verifiable for MessageBundle<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("data_feed_msgs", Self::VT_DATA_FEED_MSGS, false)? + .visit_field::>>>("rpc_msgs", Self::VT_RPC_MSGS, false)? + .visit_field::>>>("pub_sub_msgs", Self::VT_PUB_SUB_MSGS, false)? + .finish(); + Ok(()) + } +} +pub struct MessageBundleArgs<'a> { + pub data_feed_msgs: Option>>>>, + pub rpc_msgs: Option>>>>, + pub pub_sub_msgs: Option>>>>, +} +impl<'a> Default for MessageBundleArgs<'a> { + #[inline] + fn default() -> Self { + MessageBundleArgs { + data_feed_msgs: None, + rpc_msgs: None, + pub_sub_msgs: None, + } + } +} + +pub struct MessageBundleBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> MessageBundleBuilder<'a, 'b> { + #[inline] + pub fn add_data_feed_msgs(&mut self, data_feed_msgs: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MessageBundle::VT_DATA_FEED_MSGS, data_feed_msgs); + } + #[inline] + pub fn add_rpc_msgs(&mut self, rpc_msgs: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MessageBundle::VT_RPC_MSGS, rpc_msgs); + } + #[inline] + pub fn add_pub_sub_msgs(&mut self, pub_sub_msgs: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(MessageBundle::VT_PUB_SUB_MSGS, pub_sub_msgs); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MessageBundleBuilder<'a, 'b> { + let start = _fbb.start_table(); + MessageBundleBuilder { + 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 std::fmt::Debug for MessageBundle<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("MessageBundle"); + ds.field("data_feed_msgs", &self.data_feed_msgs()); + ds.field("rpc_msgs", &self.rpc_msgs()); + ds.field("pub_sub_msgs", &self.pub_sub_msgs()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs new file mode 100644 index 00000000..48bf41ca --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs @@ -0,0 +1,114 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum KeyValuesOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct KeyValues<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for KeyValues<'a> { + type Inner = KeyValues<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> KeyValues<'a> { + pub const VT_KEYS: flatbuffers::VOffsetT = 4; + pub const VT_VALUES: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + KeyValues { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args KeyValuesArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = KeyValuesBuilder::new(_fbb); + if let Some(x) = args.values { builder.add_values(x); } + if let Some(x) = args.keys { builder.add_keys(x); } + builder.finish() + } + + + #[inline] + pub fn keys(&self) -> Option>> { + self._tab.get::>>>(KeyValues::VT_KEYS, None) + } + #[inline] + pub fn values(&self) -> Option>> { + self._tab.get::>>>(KeyValues::VT_VALUES, None) + } +} + +impl flatbuffers::Verifiable for KeyValues<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("keys", Self::VT_KEYS, false)? + .visit_field::>>>("values", Self::VT_VALUES, false)? + .finish(); + Ok(()) + } +} +pub struct KeyValuesArgs<'a> { + pub keys: Option>>>, + pub values: Option>>>, +} +impl<'a> Default for KeyValuesArgs<'a> { + #[inline] + fn default() -> Self { + KeyValuesArgs { + keys: None, + values: None, + } + } +} + +pub struct KeyValuesBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> KeyValuesBuilder<'a, 'b> { + #[inline] + pub fn add_keys(&mut self, keys: flatbuffers::WIPOffset>>) { + self.fbb_.push_slot_always::>(KeyValues::VT_KEYS, keys); + } + #[inline] + pub fn add_values(&mut self, values: flatbuffers::WIPOffset>>) { + self.fbb_.push_slot_always::>(KeyValues::VT_VALUES, values); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> KeyValuesBuilder<'a, 'b> { + let start = _fbb.start_table(); + KeyValuesBuilder { + 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 std::fmt::Debug for KeyValues<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("KeyValues"); + ds.field("keys", &self.keys()); + ds.field("values", &self.values()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs new file mode 100644 index 00000000..a06e761f --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs @@ -0,0 +1,249 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum MessageOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Data that is sent from publishers to subscribers +pub struct Message<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for Message<'a> { + type Inner = Message<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> Message<'a> { + pub const VT_TOPIC_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_TOPIC: flatbuffers::VOffsetT = 6; + pub const VT_PAYLOAD_TYPE: flatbuffers::VOffsetT = 8; + pub const VT_PAYLOAD: flatbuffers::VOffsetT = 10; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + Message { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args MessageArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = MessageBuilder::new(_fbb); + if let Some(x) = args.payload { builder.add_payload(x); } + if let Some(x) = args.topic { builder.add_topic(x); } + builder.add_payload_type(args.payload_type); + builder.add_topic_type(args.topic_type); + builder.finish() + } + + + #[inline] + pub fn topic_type(&self) -> Topic { + self._tab.get::(Message::VT_TOPIC_TYPE, Some(Topic::NONE)).unwrap() + } + #[inline] + pub fn topic(&self) -> Option> { + self._tab.get::>>(Message::VT_TOPIC, None) + } + #[inline] + pub fn payload_type(&self) -> Payload { + self._tab.get::(Message::VT_PAYLOAD_TYPE, Some(Payload::NONE)).unwrap() + } + #[inline] + pub fn payload(&self) -> Option> { + self._tab.get::>>(Message::VT_PAYLOAD, None) + } + #[inline] + #[allow(non_snake_case)] + pub fn topic_as_topic_handle(&self) -> Option> { + if self.topic_type() == Topic::TopicHandle { + self.topic().map(TopicHandle::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn topic_as_topic_id(&self) -> Option> { + if self.topic_type() == Topic::TopicId { + self.topic().map(TopicId::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn payload_as_solarxr_protocol_datatypes_string(&self) -> Option> { + if self.payload_type() == Payload::solarxr_protocol_datatypes_String { + self.payload().map(super::datatypes::String::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn payload_as_solarxr_protocol_datatypes_bytes(&self) -> Option> { + if self.payload_type() == Payload::solarxr_protocol_datatypes_Bytes { + self.payload().map(super::datatypes::Bytes::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn payload_as_key_values(&self) -> Option> { + if self.payload_type() == Payload::KeyValues { + self.payload().map(KeyValues::init_from_table) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for Message<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_union::("topic_type", Self::VT_TOPIC_TYPE, "topic", Self::VT_TOPIC, false, |key, v, pos| { + match key { + Topic::TopicHandle => v.verify_union_variant::>("Topic::TopicHandle", pos), + Topic::TopicId => v.verify_union_variant::>("Topic::TopicId", pos), + _ => Ok(()), + } + })? + .visit_union::("payload_type", Self::VT_PAYLOAD_TYPE, "payload", Self::VT_PAYLOAD, false, |key, v, pos| { + match key { + Payload::solarxr_protocol_datatypes_String => v.verify_union_variant::>("Payload::solarxr_protocol_datatypes_String", pos), + Payload::solarxr_protocol_datatypes_Bytes => v.verify_union_variant::>("Payload::solarxr_protocol_datatypes_Bytes", pos), + Payload::KeyValues => v.verify_union_variant::>("Payload::KeyValues", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct MessageArgs { + pub topic_type: Topic, + pub topic: Option>, + pub payload_type: Payload, + pub payload: Option>, +} +impl<'a> Default for MessageArgs { + #[inline] + fn default() -> Self { + MessageArgs { + topic_type: Topic::NONE, + topic: None, + payload_type: Payload::NONE, + payload: None, + } + } +} + +pub struct MessageBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> MessageBuilder<'a, 'b> { + #[inline] + pub fn add_topic_type(&mut self, topic_type: Topic) { + self.fbb_.push_slot::(Message::VT_TOPIC_TYPE, topic_type, Topic::NONE); + } + #[inline] + pub fn add_topic(&mut self, topic: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(Message::VT_TOPIC, topic); + } + #[inline] + pub fn add_payload_type(&mut self, payload_type: Payload) { + self.fbb_.push_slot::(Message::VT_PAYLOAD_TYPE, payload_type, Payload::NONE); + } + #[inline] + pub fn add_payload(&mut self, payload: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(Message::VT_PAYLOAD, payload); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> MessageBuilder<'a, 'b> { + let start = _fbb.start_table(); + MessageBuilder { + 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 std::fmt::Debug for Message<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("Message"); + ds.field("topic_type", &self.topic_type()); + match self.topic_type() { + Topic::TopicHandle => { + if let Some(x) = self.topic_as_topic_handle() { + ds.field("topic", &x) + } else { + ds.field("topic", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + Topic::TopicId => { + if let Some(x) = self.topic_as_topic_id() { + ds.field("topic", &x) + } else { + ds.field("topic", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("topic", &x) + }, + }; + ds.field("payload_type", &self.payload_type()); + match self.payload_type() { + Payload::solarxr_protocol_datatypes_String => { + if let Some(x) = self.payload_as_solarxr_protocol_datatypes_string() { + ds.field("payload", &x) + } else { + ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + Payload::solarxr_protocol_datatypes_Bytes => { + if let Some(x) = self.payload_as_solarxr_protocol_datatypes_bytes() { + ds.field("payload", &x) + } else { + ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + Payload::KeyValues => { + if let Some(x) = self.payload_as_key_values() { + ds.field("payload", &x) + } else { + ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("payload", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs new file mode 100644 index 00000000..accb02d4 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs @@ -0,0 +1,103 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_PAYLOAD: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_PAYLOAD: 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_PAYLOAD: [Payload; 4] = [ + Payload::NONE, + Payload::solarxr_protocol_datatypes_String, + Payload::solarxr_protocol_datatypes_Bytes, + Payload::KeyValues, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct Payload(pub u8); +#[allow(non_upper_case_globals)] +impl Payload { + pub const NONE: Self = Self(0); + pub const solarxr_protocol_datatypes_String: Self = Self(1); + pub const solarxr_protocol_datatypes_Bytes: Self = Self(2); + pub const KeyValues: Self = Self(3); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 3; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::solarxr_protocol_datatypes_String, + Self::solarxr_protocol_datatypes_Bytes, + Self::KeyValues, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::solarxr_protocol_datatypes_String => Some("solarxr_protocol_datatypes_String"), + Self::solarxr_protocol_datatypes_Bytes => Some("solarxr_protocol_datatypes_Bytes"), + Self::KeyValues => Some("KeyValues"), + _ => None, + } + } +} +impl std::fmt::Debug for Payload { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 Payload { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for Payload { + type Output = Payload; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for Payload { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for Payload { + #[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 Payload {} +pub struct PayloadUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs new file mode 100644 index 00000000..7c100926 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs @@ -0,0 +1,194 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum PubSubHeaderOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct PubSubHeader<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for PubSubHeader<'a> { + type Inner = PubSubHeader<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> PubSubHeader<'a> { + pub const VT_U_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_U: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + PubSubHeader { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args PubSubHeaderArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = PubSubHeaderBuilder::new(_fbb); + if let Some(x) = args.u { builder.add_u(x); } + builder.add_u_type(args.u_type); + builder.finish() + } + + + #[inline] + pub fn u_type(&self) -> PubSubUnion { + self._tab.get::(PubSubHeader::VT_U_TYPE, Some(PubSubUnion::NONE)).unwrap() + } + #[inline] + pub fn u(&self) -> Option> { + self._tab.get::>>(PubSubHeader::VT_U, None) + } + #[inline] + #[allow(non_snake_case)] + pub fn u_as_message(&self) -> Option> { + if self.u_type() == PubSubUnion::Message { + self.u().map(Message::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn u_as_subscription_request(&self) -> Option> { + if self.u_type() == PubSubUnion::SubscriptionRequest { + self.u().map(SubscriptionRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn u_as_topic_handle_request(&self) -> Option> { + if self.u_type() == PubSubUnion::TopicHandleRequest { + self.u().map(TopicHandleRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn u_as_topic_handle_response(&self) -> Option> { + if self.u_type() == PubSubUnion::TopicHandleResponse { + self.u().map(TopicHandleResponse::init_from_table) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for PubSubHeader<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_union::("u_type", Self::VT_U_TYPE, "u", Self::VT_U, false, |key, v, pos| { + match key { + PubSubUnion::Message => v.verify_union_variant::>("PubSubUnion::Message", pos), + PubSubUnion::SubscriptionRequest => v.verify_union_variant::>("PubSubUnion::SubscriptionRequest", pos), + PubSubUnion::TopicHandleRequest => v.verify_union_variant::>("PubSubUnion::TopicHandleRequest", pos), + PubSubUnion::TopicHandleResponse => v.verify_union_variant::>("PubSubUnion::TopicHandleResponse", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct PubSubHeaderArgs { + pub u_type: PubSubUnion, + pub u: Option>, +} +impl<'a> Default for PubSubHeaderArgs { + #[inline] + fn default() -> Self { + PubSubHeaderArgs { + u_type: PubSubUnion::NONE, + u: None, + } + } +} + +pub struct PubSubHeaderBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> PubSubHeaderBuilder<'a, 'b> { + #[inline] + pub fn add_u_type(&mut self, u_type: PubSubUnion) { + self.fbb_.push_slot::(PubSubHeader::VT_U_TYPE, u_type, PubSubUnion::NONE); + } + #[inline] + pub fn add_u(&mut self, u: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(PubSubHeader::VT_U, u); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> PubSubHeaderBuilder<'a, 'b> { + let start = _fbb.start_table(); + PubSubHeaderBuilder { + 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 std::fmt::Debug for PubSubHeader<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("PubSubHeader"); + ds.field("u_type", &self.u_type()); + match self.u_type() { + PubSubUnion::Message => { + if let Some(x) = self.u_as_message() { + ds.field("u", &x) + } else { + ds.field("u", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + PubSubUnion::SubscriptionRequest => { + if let Some(x) = self.u_as_subscription_request() { + ds.field("u", &x) + } else { + ds.field("u", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + PubSubUnion::TopicHandleRequest => { + if let Some(x) = self.u_as_topic_handle_request() { + ds.field("u", &x) + } else { + ds.field("u", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + PubSubUnion::TopicHandleResponse => { + if let Some(x) = self.u_as_topic_handle_response() { + ds.field("u", &x) + } else { + ds.field("u", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("u", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs new file mode 100644 index 00000000..ad95bfef --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_PUB_SUB_UNION: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_PUB_SUB_UNION: 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_PUB_SUB_UNION: [PubSubUnion; 5] = [ + PubSubUnion::NONE, + PubSubUnion::Message, + PubSubUnion::SubscriptionRequest, + PubSubUnion::TopicHandleRequest, + PubSubUnion::TopicHandleResponse, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct PubSubUnion(pub u8); +#[allow(non_upper_case_globals)] +impl PubSubUnion { + pub const NONE: Self = Self(0); + pub const Message: Self = Self(1); + pub const SubscriptionRequest: Self = Self(2); + pub const TopicHandleRequest: Self = Self(3); + pub const TopicHandleResponse: Self = Self(4); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 4; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::Message, + Self::SubscriptionRequest, + Self::TopicHandleRequest, + Self::TopicHandleResponse, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::Message => Some("Message"), + Self::SubscriptionRequest => Some("SubscriptionRequest"), + Self::TopicHandleRequest => Some("TopicHandleRequest"), + Self::TopicHandleResponse => Some("TopicHandleResponse"), + _ => None, + } + } +} +impl std::fmt::Debug for PubSubUnion { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 PubSubUnion { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for PubSubUnion { + type Output = PubSubUnion; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for PubSubUnion { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for PubSubUnion { + #[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 PubSubUnion {} +pub struct PubSubUnionUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs new file mode 100644 index 00000000..b17dd76d --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs @@ -0,0 +1,159 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SubscriptionRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests a subscription to `topic` +pub struct SubscriptionRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SubscriptionRequest<'a> { + type Inner = SubscriptionRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SubscriptionRequest<'a> { + pub const VT_TOPIC_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_TOPIC: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SubscriptionRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SubscriptionRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SubscriptionRequestBuilder::new(_fbb); + if let Some(x) = args.topic { builder.add_topic(x); } + builder.add_topic_type(args.topic_type); + builder.finish() + } + + + #[inline] + pub fn topic_type(&self) -> Topic { + self._tab.get::(SubscriptionRequest::VT_TOPIC_TYPE, Some(Topic::NONE)).unwrap() + } + #[inline] + pub fn topic(&self) -> Option> { + self._tab.get::>>(SubscriptionRequest::VT_TOPIC, None) + } + #[inline] + #[allow(non_snake_case)] + pub fn topic_as_topic_handle(&self) -> Option> { + if self.topic_type() == Topic::TopicHandle { + self.topic().map(TopicHandle::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn topic_as_topic_id(&self) -> Option> { + if self.topic_type() == Topic::TopicId { + self.topic().map(TopicId::init_from_table) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for SubscriptionRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_union::("topic_type", Self::VT_TOPIC_TYPE, "topic", Self::VT_TOPIC, false, |key, v, pos| { + match key { + Topic::TopicHandle => v.verify_union_variant::>("Topic::TopicHandle", pos), + Topic::TopicId => v.verify_union_variant::>("Topic::TopicId", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct SubscriptionRequestArgs { + pub topic_type: Topic, + pub topic: Option>, +} +impl<'a> Default for SubscriptionRequestArgs { + #[inline] + fn default() -> Self { + SubscriptionRequestArgs { + topic_type: Topic::NONE, + topic: None, + } + } +} + +pub struct SubscriptionRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SubscriptionRequestBuilder<'a, 'b> { + #[inline] + pub fn add_topic_type(&mut self, topic_type: Topic) { + self.fbb_.push_slot::(SubscriptionRequest::VT_TOPIC_TYPE, topic_type, Topic::NONE); + } + #[inline] + pub fn add_topic(&mut self, topic: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(SubscriptionRequest::VT_TOPIC, topic); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SubscriptionRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SubscriptionRequestBuilder { + 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 std::fmt::Debug for SubscriptionRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SubscriptionRequest"); + ds.field("topic_type", &self.topic_type()); + match self.topic_type() { + Topic::TopicHandle => { + if let Some(x) = self.topic_as_topic_handle() { + ds.field("topic", &x) + } else { + ds.field("topic", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + Topic::TopicId => { + if let Some(x) = self.topic_as_topic_id() { + ds.field("topic", &x) + } else { + ds.field("topic", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("topic", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs new file mode 100644 index 00000000..70a959ff --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs @@ -0,0 +1,99 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_TOPIC: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_TOPIC: u8 = 2; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +#[allow(non_camel_case_types)] +pub const ENUM_VALUES_TOPIC: [Topic; 3] = [ + Topic::NONE, + Topic::TopicHandle, + Topic::TopicId, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct Topic(pub u8); +#[allow(non_upper_case_globals)] +impl Topic { + pub const NONE: Self = Self(0); + pub const TopicHandle: Self = Self(1); + pub const TopicId: Self = Self(2); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 2; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::TopicHandle, + Self::TopicId, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::TopicHandle => Some("TopicHandle"), + Self::TopicId => Some("TopicId"), + _ => None, + } + } +} +impl std::fmt::Debug for Topic { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 Topic { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for Topic { + type Output = Topic; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for Topic { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for Topic { + #[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 Topic {} +pub struct TopicUnionTableOffset {} + diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs new file mode 100644 index 00000000..6a3f07d2 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs @@ -0,0 +1,102 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TopicHandleOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// A handle for the topic, allows referencing a topic without sending a huge +/// `TopicId`. +pub struct TopicHandle<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TopicHandle<'a> { + type Inner = TopicHandle<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TopicHandle<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TopicHandle { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TopicHandleArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = TopicHandleBuilder::new(_fbb); + builder.add_id(args.id); + builder.finish() + } + + + #[inline] + pub fn id(&self) -> u16 { + self._tab.get::(TopicHandle::VT_ID, Some(0)).unwrap() + } +} + +impl flatbuffers::Verifiable for TopicHandle<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("id", Self::VT_ID, false)? + .finish(); + Ok(()) + } +} +pub struct TopicHandleArgs { + pub id: u16, +} +impl<'a> Default for TopicHandleArgs { + #[inline] + fn default() -> Self { + TopicHandleArgs { + id: 0, + } + } +} + +pub struct TopicHandleBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TopicHandleBuilder<'a, 'b> { + #[inline] + pub fn add_id(&mut self, id: u16) { + self.fbb_.push_slot::(TopicHandle::VT_ID, id, 0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicHandleBuilder<'a, 'b> { + let start = _fbb.start_table(); + TopicHandleBuilder { + 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 std::fmt::Debug for TopicHandle<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TopicHandle"); + ds.field("id", &self.id()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs new file mode 100644 index 00000000..e5ab69d9 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs @@ -0,0 +1,102 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TopicHandleRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing +/// bandwidth, since `FeatureId` can be large. +pub struct TopicHandleRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TopicHandleRequest<'a> { + type Inner = TopicHandleRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TopicHandleRequest<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TopicHandleRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TopicHandleRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TopicHandleRequestBuilder::new(_fbb); + if let Some(x) = args.id { builder.add_id(x); } + builder.finish() + } + + + #[inline] + pub fn id(&self) -> Option> { + self._tab.get::>(TopicHandleRequest::VT_ID, None) + } +} + +impl flatbuffers::Verifiable for TopicHandleRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("id", Self::VT_ID, false)? + .finish(); + Ok(()) + } +} +pub struct TopicHandleRequestArgs<'a> { + pub id: Option>>, +} +impl<'a> Default for TopicHandleRequestArgs<'a> { + #[inline] + fn default() -> Self { + TopicHandleRequestArgs { + id: None, + } + } +} + +pub struct TopicHandleRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TopicHandleRequestBuilder<'a, 'b> { + #[inline] + pub fn add_id(&mut self, id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TopicHandleRequest::VT_ID, id); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicHandleRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + TopicHandleRequestBuilder { + 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 std::fmt::Debug for TopicHandleRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TopicHandleRequest"); + ds.field("id", &self.id()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs new file mode 100644 index 00000000..2dff0577 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs @@ -0,0 +1,101 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TopicHandleResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Response for `TopicHandleRequest` +pub struct TopicHandleResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TopicHandleResponse<'a> { + type Inner = TopicHandleResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TopicHandleResponse<'a> { + pub const VT_HANDLE: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TopicHandleResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TopicHandleResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TopicHandleResponseBuilder::new(_fbb); + if let Some(x) = args.handle { builder.add_handle(x); } + builder.finish() + } + + + #[inline] + pub fn handle(&self) -> Option> { + self._tab.get::>(TopicHandleResponse::VT_HANDLE, None) + } +} + +impl flatbuffers::Verifiable for TopicHandleResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("handle", Self::VT_HANDLE, false)? + .finish(); + Ok(()) + } +} +pub struct TopicHandleResponseArgs<'a> { + pub handle: Option>>, +} +impl<'a> Default for TopicHandleResponseArgs<'a> { + #[inline] + fn default() -> Self { + TopicHandleResponseArgs { + handle: None, + } + } +} + +pub struct TopicHandleResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TopicHandleResponseBuilder<'a, 'b> { + #[inline] + pub fn add_handle(&mut self, handle: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TopicHandleResponse::VT_HANDLE, handle); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicHandleResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + TopicHandleResponseBuilder { + 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 std::fmt::Debug for TopicHandleResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TopicHandleResponse"); + ds.field("handle", &self.handle()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs new file mode 100644 index 00000000..9d3d2071 --- /dev/null +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs @@ -0,0 +1,139 @@ +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum TopicIdOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// A `TopicId` identifies an application-specific category of data. Because it +/// is application-specific, it is up to the application within the specified +/// organization to define its semantics/meaning. +/// +/// For example, "bob" may have an "overlay" app with a "settings" topic for controlling +/// the overlay visibility and other settings, as well as a "video feed" topic for +/// allowing other applications to display video data in a wrist mounted window in VR. +pub struct TopicId<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for TopicId<'a> { + type Inner = TopicId<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> TopicId<'a> { + pub const VT_ORGANIZATION: flatbuffers::VOffsetT = 4; + pub const VT_APP_NAME: flatbuffers::VOffsetT = 6; + pub const VT_TOPIC: flatbuffers::VOffsetT = 8; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + TopicId { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args TopicIdArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TopicIdBuilder::new(_fbb); + if let Some(x) = args.topic { builder.add_topic(x); } + if let Some(x) = args.app_name { builder.add_app_name(x); } + if let Some(x) = args.organization { builder.add_organization(x); } + builder.finish() + } + + + /// The organization/developer that defines the meaning of this feature. Avoids name + /// clashes. Should be something unique - same idea as java package identifier. + #[inline] + pub fn organization(&self) -> Option<&'a str> { + self._tab.get::>(TopicId::VT_ORGANIZATION, None) + } + /// The name of the application/device. Should be unique within the organization. + #[inline] + pub fn app_name(&self) -> Option<&'a str> { + self._tab.get::>(TopicId::VT_APP_NAME, None) + } + /// The name of the topic. Should be unique within the application. + #[inline] + pub fn topic(&self) -> Option<&'a str> { + self._tab.get::>(TopicId::VT_TOPIC, None) + } +} + +impl flatbuffers::Verifiable for TopicId<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("organization", Self::VT_ORGANIZATION, false)? + .visit_field::>("app_name", Self::VT_APP_NAME, false)? + .visit_field::>("topic", Self::VT_TOPIC, false)? + .finish(); + Ok(()) + } +} +pub struct TopicIdArgs<'a> { + pub organization: Option>, + pub app_name: Option>, + pub topic: Option>, +} +impl<'a> Default for TopicIdArgs<'a> { + #[inline] + fn default() -> Self { + TopicIdArgs { + organization: None, + app_name: None, + topic: None, + } + } +} + +pub struct TopicIdBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> TopicIdBuilder<'a, 'b> { + #[inline] + pub fn add_organization(&mut self, organization: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(TopicId::VT_ORGANIZATION, organization); + } + #[inline] + pub fn add_app_name(&mut self, app_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(TopicId::VT_APP_NAME, app_name); + } + #[inline] + pub fn add_topic(&mut self, topic: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(TopicId::VT_TOPIC, topic); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicIdBuilder<'a, 'b> { + let start = _fbb.start_table(); + TopicIdBuilder { + 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 std::fmt::Debug for TopicId<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("TopicId"); + ds.field("organization", &self.organization()); + ds.field("app_name", &self.app_name()); + ds.field("topic", &self.topic()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs index 3acb355b..73ab8fc0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs @@ -1,146 +1,142 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 AssignTrackerRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct AssignTrackerRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AssignTrackerRequest<'a> { - type Inner = AssignTrackerRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> AssignTrackerRequest<'a> { - pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; - pub const VT_BODY_POSITION: flatbuffers::VOffsetT = 6; - pub const VT_MOUNTING_ROTATION: flatbuffers::VOffsetT = 8; - pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 10; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AssignTrackerRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args AssignTrackerRequestArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = AssignTrackerRequestBuilder::new(_fbb); - if let Some(x) = args.display_name { builder.add_display_name(x); } - if let Some(x) = args.mounting_rotation { builder.add_mounting_rotation(x); } - if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } - builder.add_body_position(args.body_position); - builder.finish() - } - - - #[inline] - pub fn tracker_id(&self) -> Option> { - self._tab.get::>(AssignTrackerRequest::VT_TRACKER_ID, None) - } - #[inline] - pub fn body_position(&self) -> super::datatypes::BodyPart { - self._tab.get::(AssignTrackerRequest::VT_BODY_POSITION, Some(super::datatypes::BodyPart::NONE)).unwrap() - } - #[inline] - pub fn mounting_rotation(&self) -> Option<&'a super::datatypes::math::Quat> { - self._tab.get::(AssignTrackerRequest::VT_MOUNTING_ROTATION, None) - } - #[inline] - pub fn display_name(&self) -> Option<&'a str> { - self._tab.get::>(AssignTrackerRequest::VT_DISPLAY_NAME, None) - } -} - -impl flatbuffers::Verifiable for AssignTrackerRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("tracker_id", Self::VT_TRACKER_ID, false)? - .visit_field::("body_position", Self::VT_BODY_POSITION, false)? - .visit_field::("mounting_rotation", Self::VT_MOUNTING_ROTATION, false)? - .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? - .finish(); - Ok(()) - } -} -pub struct AssignTrackerRequestArgs<'a> { - pub tracker_id: Option>>, - pub body_position: super::datatypes::BodyPart, - pub mounting_rotation: Option<&'a super::datatypes::math::Quat>, - pub display_name: Option>, -} -impl<'a> Default for AssignTrackerRequestArgs<'a> { - #[inline] - fn default() -> Self { - AssignTrackerRequestArgs { - tracker_id: None, - body_position: super::datatypes::BodyPart::NONE, - mounting_rotation: None, - display_name: None, - } - } -} - -pub struct AssignTrackerRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AssignTrackerRequestBuilder<'a, 'b> { - #[inline] - pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(AssignTrackerRequest::VT_TRACKER_ID, tracker_id); - } - #[inline] - pub fn add_body_position(&mut self, body_position: super::datatypes::BodyPart) { - self.fbb_.push_slot::(AssignTrackerRequest::VT_BODY_POSITION, body_position, super::datatypes::BodyPart::NONE); - } - #[inline] - pub fn add_mounting_rotation(&mut self, mounting_rotation: &super::datatypes::math::Quat) { - self.fbb_.push_slot_always::<&super::datatypes::math::Quat>(AssignTrackerRequest::VT_MOUNTING_ROTATION, mounting_rotation); - } - #[inline] - pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AssignTrackerRequest::VT_DISPLAY_NAME, display_name); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AssignTrackerRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - AssignTrackerRequestBuilder { - 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 AssignTrackerRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AssignTrackerRequest"); - ds.field("tracker_id", &self.tracker_id()); - ds.field("body_position", &self.body_position()); - ds.field("mounting_rotation", &self.mounting_rotation()); - ds.field("display_name", &self.display_name()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AssignTrackerRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AssignTrackerRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AssignTrackerRequest<'a> { + type Inner = AssignTrackerRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> AssignTrackerRequest<'a> { + pub const VT_TRACKER_ID: flatbuffers::VOffsetT = 4; + pub const VT_BODY_POSITION: flatbuffers::VOffsetT = 6; + pub const VT_MOUNTING_ROTATION: flatbuffers::VOffsetT = 8; + pub const VT_DISPLAY_NAME: flatbuffers::VOffsetT = 10; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AssignTrackerRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AssignTrackerRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = AssignTrackerRequestBuilder::new(_fbb); + if let Some(x) = args.display_name { builder.add_display_name(x); } + if let Some(x) = args.mounting_rotation { builder.add_mounting_rotation(x); } + if let Some(x) = args.tracker_id { builder.add_tracker_id(x); } + builder.add_body_position(args.body_position); + builder.finish() + } + + + #[inline] + pub fn tracker_id(&self) -> Option> { + self._tab.get::>(AssignTrackerRequest::VT_TRACKER_ID, None) + } + #[inline] + pub fn body_position(&self) -> super::datatypes::BodyPart { + self._tab.get::(AssignTrackerRequest::VT_BODY_POSITION, Some(super::datatypes::BodyPart::NONE)).unwrap() + } + #[inline] + pub fn mounting_rotation(&self) -> Option<&'a super::datatypes::math::Quat> { + self._tab.get::(AssignTrackerRequest::VT_MOUNTING_ROTATION, None) + } + #[inline] + pub fn display_name(&self) -> Option<&'a str> { + self._tab.get::>(AssignTrackerRequest::VT_DISPLAY_NAME, None) + } +} + +impl flatbuffers::Verifiable for AssignTrackerRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("tracker_id", Self::VT_TRACKER_ID, false)? + .visit_field::("body_position", Self::VT_BODY_POSITION, false)? + .visit_field::("mounting_rotation", Self::VT_MOUNTING_ROTATION, false)? + .visit_field::>("display_name", Self::VT_DISPLAY_NAME, false)? + .finish(); + Ok(()) + } +} +pub struct AssignTrackerRequestArgs<'a> { + pub tracker_id: Option>>, + pub body_position: super::datatypes::BodyPart, + pub mounting_rotation: Option<&'a super::datatypes::math::Quat>, + pub display_name: Option>, +} +impl<'a> Default for AssignTrackerRequestArgs<'a> { + #[inline] + fn default() -> Self { + AssignTrackerRequestArgs { + tracker_id: None, + body_position: super::datatypes::BodyPart::NONE, + mounting_rotation: None, + display_name: None, + } + } +} + +pub struct AssignTrackerRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AssignTrackerRequestBuilder<'a, 'b> { + #[inline] + pub fn add_tracker_id(&mut self, tracker_id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(AssignTrackerRequest::VT_TRACKER_ID, tracker_id); + } + #[inline] + pub fn add_body_position(&mut self, body_position: super::datatypes::BodyPart) { + self.fbb_.push_slot::(AssignTrackerRequest::VT_BODY_POSITION, body_position, super::datatypes::BodyPart::NONE); + } + #[inline] + pub fn add_mounting_rotation(&mut self, mounting_rotation: &super::datatypes::math::Quat) { + self.fbb_.push_slot_always::<&super::datatypes::math::Quat>(AssignTrackerRequest::VT_MOUNTING_ROTATION, mounting_rotation); + } + #[inline] + pub fn add_display_name(&mut self, display_name: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(AssignTrackerRequest::VT_DISPLAY_NAME, display_name); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AssignTrackerRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AssignTrackerRequestBuilder { + 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 std::fmt::Debug for AssignTrackerRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("AssignTrackerRequest"); + ds.field("tracker_id", &self.tracker_id()); + ds.field("body_position", &self.body_position()); + ds.field("mounting_rotation", &self.mounting_rotation()); + ds.field("display_name", &self.display_name()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs index 8c0e0ddb..afeba904 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs @@ -1,146 +1,142 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 AutoBoneEpochResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct AutoBoneEpochResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneEpochResponse<'a> { - type Inner = AutoBoneEpochResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> AutoBoneEpochResponse<'a> { - pub const VT_CURRENT_EPOCH: flatbuffers::VOffsetT = 4; - pub const VT_TOTAL_EPOCHS: flatbuffers::VOffsetT = 6; - pub const VT_EPOCH_ERROR: flatbuffers::VOffsetT = 8; - pub const VT_ADJUSTED_SKELETON_PARTS: flatbuffers::VOffsetT = 10; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneEpochResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args AutoBoneEpochResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneEpochResponseBuilder::new(_fbb); - if let Some(x) = args.adjusted_skeleton_parts { builder.add_adjusted_skeleton_parts(x); } - builder.add_epoch_error(args.epoch_error); - builder.add_total_epochs(args.total_epochs); - builder.add_current_epoch(args.current_epoch); - builder.finish() - } - - - #[inline] - pub fn current_epoch(&self) -> u32 { - self._tab.get::(AutoBoneEpochResponse::VT_CURRENT_EPOCH, Some(0)).unwrap() - } - #[inline] - pub fn total_epochs(&self) -> u32 { - self._tab.get::(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, Some(0)).unwrap() - } - #[inline] - pub fn epoch_error(&self) -> f32 { - self._tab.get::(AutoBoneEpochResponse::VT_EPOCH_ERROR, Some(0.0)).unwrap() - } - #[inline] - pub fn adjusted_skeleton_parts(&self) -> Option>>> { - self._tab.get::>>>(AutoBoneEpochResponse::VT_ADJUSTED_SKELETON_PARTS, None) - } -} - -impl flatbuffers::Verifiable for AutoBoneEpochResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("current_epoch", Self::VT_CURRENT_EPOCH, false)? - .visit_field::("total_epochs", Self::VT_TOTAL_EPOCHS, false)? - .visit_field::("epoch_error", Self::VT_EPOCH_ERROR, false)? - .visit_field::>>>("adjusted_skeleton_parts", Self::VT_ADJUSTED_SKELETON_PARTS, false)? - .finish(); - Ok(()) - } -} -pub struct AutoBoneEpochResponseArgs<'a> { - pub current_epoch: u32, - pub total_epochs: u32, - pub epoch_error: f32, - pub adjusted_skeleton_parts: Option>>>>, -} -impl<'a> Default for AutoBoneEpochResponseArgs<'a> { - #[inline] - fn default() -> Self { - AutoBoneEpochResponseArgs { - current_epoch: 0, - total_epochs: 0, - epoch_error: 0.0, - adjusted_skeleton_parts: None, - } - } -} - -pub struct AutoBoneEpochResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneEpochResponseBuilder<'a, 'b> { - #[inline] - pub fn add_current_epoch(&mut self, current_epoch: u32) { - self.fbb_.push_slot::(AutoBoneEpochResponse::VT_CURRENT_EPOCH, current_epoch, 0); - } - #[inline] - pub fn add_total_epochs(&mut self, total_epochs: u32) { - self.fbb_.push_slot::(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, total_epochs, 0); - } - #[inline] - pub fn add_epoch_error(&mut self, epoch_error: f32) { - self.fbb_.push_slot::(AutoBoneEpochResponse::VT_EPOCH_ERROR, epoch_error, 0.0); - } - #[inline] - pub fn add_adjusted_skeleton_parts(&mut self, adjusted_skeleton_parts: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(AutoBoneEpochResponse::VT_ADJUSTED_SKELETON_PARTS, adjusted_skeleton_parts); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneEpochResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneEpochResponseBuilder { - 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 AutoBoneEpochResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneEpochResponse"); - ds.field("current_epoch", &self.current_epoch()); - ds.field("total_epochs", &self.total_epochs()); - ds.field("epoch_error", &self.epoch_error()); - ds.field("adjusted_skeleton_parts", &self.adjusted_skeleton_parts()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneEpochResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AutoBoneEpochResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneEpochResponse<'a> { + type Inner = AutoBoneEpochResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> AutoBoneEpochResponse<'a> { + pub const VT_CURRENT_EPOCH: flatbuffers::VOffsetT = 4; + pub const VT_TOTAL_EPOCHS: flatbuffers::VOffsetT = 6; + pub const VT_EPOCH_ERROR: flatbuffers::VOffsetT = 8; + pub const VT_ADJUSTED_SKELETON_PARTS: flatbuffers::VOffsetT = 10; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneEpochResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AutoBoneEpochResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneEpochResponseBuilder::new(_fbb); + if let Some(x) = args.adjusted_skeleton_parts { builder.add_adjusted_skeleton_parts(x); } + builder.add_epoch_error(args.epoch_error); + builder.add_total_epochs(args.total_epochs); + builder.add_current_epoch(args.current_epoch); + builder.finish() + } + + + #[inline] + pub fn current_epoch(&self) -> u32 { + self._tab.get::(AutoBoneEpochResponse::VT_CURRENT_EPOCH, Some(0)).unwrap() + } + #[inline] + pub fn total_epochs(&self) -> u32 { + self._tab.get::(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, Some(0)).unwrap() + } + #[inline] + pub fn epoch_error(&self) -> f32 { + self._tab.get::(AutoBoneEpochResponse::VT_EPOCH_ERROR, Some(0.0)).unwrap() + } + #[inline] + pub fn adjusted_skeleton_parts(&self) -> Option>>> { + self._tab.get::>>>(AutoBoneEpochResponse::VT_ADJUSTED_SKELETON_PARTS, None) + } +} + +impl flatbuffers::Verifiable for AutoBoneEpochResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("current_epoch", Self::VT_CURRENT_EPOCH, false)? + .visit_field::("total_epochs", Self::VT_TOTAL_EPOCHS, false)? + .visit_field::("epoch_error", Self::VT_EPOCH_ERROR, false)? + .visit_field::>>>("adjusted_skeleton_parts", Self::VT_ADJUSTED_SKELETON_PARTS, false)? + .finish(); + Ok(()) + } +} +pub struct AutoBoneEpochResponseArgs<'a> { + pub current_epoch: u32, + pub total_epochs: u32, + pub epoch_error: f32, + pub adjusted_skeleton_parts: Option>>>>, +} +impl<'a> Default for AutoBoneEpochResponseArgs<'a> { + #[inline] + fn default() -> Self { + AutoBoneEpochResponseArgs { + current_epoch: 0, + total_epochs: 0, + epoch_error: 0.0, + adjusted_skeleton_parts: None, + } + } +} + +pub struct AutoBoneEpochResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneEpochResponseBuilder<'a, 'b> { + #[inline] + pub fn add_current_epoch(&mut self, current_epoch: u32) { + self.fbb_.push_slot::(AutoBoneEpochResponse::VT_CURRENT_EPOCH, current_epoch, 0); + } + #[inline] + pub fn add_total_epochs(&mut self, total_epochs: u32) { + self.fbb_.push_slot::(AutoBoneEpochResponse::VT_TOTAL_EPOCHS, total_epochs, 0); + } + #[inline] + pub fn add_epoch_error(&mut self, epoch_error: f32) { + self.fbb_.push_slot::(AutoBoneEpochResponse::VT_EPOCH_ERROR, epoch_error, 0.0); + } + #[inline] + pub fn add_adjusted_skeleton_parts(&mut self, adjusted_skeleton_parts: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(AutoBoneEpochResponse::VT_ADJUSTED_SKELETON_PARTS, adjusted_skeleton_parts); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneEpochResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneEpochResponseBuilder { + 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 std::fmt::Debug for AutoBoneEpochResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("AutoBoneEpochResponse"); + ds.field("current_epoch", &self.current_epoch()); + ds.field("total_epochs", &self.total_epochs()); + ds.field("epoch_error", &self.epoch_error()); + ds.field("adjusted_skeleton_parts", &self.adjusted_skeleton_parts()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs index 0ab0b77c..9603f992 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs @@ -1,104 +1,100 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 AutoBoneProcessRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct AutoBoneProcessRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneProcessRequest<'a> { - type Inner = AutoBoneProcessRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> AutoBoneProcessRequest<'a> { - pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneProcessRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args AutoBoneProcessRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneProcessRequestBuilder::new(_fbb); - builder.add_process_type(args.process_type); - builder.finish() - } - - - #[inline] - pub fn process_type(&self) -> AutoBoneProcessType { - self._tab.get::(AutoBoneProcessRequest::VT_PROCESS_TYPE, Some(AutoBoneProcessType::NONE)).unwrap() - } -} - -impl flatbuffers::Verifiable for AutoBoneProcessRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("process_type", Self::VT_PROCESS_TYPE, false)? - .finish(); - Ok(()) - } -} -pub struct AutoBoneProcessRequestArgs { - pub process_type: AutoBoneProcessType, -} -impl<'a> Default for AutoBoneProcessRequestArgs { - #[inline] - fn default() -> Self { - AutoBoneProcessRequestArgs { - process_type: AutoBoneProcessType::NONE, - } - } -} - -pub struct AutoBoneProcessRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneProcessRequestBuilder<'a, 'b> { - #[inline] - pub fn add_process_type(&mut self, process_type: AutoBoneProcessType) { - self.fbb_.push_slot::(AutoBoneProcessRequest::VT_PROCESS_TYPE, process_type, AutoBoneProcessType::NONE); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneProcessRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneProcessRequestBuilder { - 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 AutoBoneProcessRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneProcessRequest"); - ds.field("process_type", &self.process_type()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneProcessRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AutoBoneProcessRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneProcessRequest<'a> { + type Inner = AutoBoneProcessRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> AutoBoneProcessRequest<'a> { + pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneProcessRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AutoBoneProcessRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneProcessRequestBuilder::new(_fbb); + builder.add_process_type(args.process_type); + builder.finish() + } + + + #[inline] + pub fn process_type(&self) -> AutoBoneProcessType { + self._tab.get::(AutoBoneProcessRequest::VT_PROCESS_TYPE, Some(AutoBoneProcessType::NONE)).unwrap() + } +} + +impl flatbuffers::Verifiable for AutoBoneProcessRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("process_type", Self::VT_PROCESS_TYPE, false)? + .finish(); + Ok(()) + } +} +pub struct AutoBoneProcessRequestArgs { + pub process_type: AutoBoneProcessType, +} +impl<'a> Default for AutoBoneProcessRequestArgs { + #[inline] + fn default() -> Self { + AutoBoneProcessRequestArgs { + process_type: AutoBoneProcessType::NONE, + } + } +} + +pub struct AutoBoneProcessRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneProcessRequestBuilder<'a, 'b> { + #[inline] + pub fn add_process_type(&mut self, process_type: AutoBoneProcessType) { + self.fbb_.push_slot::(AutoBoneProcessRequest::VT_PROCESS_TYPE, process_type, AutoBoneProcessType::NONE); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneProcessRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneProcessRequestBuilder { + 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 std::fmt::Debug for AutoBoneProcessRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("AutoBoneProcessRequest"); + ds.field("process_type", &self.process_type()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs index 5d06803b..f590d09f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs @@ -1,174 +1,170 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 AutoBoneProcessStatusResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct AutoBoneProcessStatusResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for AutoBoneProcessStatusResponse<'a> { - type Inner = AutoBoneProcessStatusResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> AutoBoneProcessStatusResponse<'a> { - pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; - pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; - pub const VT_CURRENT: flatbuffers::VOffsetT = 8; - pub const VT_TOTAL: flatbuffers::VOffsetT = 10; - pub const VT_COMPLETED: flatbuffers::VOffsetT = 12; - pub const VT_SUCCESS: flatbuffers::VOffsetT = 14; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - AutoBoneProcessStatusResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args AutoBoneProcessStatusResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = AutoBoneProcessStatusResponseBuilder::new(_fbb); - builder.add_total(args.total); - builder.add_current(args.current); - if let Some(x) = args.message { builder.add_message(x); } - builder.add_success(args.success); - builder.add_completed(args.completed); - builder.add_process_type(args.process_type); - builder.finish() - } - - - #[inline] - pub fn process_type(&self) -> AutoBoneProcessType { - self._tab.get::(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, Some(AutoBoneProcessType::NONE)).unwrap() - } - #[inline] - pub fn message(&self) -> Option<&'a str> { - self._tab.get::>(AutoBoneProcessStatusResponse::VT_MESSAGE, None) - } - #[inline] - pub fn current(&self) -> u32 { - self._tab.get::(AutoBoneProcessStatusResponse::VT_CURRENT, Some(0)).unwrap() - } - #[inline] - pub fn total(&self) -> u32 { - self._tab.get::(AutoBoneProcessStatusResponse::VT_TOTAL, Some(0)).unwrap() - } - #[inline] - pub fn completed(&self) -> bool { - self._tab.get::(AutoBoneProcessStatusResponse::VT_COMPLETED, Some(false)).unwrap() - } - #[inline] - pub fn success(&self) -> bool { - self._tab.get::(AutoBoneProcessStatusResponse::VT_SUCCESS, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for AutoBoneProcessStatusResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("process_type", Self::VT_PROCESS_TYPE, false)? - .visit_field::>("message", Self::VT_MESSAGE, false)? - .visit_field::("current", Self::VT_CURRENT, false)? - .visit_field::("total", Self::VT_TOTAL, false)? - .visit_field::("completed", Self::VT_COMPLETED, false)? - .visit_field::("success", Self::VT_SUCCESS, false)? - .finish(); - Ok(()) - } -} -pub struct AutoBoneProcessStatusResponseArgs<'a> { - pub process_type: AutoBoneProcessType, - pub message: Option>, - pub current: u32, - pub total: u32, - pub completed: bool, - pub success: bool, -} -impl<'a> Default for AutoBoneProcessStatusResponseArgs<'a> { - #[inline] - fn default() -> Self { - AutoBoneProcessStatusResponseArgs { - process_type: AutoBoneProcessType::NONE, - message: None, - current: 0, - total: 0, - completed: false, - success: false, - } - } -} - -pub struct AutoBoneProcessStatusResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> AutoBoneProcessStatusResponseBuilder<'a, 'b> { - #[inline] - pub fn add_process_type(&mut self, process_type: AutoBoneProcessType) { - self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, process_type, AutoBoneProcessType::NONE); - } - #[inline] - pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(AutoBoneProcessStatusResponse::VT_MESSAGE, message); - } - #[inline] - pub fn add_current(&mut self, current: u32) { - self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_CURRENT, current, 0); - } - #[inline] - pub fn add_total(&mut self, total: u32) { - self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_TOTAL, total, 0); - } - #[inline] - pub fn add_completed(&mut self, completed: bool) { - self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_COMPLETED, completed, false); - } - #[inline] - pub fn add_success(&mut self, success: bool) { - self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_SUCCESS, success, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneProcessStatusResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - AutoBoneProcessStatusResponseBuilder { - 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 AutoBoneProcessStatusResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("AutoBoneProcessStatusResponse"); - ds.field("process_type", &self.process_type()); - ds.field("message", &self.message()); - ds.field("current", &self.current()); - ds.field("total", &self.total()); - ds.field("completed", &self.completed()); - ds.field("success", &self.success()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum AutoBoneProcessStatusResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct AutoBoneProcessStatusResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for AutoBoneProcessStatusResponse<'a> { + type Inner = AutoBoneProcessStatusResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> AutoBoneProcessStatusResponse<'a> { + pub const VT_PROCESS_TYPE: flatbuffers::VOffsetT = 4; + pub const VT_MESSAGE: flatbuffers::VOffsetT = 6; + pub const VT_CURRENT: flatbuffers::VOffsetT = 8; + pub const VT_TOTAL: flatbuffers::VOffsetT = 10; + pub const VT_COMPLETED: flatbuffers::VOffsetT = 12; + pub const VT_SUCCESS: flatbuffers::VOffsetT = 14; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + AutoBoneProcessStatusResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args AutoBoneProcessStatusResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = AutoBoneProcessStatusResponseBuilder::new(_fbb); + builder.add_total(args.total); + builder.add_current(args.current); + if let Some(x) = args.message { builder.add_message(x); } + builder.add_success(args.success); + builder.add_completed(args.completed); + builder.add_process_type(args.process_type); + builder.finish() + } + + + #[inline] + pub fn process_type(&self) -> AutoBoneProcessType { + self._tab.get::(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, Some(AutoBoneProcessType::NONE)).unwrap() + } + #[inline] + pub fn message(&self) -> Option<&'a str> { + self._tab.get::>(AutoBoneProcessStatusResponse::VT_MESSAGE, None) + } + #[inline] + pub fn current(&self) -> u32 { + self._tab.get::(AutoBoneProcessStatusResponse::VT_CURRENT, Some(0)).unwrap() + } + #[inline] + pub fn total(&self) -> u32 { + self._tab.get::(AutoBoneProcessStatusResponse::VT_TOTAL, Some(0)).unwrap() + } + #[inline] + pub fn completed(&self) -> bool { + self._tab.get::(AutoBoneProcessStatusResponse::VT_COMPLETED, Some(false)).unwrap() + } + #[inline] + pub fn success(&self) -> bool { + self._tab.get::(AutoBoneProcessStatusResponse::VT_SUCCESS, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for AutoBoneProcessStatusResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("process_type", Self::VT_PROCESS_TYPE, false)? + .visit_field::>("message", Self::VT_MESSAGE, false)? + .visit_field::("current", Self::VT_CURRENT, false)? + .visit_field::("total", Self::VT_TOTAL, false)? + .visit_field::("completed", Self::VT_COMPLETED, false)? + .visit_field::("success", Self::VT_SUCCESS, false)? + .finish(); + Ok(()) + } +} +pub struct AutoBoneProcessStatusResponseArgs<'a> { + pub process_type: AutoBoneProcessType, + pub message: Option>, + pub current: u32, + pub total: u32, + pub completed: bool, + pub success: bool, +} +impl<'a> Default for AutoBoneProcessStatusResponseArgs<'a> { + #[inline] + fn default() -> Self { + AutoBoneProcessStatusResponseArgs { + process_type: AutoBoneProcessType::NONE, + message: None, + current: 0, + total: 0, + completed: false, + success: false, + } + } +} + +pub struct AutoBoneProcessStatusResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> AutoBoneProcessStatusResponseBuilder<'a, 'b> { + #[inline] + pub fn add_process_type(&mut self, process_type: AutoBoneProcessType) { + self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_PROCESS_TYPE, process_type, AutoBoneProcessType::NONE); + } + #[inline] + pub fn add_message(&mut self, message: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(AutoBoneProcessStatusResponse::VT_MESSAGE, message); + } + #[inline] + pub fn add_current(&mut self, current: u32) { + self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_CURRENT, current, 0); + } + #[inline] + pub fn add_total(&mut self, total: u32) { + self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_TOTAL, total, 0); + } + #[inline] + pub fn add_completed(&mut self, completed: bool) { + self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_COMPLETED, completed, false); + } + #[inline] + pub fn add_success(&mut self, success: bool) { + self.fbb_.push_slot::(AutoBoneProcessStatusResponse::VT_SUCCESS, success, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> AutoBoneProcessStatusResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + AutoBoneProcessStatusResponseBuilder { + 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 std::fmt::Debug for AutoBoneProcessStatusResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("AutoBoneProcessStatusResponse"); + ds.field("process_type", &self.process_type()); + ds.field("message", &self.message()); + ds.field("current", &self.current()); + ds.field("total", &self.total()); + ds.field("completed", &self.completed()); + ds.field("success", &self.success()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs index 794ccdd5..e4e0270b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs @@ -1,109 +1,105 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_AUTO_BONE_PROCESS_TYPE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_AUTO_BONE_PROCESS_TYPE: 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_AUTO_BONE_PROCESS_TYPE: [AutoBoneProcessType; 5] = [ - AutoBoneProcessType::NONE, - AutoBoneProcessType::RECORD, - AutoBoneProcessType::SAVE, - AutoBoneProcessType::PROCESS, - AutoBoneProcessType::APPLY, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct AutoBoneProcessType(pub u8); -#[allow(non_upper_case_globals)] -impl AutoBoneProcessType { - pub const NONE: Self = Self(0); - pub const RECORD: Self = Self(1); - pub const SAVE: Self = Self(2); - pub const PROCESS: Self = Self(3); - pub const APPLY: Self = Self(4); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 4; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::RECORD, - Self::SAVE, - Self::PROCESS, - Self::APPLY, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::RECORD => Some("RECORD"), - Self::SAVE => Some("SAVE"), - Self::PROCESS => Some("PROCESS"), - Self::APPLY => Some("APPLY"), - _ => None, - } - } -} -impl core::fmt::Debug for AutoBoneProcessType { - 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 AutoBoneProcessType { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for AutoBoneProcessType { - type Output = AutoBoneProcessType; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for AutoBoneProcessType { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for AutoBoneProcessType { - #[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 AutoBoneProcessType {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_AUTO_BONE_PROCESS_TYPE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_AUTO_BONE_PROCESS_TYPE: 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_AUTO_BONE_PROCESS_TYPE: [AutoBoneProcessType; 5] = [ + AutoBoneProcessType::NONE, + AutoBoneProcessType::RECORD, + AutoBoneProcessType::SAVE, + AutoBoneProcessType::PROCESS, + AutoBoneProcessType::APPLY, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct AutoBoneProcessType(pub u8); +#[allow(non_upper_case_globals)] +impl AutoBoneProcessType { + pub const NONE: Self = Self(0); + pub const RECORD: Self = Self(1); + pub const SAVE: Self = Self(2); + pub const PROCESS: Self = Self(3); + pub const APPLY: Self = Self(4); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 4; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::RECORD, + Self::SAVE, + Self::PROCESS, + Self::APPLY, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::RECORD => Some("RECORD"), + Self::SAVE => Some("SAVE"), + Self::PROCESS => Some("PROCESS"), + Self::APPLY => Some("APPLY"), + _ => None, + } + } +} +impl std::fmt::Debug for AutoBoneProcessType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 AutoBoneProcessType { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for AutoBoneProcessType { + type Output = AutoBoneProcessType; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for AutoBoneProcessType { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for AutoBoneProcessType { + #[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 AutoBoneProcessType {} 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 0ca1f953..174212c5 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 @@ -1,132 +1,128 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ChangeSettingsRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ChangeSettingsRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ChangeSettingsRequest<'a> { - type Inner = ChangeSettingsRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ChangeSettingsRequest<'a> { - pub const VT_STEAM_VR_TRACKERS: flatbuffers::VOffsetT = 4; - pub const VT_FILTERING: flatbuffers::VOffsetT = 6; - pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 8; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ChangeSettingsRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ChangeSettingsRequestArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ChangeSettingsRequestBuilder::new(_fbb); - if let Some(x) = args.model_settings { builder.add_model_settings(x); } - if let Some(x) = args.filtering { builder.add_filtering(x); } - if let Some(x) = args.steam_vr_trackers { builder.add_steam_vr_trackers(x); } - builder.finish() - } - - - #[inline] - pub fn steam_vr_trackers(&self) -> Option> { - self._tab.get::>(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, None) - } - #[inline] - pub fn filtering(&self) -> Option> { - self._tab.get::>(ChangeSettingsRequest::VT_FILTERING, None) - } - #[inline] - pub fn model_settings(&self) -> Option> { - self._tab.get::>(ChangeSettingsRequest::VT_MODEL_SETTINGS, None) - } -} - -impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("steam_vr_trackers", Self::VT_STEAM_VR_TRACKERS, false)? - .visit_field::>("filtering", Self::VT_FILTERING, false)? - .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? - .finish(); - Ok(()) - } -} -pub struct ChangeSettingsRequestArgs<'a> { - pub steam_vr_trackers: Option>>, - pub filtering: Option>>, - pub model_settings: Option>>, -} -impl<'a> Default for ChangeSettingsRequestArgs<'a> { - #[inline] - fn default() -> Self { - ChangeSettingsRequestArgs { - steam_vr_trackers: None, - filtering: None, - model_settings: None, - } - } -} - -pub struct ChangeSettingsRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ChangeSettingsRequestBuilder<'a, 'b> { - #[inline] - pub fn add_steam_vr_trackers(&mut self, steam_vr_trackers: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, steam_vr_trackers); - } - #[inline] - pub fn add_filtering(&mut self, filtering: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_FILTERING, filtering); - } - #[inline] - pub fn add_model_settings(&mut self, model_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_MODEL_SETTINGS, model_settings); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSettingsRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ChangeSettingsRequestBuilder { - 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 ChangeSettingsRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ChangeSettingsRequest"); - ds.field("steam_vr_trackers", &self.steam_vr_trackers()); - ds.field("filtering", &self.filtering()); - ds.field("model_settings", &self.model_settings()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ChangeSettingsRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ChangeSettingsRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ChangeSettingsRequest<'a> { + type Inner = ChangeSettingsRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ChangeSettingsRequest<'a> { + pub const VT_STEAM_VR_TRACKERS: flatbuffers::VOffsetT = 4; + pub const VT_FILTERING: flatbuffers::VOffsetT = 6; + pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 8; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ChangeSettingsRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ChangeSettingsRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = ChangeSettingsRequestBuilder::new(_fbb); + if let Some(x) = args.model_settings { builder.add_model_settings(x); } + if let Some(x) = args.filtering { builder.add_filtering(x); } + if let Some(x) = args.steam_vr_trackers { builder.add_steam_vr_trackers(x); } + builder.finish() + } + + + #[inline] + pub fn steam_vr_trackers(&self) -> Option> { + self._tab.get::>(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, None) + } + #[inline] + pub fn filtering(&self) -> Option> { + self._tab.get::>(ChangeSettingsRequest::VT_FILTERING, None) + } + #[inline] + pub fn model_settings(&self) -> Option> { + self._tab.get::>(ChangeSettingsRequest::VT_MODEL_SETTINGS, None) + } +} + +impl flatbuffers::Verifiable for ChangeSettingsRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("steam_vr_trackers", Self::VT_STEAM_VR_TRACKERS, false)? + .visit_field::>("filtering", Self::VT_FILTERING, false)? + .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? + .finish(); + Ok(()) + } +} +pub struct ChangeSettingsRequestArgs<'a> { + pub steam_vr_trackers: Option>>, + pub filtering: Option>>, + pub model_settings: Option>>, +} +impl<'a> Default for ChangeSettingsRequestArgs<'a> { + #[inline] + fn default() -> Self { + ChangeSettingsRequestArgs { + steam_vr_trackers: None, + filtering: None, + model_settings: None, + } + } +} + +pub struct ChangeSettingsRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ChangeSettingsRequestBuilder<'a, 'b> { + #[inline] + pub fn add_steam_vr_trackers(&mut self, steam_vr_trackers: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_STEAM_VR_TRACKERS, steam_vr_trackers); + } + #[inline] + pub fn add_filtering(&mut self, filtering: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_FILTERING, filtering); + } + #[inline] + pub fn add_model_settings(&mut self, model_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ChangeSettingsRequest::VT_MODEL_SETTINGS, model_settings); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSettingsRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ChangeSettingsRequestBuilder { + 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 std::fmt::Debug for ChangeSettingsRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ChangeSettingsRequest"); + ds.field("steam_vr_trackers", &self.steam_vr_trackers()); + ds.field("filtering", &self.filtering()); + ds.field("model_settings", &self.model_settings()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs index 243ada5e..dc6ab8d8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs @@ -1,118 +1,114 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ChangeSkeletonConfigRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ChangeSkeletonConfigRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ChangeSkeletonConfigRequest<'a> { - type Inner = ChangeSkeletonConfigRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ChangeSkeletonConfigRequest<'a> { - pub const VT_BONE: flatbuffers::VOffsetT = 4; - pub const VT_VALUE: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ChangeSkeletonConfigRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ChangeSkeletonConfigRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ChangeSkeletonConfigRequestBuilder::new(_fbb); - builder.add_value(args.value); - builder.add_bone(args.bone); - builder.finish() - } - - - #[inline] - pub fn bone(&self) -> SkeletonBone { - self._tab.get::(ChangeSkeletonConfigRequest::VT_BONE, Some(SkeletonBone::NONE)).unwrap() - } - #[inline] - pub fn value(&self) -> f32 { - self._tab.get::(ChangeSkeletonConfigRequest::VT_VALUE, Some(0.0)).unwrap() - } -} - -impl flatbuffers::Verifiable for ChangeSkeletonConfigRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("bone", Self::VT_BONE, false)? - .visit_field::("value", Self::VT_VALUE, false)? - .finish(); - Ok(()) - } -} -pub struct ChangeSkeletonConfigRequestArgs { - pub bone: SkeletonBone, - pub value: f32, -} -impl<'a> Default for ChangeSkeletonConfigRequestArgs { - #[inline] - fn default() -> Self { - ChangeSkeletonConfigRequestArgs { - bone: SkeletonBone::NONE, - value: 0.0, - } - } -} - -pub struct ChangeSkeletonConfigRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ChangeSkeletonConfigRequestBuilder<'a, 'b> { - #[inline] - pub fn add_bone(&mut self, bone: SkeletonBone) { - self.fbb_.push_slot::(ChangeSkeletonConfigRequest::VT_BONE, bone, SkeletonBone::NONE); - } - #[inline] - pub fn add_value(&mut self, value: f32) { - self.fbb_.push_slot::(ChangeSkeletonConfigRequest::VT_VALUE, value, 0.0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSkeletonConfigRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ChangeSkeletonConfigRequestBuilder { - 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 ChangeSkeletonConfigRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ChangeSkeletonConfigRequest"); - ds.field("bone", &self.bone()); - ds.field("value", &self.value()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ChangeSkeletonConfigRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ChangeSkeletonConfigRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ChangeSkeletonConfigRequest<'a> { + type Inner = ChangeSkeletonConfigRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ChangeSkeletonConfigRequest<'a> { + pub const VT_BONE: flatbuffers::VOffsetT = 4; + pub const VT_VALUE: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ChangeSkeletonConfigRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ChangeSkeletonConfigRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ChangeSkeletonConfigRequestBuilder::new(_fbb); + builder.add_value(args.value); + builder.add_bone(args.bone); + builder.finish() + } + + + #[inline] + pub fn bone(&self) -> SkeletonBone { + self._tab.get::(ChangeSkeletonConfigRequest::VT_BONE, Some(SkeletonBone::NONE)).unwrap() + } + #[inline] + pub fn value(&self) -> f32 { + self._tab.get::(ChangeSkeletonConfigRequest::VT_VALUE, Some(0.0)).unwrap() + } +} + +impl flatbuffers::Verifiable for ChangeSkeletonConfigRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("bone", Self::VT_BONE, false)? + .visit_field::("value", Self::VT_VALUE, false)? + .finish(); + Ok(()) + } +} +pub struct ChangeSkeletonConfigRequestArgs { + pub bone: SkeletonBone, + pub value: f32, +} +impl<'a> Default for ChangeSkeletonConfigRequestArgs { + #[inline] + fn default() -> Self { + ChangeSkeletonConfigRequestArgs { + bone: SkeletonBone::NONE, + value: 0.0, + } + } +} + +pub struct ChangeSkeletonConfigRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ChangeSkeletonConfigRequestBuilder<'a, 'b> { + #[inline] + pub fn add_bone(&mut self, bone: SkeletonBone) { + self.fbb_.push_slot::(ChangeSkeletonConfigRequest::VT_BONE, bone, SkeletonBone::NONE); + } + #[inline] + pub fn add_value(&mut self, value: f32) { + self.fbb_.push_slot::(ChangeSkeletonConfigRequest::VT_VALUE, value, 0.0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ChangeSkeletonConfigRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ChangeSkeletonConfigRequestBuilder { + 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 std::fmt::Debug for ChangeSkeletonConfigRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ChangeSkeletonConfigRequest"); + ds.field("bone", &self.bone()); + ds.field("value", &self.value()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs index fcf9d9f4..399352b7 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 CloseSerialRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct CloseSerialRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for CloseSerialRequest<'a> { - type Inner = CloseSerialRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> CloseSerialRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - CloseSerialRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args CloseSerialRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = CloseSerialRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for CloseSerialRequest<'_> { - #[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 CloseSerialRequestArgs { -} -impl<'a> Default for CloseSerialRequestArgs { - #[inline] - fn default() -> Self { - CloseSerialRequestArgs { - } - } -} - -pub struct CloseSerialRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> CloseSerialRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> CloseSerialRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - CloseSerialRequestBuilder { - 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 CloseSerialRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("CloseSerialRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum CloseSerialRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct CloseSerialRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for CloseSerialRequest<'a> { + type Inner = CloseSerialRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> CloseSerialRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + CloseSerialRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args CloseSerialRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = CloseSerialRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for CloseSerialRequest<'_> { + #[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 CloseSerialRequestArgs { +} +impl<'a> Default for CloseSerialRequestArgs { + #[inline] + fn default() -> Self { + CloseSerialRequestArgs { + } + } +} + +pub struct CloseSerialRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> CloseSerialRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> CloseSerialRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + CloseSerialRequestBuilder { + 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 std::fmt::Debug for CloseSerialRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("CloseSerialRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs index c0440ec6..c08dc362 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs @@ -1,119 +1,115 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 FilteringSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct FilteringSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for FilteringSettings<'a> { - type Inner = FilteringSettings<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> FilteringSettings<'a> { - pub const VT_TYPE_: flatbuffers::VOffsetT = 4; - pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - FilteringSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args FilteringSettingsArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = FilteringSettingsBuilder::new(_fbb); - builder.add_amount(args.amount); - builder.add_type_(args.type_); - builder.finish() - } - - - #[inline] - pub fn type_(&self) -> super::datatypes::FilteringType { - self._tab.get::(FilteringSettings::VT_TYPE_, Some(super::datatypes::FilteringType::NONE)).unwrap() - } - /// 0 to 1. A higher value results in more smoothing or prediction - #[inline] - pub fn amount(&self) -> f32 { - self._tab.get::(FilteringSettings::VT_AMOUNT, Some(0.0)).unwrap() - } -} - -impl flatbuffers::Verifiable for FilteringSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("type_", Self::VT_TYPE_, false)? - .visit_field::("amount", Self::VT_AMOUNT, false)? - .finish(); - Ok(()) - } -} -pub struct FilteringSettingsArgs { - pub type_: super::datatypes::FilteringType, - pub amount: f32, -} -impl<'a> Default for FilteringSettingsArgs { - #[inline] - fn default() -> Self { - FilteringSettingsArgs { - type_: super::datatypes::FilteringType::NONE, - amount: 0.0, - } - } -} - -pub struct FilteringSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> FilteringSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_type_(&mut self, type_: super::datatypes::FilteringType) { - self.fbb_.push_slot::(FilteringSettings::VT_TYPE_, type_, super::datatypes::FilteringType::NONE); - } - #[inline] - pub fn add_amount(&mut self, amount: f32) { - self.fbb_.push_slot::(FilteringSettings::VT_AMOUNT, amount, 0.0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FilteringSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - FilteringSettingsBuilder { - 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 FilteringSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("FilteringSettings"); - ds.field("type_", &self.type_()); - ds.field("amount", &self.amount()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum FilteringSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct FilteringSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for FilteringSettings<'a> { + type Inner = FilteringSettings<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> FilteringSettings<'a> { + pub const VT_TYPE_: flatbuffers::VOffsetT = 4; + pub const VT_AMOUNT: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + FilteringSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args FilteringSettingsArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = FilteringSettingsBuilder::new(_fbb); + builder.add_amount(args.amount); + builder.add_type_(args.type_); + builder.finish() + } + + + #[inline] + pub fn type_(&self) -> super::datatypes::FilteringType { + self._tab.get::(FilteringSettings::VT_TYPE_, Some(super::datatypes::FilteringType::NONE)).unwrap() + } + /// 0 to 1. A higher value results in more smoothing or prediction + #[inline] + pub fn amount(&self) -> f32 { + self._tab.get::(FilteringSettings::VT_AMOUNT, Some(0.0)).unwrap() + } +} + +impl flatbuffers::Verifiable for FilteringSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("type_", Self::VT_TYPE_, false)? + .visit_field::("amount", Self::VT_AMOUNT, false)? + .finish(); + Ok(()) + } +} +pub struct FilteringSettingsArgs { + pub type_: super::datatypes::FilteringType, + pub amount: f32, +} +impl<'a> Default for FilteringSettingsArgs { + #[inline] + fn default() -> Self { + FilteringSettingsArgs { + type_: super::datatypes::FilteringType::NONE, + amount: 0.0, + } + } +} + +pub struct FilteringSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> FilteringSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_type_(&mut self, type_: super::datatypes::FilteringType) { + self.fbb_.push_slot::(FilteringSettings::VT_TYPE_, type_, super::datatypes::FilteringType::NONE); + } + #[inline] + pub fn add_amount(&mut self, amount: f32) { + self.fbb_.push_slot::(FilteringSettings::VT_AMOUNT, amount, 0.0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> FilteringSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + FilteringSettingsBuilder { + 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 std::fmt::Debug for FilteringSettings<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("FilteringSettings"); + ds.field("type_", &self.type_()); + ds.field("amount", &self.amount()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs index c2e61baa..4532a219 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 HeartbeatRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct HeartbeatRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for HeartbeatRequest<'a> { - type Inner = HeartbeatRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> HeartbeatRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HeartbeatRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args HeartbeatRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = HeartbeatRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for HeartbeatRequest<'_> { - #[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 HeartbeatRequestArgs { -} -impl<'a> Default for HeartbeatRequestArgs { - #[inline] - fn default() -> Self { - HeartbeatRequestArgs { - } - } -} - -pub struct HeartbeatRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> HeartbeatRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeartbeatRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - HeartbeatRequestBuilder { - 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 HeartbeatRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HeartbeatRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum HeartbeatRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct HeartbeatRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for HeartbeatRequest<'a> { + type Inner = HeartbeatRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> HeartbeatRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HeartbeatRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args HeartbeatRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = HeartbeatRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for HeartbeatRequest<'_> { + #[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 HeartbeatRequestArgs { +} +impl<'a> Default for HeartbeatRequestArgs { + #[inline] + fn default() -> Self { + HeartbeatRequestArgs { + } + } +} + +pub struct HeartbeatRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> HeartbeatRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeartbeatRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + HeartbeatRequestBuilder { + 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 std::fmt::Debug for HeartbeatRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("HeartbeatRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs index b7f0d410..e7042d9a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 HeartbeatResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct HeartbeatResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for HeartbeatResponse<'a> { - type Inner = HeartbeatResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> HeartbeatResponse<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - HeartbeatResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args HeartbeatResponseArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = HeartbeatResponseBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for HeartbeatResponse<'_> { - #[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 HeartbeatResponseArgs { -} -impl<'a> Default for HeartbeatResponseArgs { - #[inline] - fn default() -> Self { - HeartbeatResponseArgs { - } - } -} - -pub struct HeartbeatResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> HeartbeatResponseBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeartbeatResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - HeartbeatResponseBuilder { - 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 HeartbeatResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("HeartbeatResponse"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum HeartbeatResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct HeartbeatResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for HeartbeatResponse<'a> { + type Inner = HeartbeatResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> HeartbeatResponse<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + HeartbeatResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args HeartbeatResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = HeartbeatResponseBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for HeartbeatResponse<'_> { + #[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 HeartbeatResponseArgs { +} +impl<'a> Default for HeartbeatResponseArgs { + #[inline] + fn default() -> Self { + HeartbeatResponseArgs { + } + } +} + +pub struct HeartbeatResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> HeartbeatResponseBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeartbeatResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + HeartbeatResponseBuilder { + 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 std::fmt::Debug for HeartbeatResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("HeartbeatResponse"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs index 47c02ccb..9387278a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 OpenSerialRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct OpenSerialRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OpenSerialRequest<'a> { - type Inner = OpenSerialRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> OpenSerialRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OpenSerialRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args OpenSerialRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = OpenSerialRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for OpenSerialRequest<'_> { - #[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 OpenSerialRequestArgs { -} -impl<'a> Default for OpenSerialRequestArgs { - #[inline] - fn default() -> Self { - OpenSerialRequestArgs { - } - } -} - -pub struct OpenSerialRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OpenSerialRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OpenSerialRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - OpenSerialRequestBuilder { - 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 OpenSerialRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OpenSerialRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OpenSerialRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct OpenSerialRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OpenSerialRequest<'a> { + type Inner = OpenSerialRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> OpenSerialRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OpenSerialRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args OpenSerialRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = OpenSerialRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for OpenSerialRequest<'_> { + #[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 OpenSerialRequestArgs { +} +impl<'a> Default for OpenSerialRequestArgs { + #[inline] + fn default() -> Self { + OpenSerialRequestArgs { + } + } +} + +pub struct OpenSerialRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OpenSerialRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OpenSerialRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + OpenSerialRequestBuilder { + 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 std::fmt::Debug for OpenSerialRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("OpenSerialRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs index cd11edd8..f4d1d8a7 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs @@ -1,119 +1,115 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 OverlayDisplayModeChangeRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Changes the state of the overlay's display mode. -pub struct OverlayDisplayModeChangeRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OverlayDisplayModeChangeRequest<'a> { - type Inner = OverlayDisplayModeChangeRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> OverlayDisplayModeChangeRequest<'a> { - pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; - pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OverlayDisplayModeChangeRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args OverlayDisplayModeChangeRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = OverlayDisplayModeChangeRequestBuilder::new(_fbb); - if let Some(x) = args.is_mirrored { builder.add_is_mirrored(x); } - if let Some(x) = args.is_visible { builder.add_is_visible(x); } - builder.finish() - } - - - #[inline] - pub fn is_visible(&self) -> Option { - self._tab.get::(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, None) - } - #[inline] - pub fn is_mirrored(&self) -> Option { - self._tab.get::(OverlayDisplayModeChangeRequest::VT_IS_MIRRORED, None) - } -} - -impl flatbuffers::Verifiable for OverlayDisplayModeChangeRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("is_visible", Self::VT_IS_VISIBLE, false)? - .visit_field::("is_mirrored", Self::VT_IS_MIRRORED, false)? - .finish(); - Ok(()) - } -} -pub struct OverlayDisplayModeChangeRequestArgs { - pub is_visible: Option, - pub is_mirrored: Option, -} -impl<'a> Default for OverlayDisplayModeChangeRequestArgs { - #[inline] - fn default() -> Self { - OverlayDisplayModeChangeRequestArgs { - is_visible: None, - is_mirrored: None, - } - } -} - -pub struct OverlayDisplayModeChangeRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OverlayDisplayModeChangeRequestBuilder<'a, 'b> { - #[inline] - pub fn add_is_visible(&mut self, is_visible: bool) { - self.fbb_.push_slot_always::(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, is_visible); - } - #[inline] - pub fn add_is_mirrored(&mut self, is_mirrored: bool) { - self.fbb_.push_slot_always::(OverlayDisplayModeChangeRequest::VT_IS_MIRRORED, is_mirrored); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OverlayDisplayModeChangeRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - OverlayDisplayModeChangeRequestBuilder { - 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 OverlayDisplayModeChangeRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OverlayDisplayModeChangeRequest"); - ds.field("is_visible", &self.is_visible()); - ds.field("is_mirrored", &self.is_mirrored()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OverlayDisplayModeChangeRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Changes the state of the overlay's display mode. +pub struct OverlayDisplayModeChangeRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OverlayDisplayModeChangeRequest<'a> { + type Inner = OverlayDisplayModeChangeRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> OverlayDisplayModeChangeRequest<'a> { + pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; + pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OverlayDisplayModeChangeRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args OverlayDisplayModeChangeRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = OverlayDisplayModeChangeRequestBuilder::new(_fbb); + if let Some(x) = args.is_mirrored { builder.add_is_mirrored(x); } + if let Some(x) = args.is_visible { builder.add_is_visible(x); } + builder.finish() + } + + + #[inline] + pub fn is_visible(&self) -> Option { + self._tab.get::(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, None) + } + #[inline] + pub fn is_mirrored(&self) -> Option { + self._tab.get::(OverlayDisplayModeChangeRequest::VT_IS_MIRRORED, None) + } +} + +impl flatbuffers::Verifiable for OverlayDisplayModeChangeRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("is_visible", Self::VT_IS_VISIBLE, false)? + .visit_field::("is_mirrored", Self::VT_IS_MIRRORED, false)? + .finish(); + Ok(()) + } +} +pub struct OverlayDisplayModeChangeRequestArgs { + pub is_visible: Option, + pub is_mirrored: Option, +} +impl<'a> Default for OverlayDisplayModeChangeRequestArgs { + #[inline] + fn default() -> Self { + OverlayDisplayModeChangeRequestArgs { + is_visible: None, + is_mirrored: None, + } + } +} + +pub struct OverlayDisplayModeChangeRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OverlayDisplayModeChangeRequestBuilder<'a, 'b> { + #[inline] + pub fn add_is_visible(&mut self, is_visible: bool) { + self.fbb_.push_slot_always::(OverlayDisplayModeChangeRequest::VT_IS_VISIBLE, is_visible); + } + #[inline] + pub fn add_is_mirrored(&mut self, is_mirrored: bool) { + self.fbb_.push_slot_always::(OverlayDisplayModeChangeRequest::VT_IS_MIRRORED, is_mirrored); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OverlayDisplayModeChangeRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + OverlayDisplayModeChangeRequestBuilder { + 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 std::fmt::Debug for OverlayDisplayModeChangeRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("OverlayDisplayModeChangeRequest"); + ds.field("is_visible", &self.is_visible()); + ds.field("is_mirrored", &self.is_mirrored()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs index 1d851f13..50b55a93 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs @@ -1,90 +1,86 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 OverlayDisplayModeRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Requests the current state of `OverlayDisplayModeResponse`. -pub struct OverlayDisplayModeRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OverlayDisplayModeRequest<'a> { - type Inner = OverlayDisplayModeRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> OverlayDisplayModeRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OverlayDisplayModeRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args OverlayDisplayModeRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = OverlayDisplayModeRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for OverlayDisplayModeRequest<'_> { - #[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 OverlayDisplayModeRequestArgs { -} -impl<'a> Default for OverlayDisplayModeRequestArgs { - #[inline] - fn default() -> Self { - OverlayDisplayModeRequestArgs { - } - } -} - -pub struct OverlayDisplayModeRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OverlayDisplayModeRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OverlayDisplayModeRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - OverlayDisplayModeRequestBuilder { - 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 OverlayDisplayModeRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OverlayDisplayModeRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OverlayDisplayModeRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Requests the current state of `OverlayDisplayModeResponse`. +pub struct OverlayDisplayModeRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OverlayDisplayModeRequest<'a> { + type Inner = OverlayDisplayModeRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> OverlayDisplayModeRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OverlayDisplayModeRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args OverlayDisplayModeRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = OverlayDisplayModeRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for OverlayDisplayModeRequest<'_> { + #[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 OverlayDisplayModeRequestArgs { +} +impl<'a> Default for OverlayDisplayModeRequestArgs { + #[inline] + fn default() -> Self { + OverlayDisplayModeRequestArgs { + } + } +} + +pub struct OverlayDisplayModeRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OverlayDisplayModeRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OverlayDisplayModeRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + OverlayDisplayModeRequestBuilder { + 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 std::fmt::Debug for OverlayDisplayModeRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("OverlayDisplayModeRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs index 409b3cd2..090e7cd1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs @@ -1,119 +1,115 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 OverlayDisplayModeResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// The current state of the overlay's display mode. -pub struct OverlayDisplayModeResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for OverlayDisplayModeResponse<'a> { - type Inner = OverlayDisplayModeResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> OverlayDisplayModeResponse<'a> { - pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; - pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - OverlayDisplayModeResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args OverlayDisplayModeResponseArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = OverlayDisplayModeResponseBuilder::new(_fbb); - builder.add_is_mirrored(args.is_mirrored); - builder.add_is_visible(args.is_visible); - builder.finish() - } - - - #[inline] - pub fn is_visible(&self) -> bool { - self._tab.get::(OverlayDisplayModeResponse::VT_IS_VISIBLE, Some(false)).unwrap() - } - #[inline] - pub fn is_mirrored(&self) -> bool { - self._tab.get::(OverlayDisplayModeResponse::VT_IS_MIRRORED, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for OverlayDisplayModeResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("is_visible", Self::VT_IS_VISIBLE, false)? - .visit_field::("is_mirrored", Self::VT_IS_MIRRORED, false)? - .finish(); - Ok(()) - } -} -pub struct OverlayDisplayModeResponseArgs { - pub is_visible: bool, - pub is_mirrored: bool, -} -impl<'a> Default for OverlayDisplayModeResponseArgs { - #[inline] - fn default() -> Self { - OverlayDisplayModeResponseArgs { - is_visible: false, - is_mirrored: false, - } - } -} - -pub struct OverlayDisplayModeResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> OverlayDisplayModeResponseBuilder<'a, 'b> { - #[inline] - pub fn add_is_visible(&mut self, is_visible: bool) { - self.fbb_.push_slot::(OverlayDisplayModeResponse::VT_IS_VISIBLE, is_visible, false); - } - #[inline] - pub fn add_is_mirrored(&mut self, is_mirrored: bool) { - self.fbb_.push_slot::(OverlayDisplayModeResponse::VT_IS_MIRRORED, is_mirrored, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OverlayDisplayModeResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - OverlayDisplayModeResponseBuilder { - 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 OverlayDisplayModeResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("OverlayDisplayModeResponse"); - ds.field("is_visible", &self.is_visible()); - ds.field("is_mirrored", &self.is_mirrored()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum OverlayDisplayModeResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// The current state of the overlay's display mode. +pub struct OverlayDisplayModeResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for OverlayDisplayModeResponse<'a> { + type Inner = OverlayDisplayModeResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> OverlayDisplayModeResponse<'a> { + pub const VT_IS_VISIBLE: flatbuffers::VOffsetT = 4; + pub const VT_IS_MIRRORED: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + OverlayDisplayModeResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args OverlayDisplayModeResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = OverlayDisplayModeResponseBuilder::new(_fbb); + builder.add_is_mirrored(args.is_mirrored); + builder.add_is_visible(args.is_visible); + builder.finish() + } + + + #[inline] + pub fn is_visible(&self) -> bool { + self._tab.get::(OverlayDisplayModeResponse::VT_IS_VISIBLE, Some(false)).unwrap() + } + #[inline] + pub fn is_mirrored(&self) -> bool { + self._tab.get::(OverlayDisplayModeResponse::VT_IS_MIRRORED, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for OverlayDisplayModeResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("is_visible", Self::VT_IS_VISIBLE, false)? + .visit_field::("is_mirrored", Self::VT_IS_MIRRORED, false)? + .finish(); + Ok(()) + } +} +pub struct OverlayDisplayModeResponseArgs { + pub is_visible: bool, + pub is_mirrored: bool, +} +impl<'a> Default for OverlayDisplayModeResponseArgs { + #[inline] + fn default() -> Self { + OverlayDisplayModeResponseArgs { + is_visible: false, + is_mirrored: false, + } + } +} + +pub struct OverlayDisplayModeResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> OverlayDisplayModeResponseBuilder<'a, 'b> { + #[inline] + pub fn add_is_visible(&mut self, is_visible: bool) { + self.fbb_.push_slot::(OverlayDisplayModeResponse::VT_IS_VISIBLE, is_visible, false); + } + #[inline] + pub fn add_is_mirrored(&mut self, is_mirrored: bool) { + self.fbb_.push_slot::(OverlayDisplayModeResponse::VT_IS_MIRRORED, is_mirrored, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> OverlayDisplayModeResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + OverlayDisplayModeResponseBuilder { + 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 std::fmt::Debug for OverlayDisplayModeResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("OverlayDisplayModeResponse"); + ds.field("is_visible", &self.is_visible()); + ds.field("is_mirrored", &self.is_mirrored()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs index a718638a..46a46eaf 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs @@ -1,104 +1,100 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 RecordBVHRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct RecordBVHRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for RecordBVHRequest<'a> { - type Inner = RecordBVHRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> RecordBVHRequest<'a> { - pub const VT_STOP: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - RecordBVHRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args RecordBVHRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = RecordBVHRequestBuilder::new(_fbb); - builder.add_stop(args.stop); - builder.finish() - } - - - #[inline] - pub fn stop(&self) -> bool { - self._tab.get::(RecordBVHRequest::VT_STOP, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for RecordBVHRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("stop", Self::VT_STOP, false)? - .finish(); - Ok(()) - } -} -pub struct RecordBVHRequestArgs { - pub stop: bool, -} -impl<'a> Default for RecordBVHRequestArgs { - #[inline] - fn default() -> Self { - RecordBVHRequestArgs { - stop: false, - } - } -} - -pub struct RecordBVHRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> RecordBVHRequestBuilder<'a, 'b> { - #[inline] - pub fn add_stop(&mut self, stop: bool) { - self.fbb_.push_slot::(RecordBVHRequest::VT_STOP, stop, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecordBVHRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - RecordBVHRequestBuilder { - 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 RecordBVHRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("RecordBVHRequest"); - ds.field("stop", &self.stop()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum RecordBVHRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct RecordBVHRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for RecordBVHRequest<'a> { + type Inner = RecordBVHRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> RecordBVHRequest<'a> { + pub const VT_STOP: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + RecordBVHRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args RecordBVHRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = RecordBVHRequestBuilder::new(_fbb); + builder.add_stop(args.stop); + builder.finish() + } + + + #[inline] + pub fn stop(&self) -> bool { + self._tab.get::(RecordBVHRequest::VT_STOP, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for RecordBVHRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("stop", Self::VT_STOP, false)? + .finish(); + Ok(()) + } +} +pub struct RecordBVHRequestArgs { + pub stop: bool, +} +impl<'a> Default for RecordBVHRequestArgs { + #[inline] + fn default() -> Self { + RecordBVHRequestArgs { + stop: false, + } + } +} + +pub struct RecordBVHRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> RecordBVHRequestBuilder<'a, 'b> { + #[inline] + pub fn add_stop(&mut self, stop: bool) { + self.fbb_.push_slot::(RecordBVHRequest::VT_STOP, stop, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecordBVHRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + RecordBVHRequestBuilder { + 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 std::fmt::Debug for RecordBVHRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("RecordBVHRequest"); + ds.field("stop", &self.stop()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs index 3f7e2bdb..7b9fe8bb 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs @@ -1,104 +1,100 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 RecordBVHStatusOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct RecordBVHStatus<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for RecordBVHStatus<'a> { - type Inner = RecordBVHStatus<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> RecordBVHStatus<'a> { - pub const VT_RECORDING: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - RecordBVHStatus { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args RecordBVHStatusArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = RecordBVHStatusBuilder::new(_fbb); - builder.add_recording(args.recording); - builder.finish() - } - - - #[inline] - pub fn recording(&self) -> bool { - self._tab.get::(RecordBVHStatus::VT_RECORDING, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for RecordBVHStatus<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("recording", Self::VT_RECORDING, false)? - .finish(); - Ok(()) - } -} -pub struct RecordBVHStatusArgs { - pub recording: bool, -} -impl<'a> Default for RecordBVHStatusArgs { - #[inline] - fn default() -> Self { - RecordBVHStatusArgs { - recording: false, - } - } -} - -pub struct RecordBVHStatusBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> RecordBVHStatusBuilder<'a, 'b> { - #[inline] - pub fn add_recording(&mut self, recording: bool) { - self.fbb_.push_slot::(RecordBVHStatus::VT_RECORDING, recording, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecordBVHStatusBuilder<'a, 'b> { - let start = _fbb.start_table(); - RecordBVHStatusBuilder { - 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 RecordBVHStatus<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("RecordBVHStatus"); - ds.field("recording", &self.recording()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum RecordBVHStatusOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct RecordBVHStatus<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for RecordBVHStatus<'a> { + type Inner = RecordBVHStatus<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> RecordBVHStatus<'a> { + pub const VT_RECORDING: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + RecordBVHStatus { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args RecordBVHStatusArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = RecordBVHStatusBuilder::new(_fbb); + builder.add_recording(args.recording); + builder.finish() + } + + + #[inline] + pub fn recording(&self) -> bool { + self._tab.get::(RecordBVHStatus::VT_RECORDING, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for RecordBVHStatus<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("recording", Self::VT_RECORDING, false)? + .finish(); + Ok(()) + } +} +pub struct RecordBVHStatusArgs { + pub recording: bool, +} +impl<'a> Default for RecordBVHStatusArgs { + #[inline] + fn default() -> Self { + RecordBVHStatusArgs { + recording: false, + } + } +} + +pub struct RecordBVHStatusBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> RecordBVHStatusBuilder<'a, 'b> { + #[inline] + pub fn add_recording(&mut self, recording: bool) { + self.fbb_.push_slot::(RecordBVHStatus::VT_RECORDING, recording, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RecordBVHStatusBuilder<'a, 'b> { + let start = _fbb.start_table(); + RecordBVHStatusBuilder { + 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 std::fmt::Debug for RecordBVHStatus<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("RecordBVHStatus"); + ds.field("recording", &self.recording()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs index 65bf21c3..3c409e99 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs @@ -1,104 +1,100 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ResetRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ResetRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ResetRequest<'a> { - type Inner = ResetRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ResetRequest<'a> { - pub const VT_RESET_TYPE: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ResetRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ResetRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ResetRequestBuilder::new(_fbb); - builder.add_reset_type(args.reset_type); - builder.finish() - } - - - #[inline] - pub fn reset_type(&self) -> ResetType { - self._tab.get::(ResetRequest::VT_RESET_TYPE, Some(ResetType::Quick)).unwrap() - } -} - -impl flatbuffers::Verifiable for ResetRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("reset_type", Self::VT_RESET_TYPE, false)? - .finish(); - Ok(()) - } -} -pub struct ResetRequestArgs { - pub reset_type: ResetType, -} -impl<'a> Default for ResetRequestArgs { - #[inline] - fn default() -> Self { - ResetRequestArgs { - reset_type: ResetType::Quick, - } - } -} - -pub struct ResetRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ResetRequestBuilder<'a, 'b> { - #[inline] - pub fn add_reset_type(&mut self, reset_type: ResetType) { - self.fbb_.push_slot::(ResetRequest::VT_RESET_TYPE, reset_type, ResetType::Quick); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - ResetRequestBuilder { - 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 ResetRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ResetRequest"); - ds.field("reset_type", &self.reset_type()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ResetRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ResetRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ResetRequest<'a> { + type Inner = ResetRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ResetRequest<'a> { + pub const VT_RESET_TYPE: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ResetRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ResetRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ResetRequestBuilder::new(_fbb); + builder.add_reset_type(args.reset_type); + builder.finish() + } + + + #[inline] + pub fn reset_type(&self) -> ResetType { + self._tab.get::(ResetRequest::VT_RESET_TYPE, Some(ResetType::Quick)).unwrap() + } +} + +impl flatbuffers::Verifiable for ResetRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("reset_type", Self::VT_RESET_TYPE, false)? + .finish(); + Ok(()) + } +} +pub struct ResetRequestArgs { + pub reset_type: ResetType, +} +impl<'a> Default for ResetRequestArgs { + #[inline] + fn default() -> Self { + ResetRequestArgs { + reset_type: ResetType::Quick, + } + } +} + +pub struct ResetRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ResetRequestBuilder<'a, 'b> { + #[inline] + pub fn add_reset_type(&mut self, reset_type: ResetType) { + self.fbb_.push_slot::(ResetRequest::VT_RESET_TYPE, reset_type, ResetType::Quick); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + ResetRequestBuilder { + 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 std::fmt::Debug for ResetRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ResetRequest"); + ds.field("reset_type", &self.reset_type()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs index 319ed826..c46a9327 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ResetResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct ResetResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ResetResponse<'a> { - type Inner = ResetResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ResetResponse<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ResetResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args ResetResponseArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ResetResponseBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for ResetResponse<'_> { - #[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 ResetResponseArgs { -} -impl<'a> Default for ResetResponseArgs { - #[inline] - fn default() -> Self { - ResetResponseArgs { - } - } -} - -pub struct ResetResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ResetResponseBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - ResetResponseBuilder { - 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 ResetResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ResetResponse"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ResetResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct ResetResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ResetResponse<'a> { + type Inner = ResetResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ResetResponse<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ResetResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args ResetResponseArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ResetResponseBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for ResetResponse<'_> { + #[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 ResetResponseArgs { +} +impl<'a> Default for ResetResponseArgs { + #[inline] + fn default() -> Self { + ResetResponseArgs { + } + } +} + +pub struct ResetResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ResetResponseBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ResetResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + ResetResponseBuilder { + 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 std::fmt::Debug for ResetResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ResetResponse"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs index 132cf99f..596193d4 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs @@ -1,106 +1,102 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_RESET_TYPE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_RESET_TYPE: 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_RESET_TYPE: [ResetType; 4] = [ - ResetType::Quick, - ResetType::Full, - ResetType::Recalibrate, - ResetType::Mounting, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct ResetType(pub u8); -#[allow(non_upper_case_globals)] -impl ResetType { - pub const Quick: Self = Self(0); - pub const Full: Self = Self(1); - pub const Recalibrate: Self = Self(2); - /// Second pose for calibrating mounting rotation - pub const Mounting: Self = Self(3); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 3; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::Quick, - Self::Full, - Self::Recalibrate, - Self::Mounting, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::Quick => Some("Quick"), - Self::Full => Some("Full"), - Self::Recalibrate => Some("Recalibrate"), - Self::Mounting => Some("Mounting"), - _ => None, - } - } -} -impl core::fmt::Debug for ResetType { - 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 ResetType { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for ResetType { - type Output = ResetType; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for ResetType { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for ResetType { - #[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 ResetType {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_RESET_TYPE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_RESET_TYPE: 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_RESET_TYPE: [ResetType; 4] = [ + ResetType::Quick, + ResetType::Full, + ResetType::Recalibrate, + ResetType::Mounting, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct ResetType(pub u8); +#[allow(non_upper_case_globals)] +impl ResetType { + pub const Quick: Self = Self(0); + pub const Full: Self = Self(1); + pub const Recalibrate: Self = Self(2); + /// Second pose for calibrating mounting rotation + pub const Mounting: Self = Self(3); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 3; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::Quick, + Self::Full, + Self::Recalibrate, + Self::Mounting, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::Quick => Some("Quick"), + Self::Full => Some("Full"), + Self::Recalibrate => Some("Recalibrate"), + Self::Mounting => Some("Mounting"), + _ => None, + } + } +} +impl std::fmt::Debug for ResetType { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 ResetType { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for ResetType { + type Output = ResetType; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for ResetType { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for ResetType { + #[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 ResetType {} 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 d2b6b231..2a2d2ac7 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 @@ -1,199 +1,195 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_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 = 26; -#[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; 27] = [ - RpcMessage::NONE, - RpcMessage::HeartbeatRequest, - RpcMessage::HeartbeatResponse, - RpcMessage::ResetRequest, - RpcMessage::AssignTrackerRequest, - RpcMessage::SettingsRequest, - RpcMessage::SettingsResponse, - RpcMessage::ChangeSettingsRequest, - RpcMessage::RecordBVHRequest, - RpcMessage::RecordBVHStatus, - RpcMessage::SkeletonConfigRequest, - RpcMessage::ChangeSkeletonConfigRequest, - RpcMessage::SkeletonResetAllRequest, - RpcMessage::SkeletonConfigResponse, - RpcMessage::OpenSerialRequest, - RpcMessage::CloseSerialRequest, - RpcMessage::SetWifiRequest, - RpcMessage::SerialUpdateResponse, - RpcMessage::AutoBoneProcessRequest, - RpcMessage::AutoBoneProcessStatusResponse, - RpcMessage::AutoBoneEpochResponse, - RpcMessage::OverlayDisplayModeRequest, - RpcMessage::OverlayDisplayModeChangeRequest, - RpcMessage::OverlayDisplayModeResponse, - RpcMessage::SerialTrackerRebootRequest, - RpcMessage::SerialTrackerGetInfoRequest, - RpcMessage::SerialTrackerFactoryResetRequest, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct RpcMessage(pub u8); -#[allow(non_upper_case_globals)] -impl RpcMessage { - pub const NONE: Self = Self(0); - pub const HeartbeatRequest: Self = Self(1); - pub const HeartbeatResponse: Self = Self(2); - pub const ResetRequest: Self = Self(3); - pub const AssignTrackerRequest: Self = Self(4); - pub const SettingsRequest: Self = Self(5); - pub const SettingsResponse: Self = Self(6); - pub const ChangeSettingsRequest: Self = Self(7); - pub const RecordBVHRequest: Self = Self(8); - pub const RecordBVHStatus: Self = Self(9); - pub const SkeletonConfigRequest: Self = Self(10); - pub const ChangeSkeletonConfigRequest: Self = Self(11); - pub const SkeletonResetAllRequest: Self = Self(12); - pub const SkeletonConfigResponse: Self = Self(13); - pub const OpenSerialRequest: Self = Self(14); - pub const CloseSerialRequest: Self = Self(15); - pub const SetWifiRequest: Self = Self(16); - pub const SerialUpdateResponse: Self = Self(17); - pub const AutoBoneProcessRequest: Self = Self(18); - pub const AutoBoneProcessStatusResponse: Self = Self(19); - pub const AutoBoneEpochResponse: Self = Self(20); - pub const OverlayDisplayModeRequest: Self = Self(21); - pub const OverlayDisplayModeChangeRequest: Self = Self(22); - pub const OverlayDisplayModeResponse: Self = Self(23); - pub const SerialTrackerRebootRequest: Self = Self(24); - pub const SerialTrackerGetInfoRequest: Self = Self(25); - pub const SerialTrackerFactoryResetRequest: Self = Self(26); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 26; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::HeartbeatRequest, - Self::HeartbeatResponse, - Self::ResetRequest, - Self::AssignTrackerRequest, - Self::SettingsRequest, - Self::SettingsResponse, - Self::ChangeSettingsRequest, - Self::RecordBVHRequest, - Self::RecordBVHStatus, - Self::SkeletonConfigRequest, - Self::ChangeSkeletonConfigRequest, - Self::SkeletonResetAllRequest, - Self::SkeletonConfigResponse, - Self::OpenSerialRequest, - Self::CloseSerialRequest, - Self::SetWifiRequest, - Self::SerialUpdateResponse, - Self::AutoBoneProcessRequest, - Self::AutoBoneProcessStatusResponse, - Self::AutoBoneEpochResponse, - Self::OverlayDisplayModeRequest, - Self::OverlayDisplayModeChangeRequest, - Self::OverlayDisplayModeResponse, - Self::SerialTrackerRebootRequest, - Self::SerialTrackerGetInfoRequest, - Self::SerialTrackerFactoryResetRequest, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::HeartbeatRequest => Some("HeartbeatRequest"), - Self::HeartbeatResponse => Some("HeartbeatResponse"), - Self::ResetRequest => Some("ResetRequest"), - Self::AssignTrackerRequest => Some("AssignTrackerRequest"), - Self::SettingsRequest => Some("SettingsRequest"), - Self::SettingsResponse => Some("SettingsResponse"), - Self::ChangeSettingsRequest => Some("ChangeSettingsRequest"), - Self::RecordBVHRequest => Some("RecordBVHRequest"), - Self::RecordBVHStatus => Some("RecordBVHStatus"), - Self::SkeletonConfigRequest => Some("SkeletonConfigRequest"), - Self::ChangeSkeletonConfigRequest => Some("ChangeSkeletonConfigRequest"), - Self::SkeletonResetAllRequest => Some("SkeletonResetAllRequest"), - Self::SkeletonConfigResponse => Some("SkeletonConfigResponse"), - Self::OpenSerialRequest => Some("OpenSerialRequest"), - Self::CloseSerialRequest => Some("CloseSerialRequest"), - Self::SetWifiRequest => Some("SetWifiRequest"), - Self::SerialUpdateResponse => Some("SerialUpdateResponse"), - Self::AutoBoneProcessRequest => Some("AutoBoneProcessRequest"), - Self::AutoBoneProcessStatusResponse => Some("AutoBoneProcessStatusResponse"), - Self::AutoBoneEpochResponse => Some("AutoBoneEpochResponse"), - Self::OverlayDisplayModeRequest => Some("OverlayDisplayModeRequest"), - Self::OverlayDisplayModeChangeRequest => Some("OverlayDisplayModeChangeRequest"), - Self::OverlayDisplayModeResponse => Some("OverlayDisplayModeResponse"), - Self::SerialTrackerRebootRequest => Some("SerialTrackerRebootRequest"), - Self::SerialTrackerGetInfoRequest => Some("SerialTrackerGetInfoRequest"), - Self::SerialTrackerFactoryResetRequest => Some("SerialTrackerFactoryResetRequest"), - _ => None, - } - } -} -impl core::fmt::Debug for RpcMessage { - 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 RpcMessage { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for RpcMessage { - type Output = RpcMessage; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for RpcMessage { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for RpcMessage { - #[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 RpcMessage {} -pub struct RpcMessageUnionTableOffset {} - +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_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 = 26; +#[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; 27] = [ + RpcMessage::NONE, + RpcMessage::HeartbeatRequest, + RpcMessage::HeartbeatResponse, + RpcMessage::ResetRequest, + RpcMessage::AssignTrackerRequest, + RpcMessage::SettingsRequest, + RpcMessage::SettingsResponse, + RpcMessage::ChangeSettingsRequest, + RpcMessage::RecordBVHRequest, + RpcMessage::RecordBVHStatus, + RpcMessage::SkeletonConfigRequest, + RpcMessage::ChangeSkeletonConfigRequest, + RpcMessage::SkeletonResetAllRequest, + RpcMessage::SkeletonConfigResponse, + RpcMessage::OpenSerialRequest, + RpcMessage::CloseSerialRequest, + RpcMessage::SetWifiRequest, + RpcMessage::SerialUpdateResponse, + RpcMessage::AutoBoneProcessRequest, + RpcMessage::AutoBoneProcessStatusResponse, + RpcMessage::AutoBoneEpochResponse, + RpcMessage::OverlayDisplayModeRequest, + RpcMessage::OverlayDisplayModeChangeRequest, + RpcMessage::OverlayDisplayModeResponse, + RpcMessage::SerialTrackerRebootRequest, + RpcMessage::SerialTrackerGetInfoRequest, + RpcMessage::SerialTrackerFactoryResetRequest, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct RpcMessage(pub u8); +#[allow(non_upper_case_globals)] +impl RpcMessage { + pub const NONE: Self = Self(0); + pub const HeartbeatRequest: Self = Self(1); + pub const HeartbeatResponse: Self = Self(2); + pub const ResetRequest: Self = Self(3); + pub const AssignTrackerRequest: Self = Self(4); + pub const SettingsRequest: Self = Self(5); + pub const SettingsResponse: Self = Self(6); + pub const ChangeSettingsRequest: Self = Self(7); + pub const RecordBVHRequest: Self = Self(8); + pub const RecordBVHStatus: Self = Self(9); + pub const SkeletonConfigRequest: Self = Self(10); + pub const ChangeSkeletonConfigRequest: Self = Self(11); + pub const SkeletonResetAllRequest: Self = Self(12); + pub const SkeletonConfigResponse: Self = Self(13); + pub const OpenSerialRequest: Self = Self(14); + pub const CloseSerialRequest: Self = Self(15); + pub const SetWifiRequest: Self = Self(16); + pub const SerialUpdateResponse: Self = Self(17); + pub const AutoBoneProcessRequest: Self = Self(18); + pub const AutoBoneProcessStatusResponse: Self = Self(19); + pub const AutoBoneEpochResponse: Self = Self(20); + pub const OverlayDisplayModeRequest: Self = Self(21); + pub const OverlayDisplayModeChangeRequest: Self = Self(22); + pub const OverlayDisplayModeResponse: Self = Self(23); + pub const SerialTrackerRebootRequest: Self = Self(24); + pub const SerialTrackerGetInfoRequest: Self = Self(25); + pub const SerialTrackerFactoryResetRequest: Self = Self(26); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 26; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::HeartbeatRequest, + Self::HeartbeatResponse, + Self::ResetRequest, + Self::AssignTrackerRequest, + Self::SettingsRequest, + Self::SettingsResponse, + Self::ChangeSettingsRequest, + Self::RecordBVHRequest, + Self::RecordBVHStatus, + Self::SkeletonConfigRequest, + Self::ChangeSkeletonConfigRequest, + Self::SkeletonResetAllRequest, + Self::SkeletonConfigResponse, + Self::OpenSerialRequest, + Self::CloseSerialRequest, + Self::SetWifiRequest, + Self::SerialUpdateResponse, + Self::AutoBoneProcessRequest, + Self::AutoBoneProcessStatusResponse, + Self::AutoBoneEpochResponse, + Self::OverlayDisplayModeRequest, + Self::OverlayDisplayModeChangeRequest, + Self::OverlayDisplayModeResponse, + Self::SerialTrackerRebootRequest, + Self::SerialTrackerGetInfoRequest, + Self::SerialTrackerFactoryResetRequest, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::HeartbeatRequest => Some("HeartbeatRequest"), + Self::HeartbeatResponse => Some("HeartbeatResponse"), + Self::ResetRequest => Some("ResetRequest"), + Self::AssignTrackerRequest => Some("AssignTrackerRequest"), + Self::SettingsRequest => Some("SettingsRequest"), + Self::SettingsResponse => Some("SettingsResponse"), + Self::ChangeSettingsRequest => Some("ChangeSettingsRequest"), + Self::RecordBVHRequest => Some("RecordBVHRequest"), + Self::RecordBVHStatus => Some("RecordBVHStatus"), + Self::SkeletonConfigRequest => Some("SkeletonConfigRequest"), + Self::ChangeSkeletonConfigRequest => Some("ChangeSkeletonConfigRequest"), + Self::SkeletonResetAllRequest => Some("SkeletonResetAllRequest"), + Self::SkeletonConfigResponse => Some("SkeletonConfigResponse"), + Self::OpenSerialRequest => Some("OpenSerialRequest"), + Self::CloseSerialRequest => Some("CloseSerialRequest"), + Self::SetWifiRequest => Some("SetWifiRequest"), + Self::SerialUpdateResponse => Some("SerialUpdateResponse"), + Self::AutoBoneProcessRequest => Some("AutoBoneProcessRequest"), + Self::AutoBoneProcessStatusResponse => Some("AutoBoneProcessStatusResponse"), + Self::AutoBoneEpochResponse => Some("AutoBoneEpochResponse"), + Self::OverlayDisplayModeRequest => Some("OverlayDisplayModeRequest"), + Self::OverlayDisplayModeChangeRequest => Some("OverlayDisplayModeChangeRequest"), + Self::OverlayDisplayModeResponse => Some("OverlayDisplayModeResponse"), + Self::SerialTrackerRebootRequest => Some("SerialTrackerRebootRequest"), + Self::SerialTrackerGetInfoRequest => Some("SerialTrackerGetInfoRequest"), + Self::SerialTrackerFactoryResetRequest => Some("SerialTrackerFactoryResetRequest"), + _ => None, + } + } +} +impl std::fmt::Debug for RpcMessage { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 RpcMessage { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for RpcMessage { + type Output = RpcMessage; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for RpcMessage { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for RpcMessage { + #[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 RpcMessage {} +pub struct RpcMessageUnionTableOffset {} + 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 bf3bc9d6..cbb4595b 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 @@ -1,610 +1,606 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 RpcMessageHeaderOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct RpcMessageHeader<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for RpcMessageHeader<'a> { - type Inner = RpcMessageHeader<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> RpcMessageHeader<'a> { - pub const VT_TX_ID: flatbuffers::VOffsetT = 4; - pub const VT_MESSAGE_TYPE: flatbuffers::VOffsetT = 6; - pub const VT_MESSAGE: flatbuffers::VOffsetT = 8; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - RpcMessageHeader { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args RpcMessageHeaderArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = RpcMessageHeaderBuilder::new(_fbb); - if let Some(x) = args.message { builder.add_message(x); } - if let Some(x) = args.tx_id { builder.add_tx_id(x); } - builder.add_message_type(args.message_type); - builder.finish() - } - - - /// For a request, this identifies the request. For a response, this corresponds - /// to the request that it is responding to. - #[inline] - pub fn tx_id(&self) -> Option<&'a super::datatypes::TransactionId> { - self._tab.get::(RpcMessageHeader::VT_TX_ID, None) - } - #[inline] - pub fn message_type(&self) -> RpcMessage { - self._tab.get::(RpcMessageHeader::VT_MESSAGE_TYPE, Some(RpcMessage::NONE)).unwrap() - } - #[inline] - pub fn message(&self) -> Option> { - self._tab.get::>>(RpcMessageHeader::VT_MESSAGE, None) - } - #[inline] - #[allow(non_snake_case)] - pub fn message_as_heartbeat_request(&self) -> Option> { - if self.message_type() == RpcMessage::HeartbeatRequest { - self.message().map(HeartbeatRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_heartbeat_response(&self) -> Option> { - if self.message_type() == RpcMessage::HeartbeatResponse { - self.message().map(HeartbeatResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_reset_request(&self) -> Option> { - if self.message_type() == RpcMessage::ResetRequest { - self.message().map(ResetRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_assign_tracker_request(&self) -> Option> { - if self.message_type() == RpcMessage::AssignTrackerRequest { - self.message().map(AssignTrackerRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_settings_request(&self) -> Option> { - if self.message_type() == RpcMessage::SettingsRequest { - self.message().map(SettingsRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_settings_response(&self) -> Option> { - if self.message_type() == RpcMessage::SettingsResponse { - self.message().map(SettingsResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_change_settings_request(&self) -> Option> { - if self.message_type() == RpcMessage::ChangeSettingsRequest { - self.message().map(ChangeSettingsRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_record_bvhrequest(&self) -> Option> { - if self.message_type() == RpcMessage::RecordBVHRequest { - self.message().map(RecordBVHRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_record_bvhstatus(&self) -> Option> { - if self.message_type() == RpcMessage::RecordBVHStatus { - self.message().map(RecordBVHStatus::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_skeleton_config_request(&self) -> Option> { - if self.message_type() == RpcMessage::SkeletonConfigRequest { - self.message().map(SkeletonConfigRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_change_skeleton_config_request(&self) -> Option> { - if self.message_type() == RpcMessage::ChangeSkeletonConfigRequest { - self.message().map(ChangeSkeletonConfigRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_skeleton_reset_all_request(&self) -> Option> { - if self.message_type() == RpcMessage::SkeletonResetAllRequest { - self.message().map(SkeletonResetAllRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_skeleton_config_response(&self) -> Option> { - if self.message_type() == RpcMessage::SkeletonConfigResponse { - self.message().map(SkeletonConfigResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_open_serial_request(&self) -> Option> { - if self.message_type() == RpcMessage::OpenSerialRequest { - self.message().map(OpenSerialRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_close_serial_request(&self) -> Option> { - if self.message_type() == RpcMessage::CloseSerialRequest { - self.message().map(CloseSerialRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_set_wifi_request(&self) -> Option> { - if self.message_type() == RpcMessage::SetWifiRequest { - self.message().map(SetWifiRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_update_response(&self) -> Option> { - if self.message_type() == RpcMessage::SerialUpdateResponse { - self.message().map(SerialUpdateResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_auto_bone_process_request(&self) -> Option> { - if self.message_type() == RpcMessage::AutoBoneProcessRequest { - self.message().map(AutoBoneProcessRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_auto_bone_process_status_response(&self) -> Option> { - if self.message_type() == RpcMessage::AutoBoneProcessStatusResponse { - self.message().map(AutoBoneProcessStatusResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_auto_bone_epoch_response(&self) -> Option> { - if self.message_type() == RpcMessage::AutoBoneEpochResponse { - self.message().map(AutoBoneEpochResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_overlay_display_mode_request(&self) -> Option> { - if self.message_type() == RpcMessage::OverlayDisplayModeRequest { - self.message().map(OverlayDisplayModeRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_overlay_display_mode_change_request(&self) -> Option> { - if self.message_type() == RpcMessage::OverlayDisplayModeChangeRequest { - self.message().map(OverlayDisplayModeChangeRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_overlay_display_mode_response(&self) -> Option> { - if self.message_type() == RpcMessage::OverlayDisplayModeResponse { - self.message().map(OverlayDisplayModeResponse::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_tracker_reboot_request(&self) -> Option> { - if self.message_type() == RpcMessage::SerialTrackerRebootRequest { - self.message().map(SerialTrackerRebootRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_tracker_get_info_request(&self) -> Option> { - if self.message_type() == RpcMessage::SerialTrackerGetInfoRequest { - self.message().map(SerialTrackerGetInfoRequest::init_from_table) - } else { - None - } - } - - #[inline] - #[allow(non_snake_case)] - pub fn message_as_serial_tracker_factory_reset_request(&self) -> Option> { - if self.message_type() == RpcMessage::SerialTrackerFactoryResetRequest { - self.message().map(SerialTrackerFactoryResetRequest::init_from_table) - } else { - None - } - } - -} - -impl flatbuffers::Verifiable for RpcMessageHeader<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("tx_id", Self::VT_TX_ID, false)? - .visit_union::("message_type", Self::VT_MESSAGE_TYPE, "message", Self::VT_MESSAGE, false, |key, v, pos| { - match key { - RpcMessage::HeartbeatRequest => v.verify_union_variant::>("RpcMessage::HeartbeatRequest", pos), - RpcMessage::HeartbeatResponse => v.verify_union_variant::>("RpcMessage::HeartbeatResponse", pos), - RpcMessage::ResetRequest => v.verify_union_variant::>("RpcMessage::ResetRequest", pos), - RpcMessage::AssignTrackerRequest => v.verify_union_variant::>("RpcMessage::AssignTrackerRequest", pos), - RpcMessage::SettingsRequest => v.verify_union_variant::>("RpcMessage::SettingsRequest", pos), - RpcMessage::SettingsResponse => v.verify_union_variant::>("RpcMessage::SettingsResponse", pos), - RpcMessage::ChangeSettingsRequest => v.verify_union_variant::>("RpcMessage::ChangeSettingsRequest", pos), - RpcMessage::RecordBVHRequest => v.verify_union_variant::>("RpcMessage::RecordBVHRequest", pos), - RpcMessage::RecordBVHStatus => v.verify_union_variant::>("RpcMessage::RecordBVHStatus", pos), - RpcMessage::SkeletonConfigRequest => v.verify_union_variant::>("RpcMessage::SkeletonConfigRequest", pos), - RpcMessage::ChangeSkeletonConfigRequest => v.verify_union_variant::>("RpcMessage::ChangeSkeletonConfigRequest", pos), - RpcMessage::SkeletonResetAllRequest => v.verify_union_variant::>("RpcMessage::SkeletonResetAllRequest", pos), - RpcMessage::SkeletonConfigResponse => v.verify_union_variant::>("RpcMessage::SkeletonConfigResponse", pos), - RpcMessage::OpenSerialRequest => v.verify_union_variant::>("RpcMessage::OpenSerialRequest", pos), - RpcMessage::CloseSerialRequest => v.verify_union_variant::>("RpcMessage::CloseSerialRequest", pos), - RpcMessage::SetWifiRequest => v.verify_union_variant::>("RpcMessage::SetWifiRequest", pos), - RpcMessage::SerialUpdateResponse => v.verify_union_variant::>("RpcMessage::SerialUpdateResponse", pos), - RpcMessage::AutoBoneProcessRequest => v.verify_union_variant::>("RpcMessage::AutoBoneProcessRequest", pos), - RpcMessage::AutoBoneProcessStatusResponse => v.verify_union_variant::>("RpcMessage::AutoBoneProcessStatusResponse", pos), - RpcMessage::AutoBoneEpochResponse => v.verify_union_variant::>("RpcMessage::AutoBoneEpochResponse", pos), - RpcMessage::OverlayDisplayModeRequest => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeRequest", pos), - RpcMessage::OverlayDisplayModeChangeRequest => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeChangeRequest", pos), - RpcMessage::OverlayDisplayModeResponse => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeResponse", pos), - RpcMessage::SerialTrackerRebootRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerRebootRequest", pos), - RpcMessage::SerialTrackerGetInfoRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetInfoRequest", pos), - RpcMessage::SerialTrackerFactoryResetRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerFactoryResetRequest", pos), - _ => Ok(()), - } - })? - .finish(); - Ok(()) - } -} -pub struct RpcMessageHeaderArgs<'a> { - pub tx_id: Option<&'a super::datatypes::TransactionId>, - pub message_type: RpcMessage, - pub message: Option>, -} -impl<'a> Default for RpcMessageHeaderArgs<'a> { - #[inline] - fn default() -> Self { - RpcMessageHeaderArgs { - tx_id: None, - message_type: RpcMessage::NONE, - message: None, - } - } -} - -pub struct RpcMessageHeaderBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> RpcMessageHeaderBuilder<'a, 'b> { - #[inline] - pub fn add_tx_id(&mut self, tx_id: &super::datatypes::TransactionId) { - self.fbb_.push_slot_always::<&super::datatypes::TransactionId>(RpcMessageHeader::VT_TX_ID, tx_id); - } - #[inline] - pub fn add_message_type(&mut self, message_type: RpcMessage) { - self.fbb_.push_slot::(RpcMessageHeader::VT_MESSAGE_TYPE, message_type, RpcMessage::NONE); - } - #[inline] - pub fn add_message(&mut self, message: flatbuffers::WIPOffset) { - self.fbb_.push_slot_always::>(RpcMessageHeader::VT_MESSAGE, message); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RpcMessageHeaderBuilder<'a, 'b> { - let start = _fbb.start_table(); - RpcMessageHeaderBuilder { - 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 RpcMessageHeader<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("RpcMessageHeader"); - ds.field("tx_id", &self.tx_id()); - ds.field("message_type", &self.message_type()); - match self.message_type() { - RpcMessage::HeartbeatRequest => { - if let Some(x) = self.message_as_heartbeat_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::HeartbeatResponse => { - if let Some(x) = self.message_as_heartbeat_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ResetRequest => { - if let Some(x) = self.message_as_reset_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AssignTrackerRequest => { - if let Some(x) = self.message_as_assign_tracker_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SettingsRequest => { - if let Some(x) = self.message_as_settings_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SettingsResponse => { - if let Some(x) = self.message_as_settings_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ChangeSettingsRequest => { - if let Some(x) = self.message_as_change_settings_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::RecordBVHRequest => { - if let Some(x) = self.message_as_record_bvhrequest() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::RecordBVHStatus => { - if let Some(x) = self.message_as_record_bvhstatus() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SkeletonConfigRequest => { - if let Some(x) = self.message_as_skeleton_config_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::ChangeSkeletonConfigRequest => { - if let Some(x) = self.message_as_change_skeleton_config_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SkeletonResetAllRequest => { - if let Some(x) = self.message_as_skeleton_reset_all_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SkeletonConfigResponse => { - if let Some(x) = self.message_as_skeleton_config_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::OpenSerialRequest => { - if let Some(x) = self.message_as_open_serial_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::CloseSerialRequest => { - if let Some(x) = self.message_as_close_serial_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SetWifiRequest => { - if let Some(x) = self.message_as_set_wifi_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SerialUpdateResponse => { - if let Some(x) = self.message_as_serial_update_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AutoBoneProcessRequest => { - if let Some(x) = self.message_as_auto_bone_process_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AutoBoneProcessStatusResponse => { - if let Some(x) = self.message_as_auto_bone_process_status_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::AutoBoneEpochResponse => { - if let Some(x) = self.message_as_auto_bone_epoch_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::OverlayDisplayModeRequest => { - if let Some(x) = self.message_as_overlay_display_mode_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::OverlayDisplayModeChangeRequest => { - if let Some(x) = self.message_as_overlay_display_mode_change_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::OverlayDisplayModeResponse => { - if let Some(x) = self.message_as_overlay_display_mode_response() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SerialTrackerRebootRequest => { - if let Some(x) = self.message_as_serial_tracker_reboot_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SerialTrackerGetInfoRequest => { - if let Some(x) = self.message_as_serial_tracker_get_info_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - RpcMessage::SerialTrackerFactoryResetRequest => { - if let Some(x) = self.message_as_serial_tracker_factory_reset_request() { - ds.field("message", &x) - } else { - ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") - } - }, - _ => { - let x: Option<()> = None; - ds.field("message", &x) - }, - }; - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum RpcMessageHeaderOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct RpcMessageHeader<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for RpcMessageHeader<'a> { + type Inner = RpcMessageHeader<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> RpcMessageHeader<'a> { + pub const VT_TX_ID: flatbuffers::VOffsetT = 4; + pub const VT_MESSAGE_TYPE: flatbuffers::VOffsetT = 6; + pub const VT_MESSAGE: flatbuffers::VOffsetT = 8; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + RpcMessageHeader { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args RpcMessageHeaderArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = RpcMessageHeaderBuilder::new(_fbb); + if let Some(x) = args.message { builder.add_message(x); } + if let Some(x) = args.tx_id { builder.add_tx_id(x); } + builder.add_message_type(args.message_type); + builder.finish() + } + + + /// For a request, this identifies the request. For a response, this corresponds + /// to the request that it is responding to. + #[inline] + pub fn tx_id(&self) -> Option<&'a super::datatypes::TransactionId> { + self._tab.get::(RpcMessageHeader::VT_TX_ID, None) + } + #[inline] + pub fn message_type(&self) -> RpcMessage { + self._tab.get::(RpcMessageHeader::VT_MESSAGE_TYPE, Some(RpcMessage::NONE)).unwrap() + } + #[inline] + pub fn message(&self) -> Option> { + self._tab.get::>>(RpcMessageHeader::VT_MESSAGE, None) + } + #[inline] + #[allow(non_snake_case)] + pub fn message_as_heartbeat_request(&self) -> Option> { + if self.message_type() == RpcMessage::HeartbeatRequest { + self.message().map(HeartbeatRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_heartbeat_response(&self) -> Option> { + if self.message_type() == RpcMessage::HeartbeatResponse { + self.message().map(HeartbeatResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_reset_request(&self) -> Option> { + if self.message_type() == RpcMessage::ResetRequest { + self.message().map(ResetRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_assign_tracker_request(&self) -> Option> { + if self.message_type() == RpcMessage::AssignTrackerRequest { + self.message().map(AssignTrackerRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_settings_request(&self) -> Option> { + if self.message_type() == RpcMessage::SettingsRequest { + self.message().map(SettingsRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_settings_response(&self) -> Option> { + if self.message_type() == RpcMessage::SettingsResponse { + self.message().map(SettingsResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_change_settings_request(&self) -> Option> { + if self.message_type() == RpcMessage::ChangeSettingsRequest { + self.message().map(ChangeSettingsRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_record_bvhrequest(&self) -> Option> { + if self.message_type() == RpcMessage::RecordBVHRequest { + self.message().map(RecordBVHRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_record_bvhstatus(&self) -> Option> { + if self.message_type() == RpcMessage::RecordBVHStatus { + self.message().map(RecordBVHStatus::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_skeleton_config_request(&self) -> Option> { + if self.message_type() == RpcMessage::SkeletonConfigRequest { + self.message().map(SkeletonConfigRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_change_skeleton_config_request(&self) -> Option> { + if self.message_type() == RpcMessage::ChangeSkeletonConfigRequest { + self.message().map(ChangeSkeletonConfigRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_skeleton_reset_all_request(&self) -> Option> { + if self.message_type() == RpcMessage::SkeletonResetAllRequest { + self.message().map(SkeletonResetAllRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_skeleton_config_response(&self) -> Option> { + if self.message_type() == RpcMessage::SkeletonConfigResponse { + self.message().map(SkeletonConfigResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_open_serial_request(&self) -> Option> { + if self.message_type() == RpcMessage::OpenSerialRequest { + self.message().map(OpenSerialRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_close_serial_request(&self) -> Option> { + if self.message_type() == RpcMessage::CloseSerialRequest { + self.message().map(CloseSerialRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_set_wifi_request(&self) -> Option> { + if self.message_type() == RpcMessage::SetWifiRequest { + self.message().map(SetWifiRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_update_response(&self) -> Option> { + if self.message_type() == RpcMessage::SerialUpdateResponse { + self.message().map(SerialUpdateResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_auto_bone_process_request(&self) -> Option> { + if self.message_type() == RpcMessage::AutoBoneProcessRequest { + self.message().map(AutoBoneProcessRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_auto_bone_process_status_response(&self) -> Option> { + if self.message_type() == RpcMessage::AutoBoneProcessStatusResponse { + self.message().map(AutoBoneProcessStatusResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_auto_bone_epoch_response(&self) -> Option> { + if self.message_type() == RpcMessage::AutoBoneEpochResponse { + self.message().map(AutoBoneEpochResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_overlay_display_mode_request(&self) -> Option> { + if self.message_type() == RpcMessage::OverlayDisplayModeRequest { + self.message().map(OverlayDisplayModeRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_overlay_display_mode_change_request(&self) -> Option> { + if self.message_type() == RpcMessage::OverlayDisplayModeChangeRequest { + self.message().map(OverlayDisplayModeChangeRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_overlay_display_mode_response(&self) -> Option> { + if self.message_type() == RpcMessage::OverlayDisplayModeResponse { + self.message().map(OverlayDisplayModeResponse::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_reboot_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerRebootRequest { + self.message().map(SerialTrackerRebootRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_get_info_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerGetInfoRequest { + self.message().map(SerialTrackerGetInfoRequest::init_from_table) + } else { + None + } + } + + #[inline] + #[allow(non_snake_case)] + pub fn message_as_serial_tracker_factory_reset_request(&self) -> Option> { + if self.message_type() == RpcMessage::SerialTrackerFactoryResetRequest { + self.message().map(SerialTrackerFactoryResetRequest::init_from_table) + } else { + None + } + } + +} + +impl flatbuffers::Verifiable for RpcMessageHeader<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("tx_id", Self::VT_TX_ID, false)? + .visit_union::("message_type", Self::VT_MESSAGE_TYPE, "message", Self::VT_MESSAGE, false, |key, v, pos| { + match key { + RpcMessage::HeartbeatRequest => v.verify_union_variant::>("RpcMessage::HeartbeatRequest", pos), + RpcMessage::HeartbeatResponse => v.verify_union_variant::>("RpcMessage::HeartbeatResponse", pos), + RpcMessage::ResetRequest => v.verify_union_variant::>("RpcMessage::ResetRequest", pos), + RpcMessage::AssignTrackerRequest => v.verify_union_variant::>("RpcMessage::AssignTrackerRequest", pos), + RpcMessage::SettingsRequest => v.verify_union_variant::>("RpcMessage::SettingsRequest", pos), + RpcMessage::SettingsResponse => v.verify_union_variant::>("RpcMessage::SettingsResponse", pos), + RpcMessage::ChangeSettingsRequest => v.verify_union_variant::>("RpcMessage::ChangeSettingsRequest", pos), + RpcMessage::RecordBVHRequest => v.verify_union_variant::>("RpcMessage::RecordBVHRequest", pos), + RpcMessage::RecordBVHStatus => v.verify_union_variant::>("RpcMessage::RecordBVHStatus", pos), + RpcMessage::SkeletonConfigRequest => v.verify_union_variant::>("RpcMessage::SkeletonConfigRequest", pos), + RpcMessage::ChangeSkeletonConfigRequest => v.verify_union_variant::>("RpcMessage::ChangeSkeletonConfigRequest", pos), + RpcMessage::SkeletonResetAllRequest => v.verify_union_variant::>("RpcMessage::SkeletonResetAllRequest", pos), + RpcMessage::SkeletonConfigResponse => v.verify_union_variant::>("RpcMessage::SkeletonConfigResponse", pos), + RpcMessage::OpenSerialRequest => v.verify_union_variant::>("RpcMessage::OpenSerialRequest", pos), + RpcMessage::CloseSerialRequest => v.verify_union_variant::>("RpcMessage::CloseSerialRequest", pos), + RpcMessage::SetWifiRequest => v.verify_union_variant::>("RpcMessage::SetWifiRequest", pos), + RpcMessage::SerialUpdateResponse => v.verify_union_variant::>("RpcMessage::SerialUpdateResponse", pos), + RpcMessage::AutoBoneProcessRequest => v.verify_union_variant::>("RpcMessage::AutoBoneProcessRequest", pos), + RpcMessage::AutoBoneProcessStatusResponse => v.verify_union_variant::>("RpcMessage::AutoBoneProcessStatusResponse", pos), + RpcMessage::AutoBoneEpochResponse => v.verify_union_variant::>("RpcMessage::AutoBoneEpochResponse", pos), + RpcMessage::OverlayDisplayModeRequest => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeRequest", pos), + RpcMessage::OverlayDisplayModeChangeRequest => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeChangeRequest", pos), + RpcMessage::OverlayDisplayModeResponse => v.verify_union_variant::>("RpcMessage::OverlayDisplayModeResponse", pos), + RpcMessage::SerialTrackerRebootRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerRebootRequest", pos), + RpcMessage::SerialTrackerGetInfoRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerGetInfoRequest", pos), + RpcMessage::SerialTrackerFactoryResetRequest => v.verify_union_variant::>("RpcMessage::SerialTrackerFactoryResetRequest", pos), + _ => Ok(()), + } + })? + .finish(); + Ok(()) + } +} +pub struct RpcMessageHeaderArgs<'a> { + pub tx_id: Option<&'a super::datatypes::TransactionId>, + pub message_type: RpcMessage, + pub message: Option>, +} +impl<'a> Default for RpcMessageHeaderArgs<'a> { + #[inline] + fn default() -> Self { + RpcMessageHeaderArgs { + tx_id: None, + message_type: RpcMessage::NONE, + message: None, + } + } +} + +pub struct RpcMessageHeaderBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> RpcMessageHeaderBuilder<'a, 'b> { + #[inline] + pub fn add_tx_id(&mut self, tx_id: &super::datatypes::TransactionId) { + self.fbb_.push_slot_always::<&super::datatypes::TransactionId>(RpcMessageHeader::VT_TX_ID, tx_id); + } + #[inline] + pub fn add_message_type(&mut self, message_type: RpcMessage) { + self.fbb_.push_slot::(RpcMessageHeader::VT_MESSAGE_TYPE, message_type, RpcMessage::NONE); + } + #[inline] + pub fn add_message(&mut self, message: flatbuffers::WIPOffset) { + self.fbb_.push_slot_always::>(RpcMessageHeader::VT_MESSAGE, message); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> RpcMessageHeaderBuilder<'a, 'b> { + let start = _fbb.start_table(); + RpcMessageHeaderBuilder { + 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 std::fmt::Debug for RpcMessageHeader<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("RpcMessageHeader"); + ds.field("tx_id", &self.tx_id()); + ds.field("message_type", &self.message_type()); + match self.message_type() { + RpcMessage::HeartbeatRequest => { + if let Some(x) = self.message_as_heartbeat_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::HeartbeatResponse => { + if let Some(x) = self.message_as_heartbeat_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ResetRequest => { + if let Some(x) = self.message_as_reset_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AssignTrackerRequest => { + if let Some(x) = self.message_as_assign_tracker_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SettingsRequest => { + if let Some(x) = self.message_as_settings_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SettingsResponse => { + if let Some(x) = self.message_as_settings_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ChangeSettingsRequest => { + if let Some(x) = self.message_as_change_settings_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::RecordBVHRequest => { + if let Some(x) = self.message_as_record_bvhrequest() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::RecordBVHStatus => { + if let Some(x) = self.message_as_record_bvhstatus() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SkeletonConfigRequest => { + if let Some(x) = self.message_as_skeleton_config_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::ChangeSkeletonConfigRequest => { + if let Some(x) = self.message_as_change_skeleton_config_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SkeletonResetAllRequest => { + if let Some(x) = self.message_as_skeleton_reset_all_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SkeletonConfigResponse => { + if let Some(x) = self.message_as_skeleton_config_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::OpenSerialRequest => { + if let Some(x) = self.message_as_open_serial_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::CloseSerialRequest => { + if let Some(x) = self.message_as_close_serial_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SetWifiRequest => { + if let Some(x) = self.message_as_set_wifi_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialUpdateResponse => { + if let Some(x) = self.message_as_serial_update_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AutoBoneProcessRequest => { + if let Some(x) = self.message_as_auto_bone_process_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AutoBoneProcessStatusResponse => { + if let Some(x) = self.message_as_auto_bone_process_status_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::AutoBoneEpochResponse => { + if let Some(x) = self.message_as_auto_bone_epoch_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::OverlayDisplayModeRequest => { + if let Some(x) = self.message_as_overlay_display_mode_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::OverlayDisplayModeChangeRequest => { + if let Some(x) = self.message_as_overlay_display_mode_change_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::OverlayDisplayModeResponse => { + if let Some(x) = self.message_as_overlay_display_mode_response() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialTrackerRebootRequest => { + if let Some(x) = self.message_as_serial_tracker_reboot_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialTrackerGetInfoRequest => { + if let Some(x) = self.message_as_serial_tracker_get_info_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + RpcMessage::SerialTrackerFactoryResetRequest => { + if let Some(x) = self.message_as_serial_tracker_factory_reset_request() { + ds.field("message", &x) + } else { + ds.field("message", &"InvalidFlatbuffer: Union discriminant does not match value.") + } + }, + _ => { + let x: Option<()> = None; + ds.field("message", &x) + }, + }; + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs index a88871db..042def32 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs @@ -1,11 +1,7 @@ // automatically generated by the FlatBuffers compiler, do not modify -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 std::mem; +use std::cmp::Ordering; use self::flatbuffers::{EndianScalar, Follow}; use super::*; pub enum SerialTrackerFactoryResetRequestOffset {} @@ -82,8 +78,8 @@ impl<'a: 'b, 'b> SerialTrackerFactoryResetRequestBuilder<'a, 'b> { } } -impl core::fmt::Debug for SerialTrackerFactoryResetRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Debug for SerialTrackerFactoryResetRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut ds = f.debug_struct("SerialTrackerFactoryResetRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs index 8fff431b..36b93ecb 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs @@ -1,11 +1,7 @@ // automatically generated by the FlatBuffers compiler, do not modify -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 std::mem; +use std::cmp::Ordering; use self::flatbuffers::{EndianScalar, Follow}; use super::*; pub enum SerialTrackerGetInfoRequestOffset {} @@ -82,8 +78,8 @@ impl<'a: 'b, 'b> SerialTrackerGetInfoRequestBuilder<'a, 'b> { } } -impl core::fmt::Debug for SerialTrackerGetInfoRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Debug for SerialTrackerGetInfoRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut ds = f.debug_struct("SerialTrackerGetInfoRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs index ed2e6ca9..4653abb6 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs @@ -1,11 +1,7 @@ // automatically generated by the FlatBuffers compiler, do not modify -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 std::mem; +use std::cmp::Ordering; use self::flatbuffers::{EndianScalar, Follow}; use super::*; pub enum SerialTrackerRebootRequestOffset {} @@ -82,8 +78,8 @@ impl<'a: 'b, 'b> SerialTrackerRebootRequestBuilder<'a, 'b> { } } -impl core::fmt::Debug for SerialTrackerRebootRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { +impl std::fmt::Debug for SerialTrackerRebootRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { let mut ds = f.debug_struct("SerialTrackerRebootRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs index e38e0bee..0be616b6 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs @@ -1,118 +1,114 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SerialUpdateResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SerialUpdateResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SerialUpdateResponse<'a> { - type Inner = SerialUpdateResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SerialUpdateResponse<'a> { - pub const VT_LOG: flatbuffers::VOffsetT = 4; - pub const VT_CLOSED: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SerialUpdateResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SerialUpdateResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SerialUpdateResponseBuilder::new(_fbb); - if let Some(x) = args.log { builder.add_log(x); } - builder.add_closed(args.closed); - builder.finish() - } - - - #[inline] - pub fn log(&self) -> Option<&'a str> { - self._tab.get::>(SerialUpdateResponse::VT_LOG, None) - } - #[inline] - pub fn closed(&self) -> bool { - self._tab.get::(SerialUpdateResponse::VT_CLOSED, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for SerialUpdateResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("log", Self::VT_LOG, false)? - .visit_field::("closed", Self::VT_CLOSED, false)? - .finish(); - Ok(()) - } -} -pub struct SerialUpdateResponseArgs<'a> { - pub log: Option>, - pub closed: bool, -} -impl<'a> Default for SerialUpdateResponseArgs<'a> { - #[inline] - fn default() -> Self { - SerialUpdateResponseArgs { - log: None, - closed: false, - } - } -} - -pub struct SerialUpdateResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SerialUpdateResponseBuilder<'a, 'b> { - #[inline] - pub fn add_log(&mut self, log: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SerialUpdateResponse::VT_LOG, log); - } - #[inline] - pub fn add_closed(&mut self, closed: bool) { - self.fbb_.push_slot::(SerialUpdateResponse::VT_CLOSED, closed, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialUpdateResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - SerialUpdateResponseBuilder { - 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 SerialUpdateResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SerialUpdateResponse"); - ds.field("log", &self.log()); - ds.field("closed", &self.closed()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SerialUpdateResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SerialUpdateResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SerialUpdateResponse<'a> { + type Inner = SerialUpdateResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SerialUpdateResponse<'a> { + pub const VT_LOG: flatbuffers::VOffsetT = 4; + pub const VT_CLOSED: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SerialUpdateResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SerialUpdateResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SerialUpdateResponseBuilder::new(_fbb); + if let Some(x) = args.log { builder.add_log(x); } + builder.add_closed(args.closed); + builder.finish() + } + + + #[inline] + pub fn log(&self) -> Option<&'a str> { + self._tab.get::>(SerialUpdateResponse::VT_LOG, None) + } + #[inline] + pub fn closed(&self) -> bool { + self._tab.get::(SerialUpdateResponse::VT_CLOSED, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for SerialUpdateResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("log", Self::VT_LOG, false)? + .visit_field::("closed", Self::VT_CLOSED, false)? + .finish(); + Ok(()) + } +} +pub struct SerialUpdateResponseArgs<'a> { + pub log: Option>, + pub closed: bool, +} +impl<'a> Default for SerialUpdateResponseArgs<'a> { + #[inline] + fn default() -> Self { + SerialUpdateResponseArgs { + log: None, + closed: false, + } + } +} + +pub struct SerialUpdateResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SerialUpdateResponseBuilder<'a, 'b> { + #[inline] + pub fn add_log(&mut self, log: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SerialUpdateResponse::VT_LOG, log); + } + #[inline] + pub fn add_closed(&mut self, closed: bool) { + self.fbb_.push_slot::(SerialUpdateResponse::VT_CLOSED, closed, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SerialUpdateResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + SerialUpdateResponseBuilder { + 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 std::fmt::Debug for SerialUpdateResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SerialUpdateResponse"); + ds.field("log", &self.log()); + ds.field("closed", &self.closed()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs index f533fec1..fd643360 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs @@ -1,118 +1,114 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SetWifiRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SetWifiRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SetWifiRequest<'a> { - type Inner = SetWifiRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SetWifiRequest<'a> { - pub const VT_SSID: flatbuffers::VOffsetT = 4; - pub const VT_PASSWORD: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SetWifiRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SetWifiRequestArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SetWifiRequestBuilder::new(_fbb); - if let Some(x) = args.password { builder.add_password(x); } - if let Some(x) = args.ssid { builder.add_ssid(x); } - builder.finish() - } - - - #[inline] - pub fn ssid(&self) -> Option<&'a str> { - self._tab.get::>(SetWifiRequest::VT_SSID, None) - } - #[inline] - pub fn password(&self) -> Option<&'a str> { - self._tab.get::>(SetWifiRequest::VT_PASSWORD, None) - } -} - -impl flatbuffers::Verifiable for SetWifiRequest<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("ssid", Self::VT_SSID, false)? - .visit_field::>("password", Self::VT_PASSWORD, false)? - .finish(); - Ok(()) - } -} -pub struct SetWifiRequestArgs<'a> { - pub ssid: Option>, - pub password: Option>, -} -impl<'a> Default for SetWifiRequestArgs<'a> { - #[inline] - fn default() -> Self { - SetWifiRequestArgs { - ssid: None, - password: None, - } - } -} - -pub struct SetWifiRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SetWifiRequestBuilder<'a, 'b> { - #[inline] - pub fn add_ssid(&mut self, ssid: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SetWifiRequest::VT_SSID, ssid); - } - #[inline] - pub fn add_password(&mut self, password: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(SetWifiRequest::VT_PASSWORD, password); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetWifiRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SetWifiRequestBuilder { - 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 SetWifiRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SetWifiRequest"); - ds.field("ssid", &self.ssid()); - ds.field("password", &self.password()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SetWifiRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SetWifiRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SetWifiRequest<'a> { + type Inner = SetWifiRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SetWifiRequest<'a> { + pub const VT_SSID: flatbuffers::VOffsetT = 4; + pub const VT_PASSWORD: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SetWifiRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SetWifiRequestArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SetWifiRequestBuilder::new(_fbb); + if let Some(x) = args.password { builder.add_password(x); } + if let Some(x) = args.ssid { builder.add_ssid(x); } + builder.finish() + } + + + #[inline] + pub fn ssid(&self) -> Option<&'a str> { + self._tab.get::>(SetWifiRequest::VT_SSID, None) + } + #[inline] + pub fn password(&self) -> Option<&'a str> { + self._tab.get::>(SetWifiRequest::VT_PASSWORD, None) + } +} + +impl flatbuffers::Verifiable for SetWifiRequest<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("ssid", Self::VT_SSID, false)? + .visit_field::>("password", Self::VT_PASSWORD, false)? + .finish(); + Ok(()) + } +} +pub struct SetWifiRequestArgs<'a> { + pub ssid: Option>, + pub password: Option>, +} +impl<'a> Default for SetWifiRequestArgs<'a> { + #[inline] + fn default() -> Self { + SetWifiRequestArgs { + ssid: None, + password: None, + } + } +} + +pub struct SetWifiRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SetWifiRequestBuilder<'a, 'b> { + #[inline] + pub fn add_ssid(&mut self, ssid: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SetWifiRequest::VT_SSID, ssid); + } + #[inline] + pub fn add_password(&mut self, password: flatbuffers::WIPOffset<&'b str>) { + self.fbb_.push_slot_always::>(SetWifiRequest::VT_PASSWORD, password); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SetWifiRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SetWifiRequestBuilder { + 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 std::fmt::Debug for SetWifiRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SetWifiRequest"); + ds.field("ssid", &self.ssid()); + ds.field("password", &self.password()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs index 195489c6..e84d594d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs @@ -1,178 +1,174 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ModelRatiosOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Settings for the skeletal model that are ratios. -/// These values range from 0 to 1. -pub struct ModelRatios<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ModelRatios<'a> { - type Inner = ModelRatios<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ModelRatios<'a> { - pub const VT_IMPUTE_WAIST_FROM_CHEST_HIP: flatbuffers::VOffsetT = 4; - pub const VT_IMPUTE_WAIST_FROM_CHEST_LEGS: flatbuffers::VOffsetT = 6; - pub const VT_IMPUTE_HIP_FROM_CHEST_LEGS: flatbuffers::VOffsetT = 8; - pub const VT_IMPUTE_HIP_FROM_WAIST_LEGS: flatbuffers::VOffsetT = 10; - pub const VT_INTERP_HIP_LEGS: flatbuffers::VOffsetT = 12; - pub const VT_INTERP_KNEE_TRACKER_ANKLE: flatbuffers::VOffsetT = 14; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ModelRatios { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ModelRatiosArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ModelRatiosBuilder::new(_fbb); - if let Some(x) = args.interp_knee_tracker_ankle { builder.add_interp_knee_tracker_ankle(x); } - if let Some(x) = args.interp_hip_legs { builder.add_interp_hip_legs(x); } - if let Some(x) = args.impute_hip_from_waist_legs { builder.add_impute_hip_from_waist_legs(x); } - if let Some(x) = args.impute_hip_from_chest_legs { builder.add_impute_hip_from_chest_legs(x); } - if let Some(x) = args.impute_waist_from_chest_legs { builder.add_impute_waist_from_chest_legs(x); } - if let Some(x) = args.impute_waist_from_chest_hip { builder.add_impute_waist_from_chest_hip(x); } - builder.finish() - } - - - #[inline] - pub fn impute_waist_from_chest_hip(&self) -> Option { - self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, None) - } - #[inline] - pub fn impute_waist_from_chest_legs(&self) -> Option { - self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, None) - } - #[inline] - pub fn impute_hip_from_chest_legs(&self) -> Option { - self._tab.get::(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, None) - } - #[inline] - pub fn impute_hip_from_waist_legs(&self) -> Option { - self._tab.get::(ModelRatios::VT_IMPUTE_HIP_FROM_WAIST_LEGS, None) - } - /// Hip's yaw and roll is set to the average of legs when 1.0 - #[inline] - pub fn interp_hip_legs(&self) -> Option { - self._tab.get::(ModelRatios::VT_INTERP_HIP_LEGS, None) - } - /// Knee trackers' yaw and roll is set to the ankle's when 1.0 - #[inline] - pub fn interp_knee_tracker_ankle(&self) -> Option { - self._tab.get::(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, None) - } -} - -impl flatbuffers::Verifiable for ModelRatios<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("impute_waist_from_chest_hip", Self::VT_IMPUTE_WAIST_FROM_CHEST_HIP, false)? - .visit_field::("impute_waist_from_chest_legs", Self::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, false)? - .visit_field::("impute_hip_from_chest_legs", Self::VT_IMPUTE_HIP_FROM_CHEST_LEGS, false)? - .visit_field::("impute_hip_from_waist_legs", Self::VT_IMPUTE_HIP_FROM_WAIST_LEGS, false)? - .visit_field::("interp_hip_legs", Self::VT_INTERP_HIP_LEGS, false)? - .visit_field::("interp_knee_tracker_ankle", Self::VT_INTERP_KNEE_TRACKER_ANKLE, false)? - .finish(); - Ok(()) - } -} -pub struct ModelRatiosArgs { - pub impute_waist_from_chest_hip: Option, - pub impute_waist_from_chest_legs: Option, - pub impute_hip_from_chest_legs: Option, - pub impute_hip_from_waist_legs: Option, - pub interp_hip_legs: Option, - pub interp_knee_tracker_ankle: Option, -} -impl<'a> Default for ModelRatiosArgs { - #[inline] - fn default() -> Self { - ModelRatiosArgs { - impute_waist_from_chest_hip: None, - impute_waist_from_chest_legs: None, - impute_hip_from_chest_legs: None, - impute_hip_from_waist_legs: None, - interp_hip_legs: None, - interp_knee_tracker_ankle: None, - } - } -} - -pub struct ModelRatiosBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ModelRatiosBuilder<'a, 'b> { - #[inline] - pub fn add_impute_waist_from_chest_hip(&mut self, impute_waist_from_chest_hip: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, impute_waist_from_chest_hip); - } - #[inline] - pub fn add_impute_waist_from_chest_legs(&mut self, impute_waist_from_chest_legs: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, impute_waist_from_chest_legs); - } - #[inline] - pub fn add_impute_hip_from_chest_legs(&mut self, impute_hip_from_chest_legs: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, impute_hip_from_chest_legs); - } - #[inline] - pub fn add_impute_hip_from_waist_legs(&mut self, impute_hip_from_waist_legs: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_HIP_FROM_WAIST_LEGS, impute_hip_from_waist_legs); - } - #[inline] - pub fn add_interp_hip_legs(&mut self, interp_hip_legs: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_INTERP_HIP_LEGS, interp_hip_legs); - } - #[inline] - pub fn add_interp_knee_tracker_ankle(&mut self, interp_knee_tracker_ankle: f32) { - self.fbb_.push_slot_always::(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, interp_knee_tracker_ankle); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelRatiosBuilder<'a, 'b> { - let start = _fbb.start_table(); - ModelRatiosBuilder { - 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 ModelRatios<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ModelRatios"); - ds.field("impute_waist_from_chest_hip", &self.impute_waist_from_chest_hip()); - ds.field("impute_waist_from_chest_legs", &self.impute_waist_from_chest_legs()); - ds.field("impute_hip_from_chest_legs", &self.impute_hip_from_chest_legs()); - ds.field("impute_hip_from_waist_legs", &self.impute_hip_from_waist_legs()); - ds.field("interp_hip_legs", &self.interp_hip_legs()); - ds.field("interp_knee_tracker_ankle", &self.interp_knee_tracker_ankle()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ModelRatiosOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Settings for the skeletal model that are ratios. +/// These values range from 0 to 1. +pub struct ModelRatios<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ModelRatios<'a> { + type Inner = ModelRatios<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ModelRatios<'a> { + pub const VT_IMPUTE_WAIST_FROM_CHEST_HIP: flatbuffers::VOffsetT = 4; + pub const VT_IMPUTE_WAIST_FROM_CHEST_LEGS: flatbuffers::VOffsetT = 6; + pub const VT_IMPUTE_HIP_FROM_CHEST_LEGS: flatbuffers::VOffsetT = 8; + pub const VT_IMPUTE_HIP_FROM_WAIST_LEGS: flatbuffers::VOffsetT = 10; + pub const VT_INTERP_HIP_LEGS: flatbuffers::VOffsetT = 12; + pub const VT_INTERP_KNEE_TRACKER_ANKLE: flatbuffers::VOffsetT = 14; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ModelRatios { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ModelRatiosArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ModelRatiosBuilder::new(_fbb); + if let Some(x) = args.interp_knee_tracker_ankle { builder.add_interp_knee_tracker_ankle(x); } + if let Some(x) = args.interp_hip_legs { builder.add_interp_hip_legs(x); } + if let Some(x) = args.impute_hip_from_waist_legs { builder.add_impute_hip_from_waist_legs(x); } + if let Some(x) = args.impute_hip_from_chest_legs { builder.add_impute_hip_from_chest_legs(x); } + if let Some(x) = args.impute_waist_from_chest_legs { builder.add_impute_waist_from_chest_legs(x); } + if let Some(x) = args.impute_waist_from_chest_hip { builder.add_impute_waist_from_chest_hip(x); } + builder.finish() + } + + + #[inline] + pub fn impute_waist_from_chest_hip(&self) -> Option { + self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, None) + } + #[inline] + pub fn impute_waist_from_chest_legs(&self) -> Option { + self._tab.get::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, None) + } + #[inline] + pub fn impute_hip_from_chest_legs(&self) -> Option { + self._tab.get::(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, None) + } + #[inline] + pub fn impute_hip_from_waist_legs(&self) -> Option { + self._tab.get::(ModelRatios::VT_IMPUTE_HIP_FROM_WAIST_LEGS, None) + } + /// Hip's yaw and roll is set to the average of legs when 1.0 + #[inline] + pub fn interp_hip_legs(&self) -> Option { + self._tab.get::(ModelRatios::VT_INTERP_HIP_LEGS, None) + } + /// Knee trackers' yaw and roll is set to the ankle's when 1.0 + #[inline] + pub fn interp_knee_tracker_ankle(&self) -> Option { + self._tab.get::(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, None) + } +} + +impl flatbuffers::Verifiable for ModelRatios<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("impute_waist_from_chest_hip", Self::VT_IMPUTE_WAIST_FROM_CHEST_HIP, false)? + .visit_field::("impute_waist_from_chest_legs", Self::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, false)? + .visit_field::("impute_hip_from_chest_legs", Self::VT_IMPUTE_HIP_FROM_CHEST_LEGS, false)? + .visit_field::("impute_hip_from_waist_legs", Self::VT_IMPUTE_HIP_FROM_WAIST_LEGS, false)? + .visit_field::("interp_hip_legs", Self::VT_INTERP_HIP_LEGS, false)? + .visit_field::("interp_knee_tracker_ankle", Self::VT_INTERP_KNEE_TRACKER_ANKLE, false)? + .finish(); + Ok(()) + } +} +pub struct ModelRatiosArgs { + pub impute_waist_from_chest_hip: Option, + pub impute_waist_from_chest_legs: Option, + pub impute_hip_from_chest_legs: Option, + pub impute_hip_from_waist_legs: Option, + pub interp_hip_legs: Option, + pub interp_knee_tracker_ankle: Option, +} +impl<'a> Default for ModelRatiosArgs { + #[inline] + fn default() -> Self { + ModelRatiosArgs { + impute_waist_from_chest_hip: None, + impute_waist_from_chest_legs: None, + impute_hip_from_chest_legs: None, + impute_hip_from_waist_legs: None, + interp_hip_legs: None, + interp_knee_tracker_ankle: None, + } + } +} + +pub struct ModelRatiosBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ModelRatiosBuilder<'a, 'b> { + #[inline] + pub fn add_impute_waist_from_chest_hip(&mut self, impute_waist_from_chest_hip: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_HIP, impute_waist_from_chest_hip); + } + #[inline] + pub fn add_impute_waist_from_chest_legs(&mut self, impute_waist_from_chest_legs: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_WAIST_FROM_CHEST_LEGS, impute_waist_from_chest_legs); + } + #[inline] + pub fn add_impute_hip_from_chest_legs(&mut self, impute_hip_from_chest_legs: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_HIP_FROM_CHEST_LEGS, impute_hip_from_chest_legs); + } + #[inline] + pub fn add_impute_hip_from_waist_legs(&mut self, impute_hip_from_waist_legs: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_IMPUTE_HIP_FROM_WAIST_LEGS, impute_hip_from_waist_legs); + } + #[inline] + pub fn add_interp_hip_legs(&mut self, interp_hip_legs: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_INTERP_HIP_LEGS, interp_hip_legs); + } + #[inline] + pub fn add_interp_knee_tracker_ankle(&mut self, interp_knee_tracker_ankle: f32) { + self.fbb_.push_slot_always::(ModelRatios::VT_INTERP_KNEE_TRACKER_ANKLE, interp_knee_tracker_ankle); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelRatiosBuilder<'a, 'b> { + let start = _fbb.start_table(); + ModelRatiosBuilder { + 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 std::fmt::Debug for ModelRatios<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ModelRatios"); + ds.field("impute_waist_from_chest_hip", &self.impute_waist_from_chest_hip()); + ds.field("impute_waist_from_chest_legs", &self.impute_waist_from_chest_legs()); + ds.field("impute_hip_from_chest_legs", &self.impute_hip_from_chest_legs()); + ds.field("impute_hip_from_waist_legs", &self.impute_hip_from_waist_legs()); + ds.field("interp_hip_legs", &self.interp_hip_legs()); + ds.field("interp_knee_tracker_ankle", &self.interp_knee_tracker_ankle()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs index 1ba16f48..6725e9d3 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs @@ -1,119 +1,115 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ModelSettingsOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Settings for the skeletal model. -pub struct ModelSettings<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ModelSettings<'a> { - type Inner = ModelSettings<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ModelSettings<'a> { - pub const VT_TOGGLES: flatbuffers::VOffsetT = 4; - pub const VT_RATIOS: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ModelSettings { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ModelSettingsArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = ModelSettingsBuilder::new(_fbb); - if let Some(x) = args.ratios { builder.add_ratios(x); } - if let Some(x) = args.toggles { builder.add_toggles(x); } - builder.finish() - } - - - #[inline] - pub fn toggles(&self) -> Option> { - self._tab.get::>(ModelSettings::VT_TOGGLES, None) - } - #[inline] - pub fn ratios(&self) -> Option> { - self._tab.get::>(ModelSettings::VT_RATIOS, None) - } -} - -impl flatbuffers::Verifiable for ModelSettings<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("toggles", Self::VT_TOGGLES, false)? - .visit_field::>("ratios", Self::VT_RATIOS, false)? - .finish(); - Ok(()) - } -} -pub struct ModelSettingsArgs<'a> { - pub toggles: Option>>, - pub ratios: Option>>, -} -impl<'a> Default for ModelSettingsArgs<'a> { - #[inline] - fn default() -> Self { - ModelSettingsArgs { - toggles: None, - ratios: None, - } - } -} - -pub struct ModelSettingsBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ModelSettingsBuilder<'a, 'b> { - #[inline] - pub fn add_toggles(&mut self, toggles: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ModelSettings::VT_TOGGLES, toggles); - } - #[inline] - pub fn add_ratios(&mut self, ratios: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(ModelSettings::VT_RATIOS, ratios); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelSettingsBuilder<'a, 'b> { - let start = _fbb.start_table(); - ModelSettingsBuilder { - 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 ModelSettings<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ModelSettings"); - ds.field("toggles", &self.toggles()); - ds.field("ratios", &self.ratios()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ModelSettingsOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Settings for the skeletal model. +pub struct ModelSettings<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ModelSettings<'a> { + type Inner = ModelSettings<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ModelSettings<'a> { + pub const VT_TOGGLES: flatbuffers::VOffsetT = 4; + pub const VT_RATIOS: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ModelSettings { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ModelSettingsArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = ModelSettingsBuilder::new(_fbb); + if let Some(x) = args.ratios { builder.add_ratios(x); } + if let Some(x) = args.toggles { builder.add_toggles(x); } + builder.finish() + } + + + #[inline] + pub fn toggles(&self) -> Option> { + self._tab.get::>(ModelSettings::VT_TOGGLES, None) + } + #[inline] + pub fn ratios(&self) -> Option> { + self._tab.get::>(ModelSettings::VT_RATIOS, None) + } +} + +impl flatbuffers::Verifiable for ModelSettings<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("toggles", Self::VT_TOGGLES, false)? + .visit_field::>("ratios", Self::VT_RATIOS, false)? + .finish(); + Ok(()) + } +} +pub struct ModelSettingsArgs<'a> { + pub toggles: Option>>, + pub ratios: Option>>, +} +impl<'a> Default for ModelSettingsArgs<'a> { + #[inline] + fn default() -> Self { + ModelSettingsArgs { + toggles: None, + ratios: None, + } + } +} + +pub struct ModelSettingsBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ModelSettingsBuilder<'a, 'b> { + #[inline] + pub fn add_toggles(&mut self, toggles: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ModelSettings::VT_TOGGLES, toggles); + } + #[inline] + pub fn add_ratios(&mut self, ratios: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(ModelSettings::VT_RATIOS, ratios); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelSettingsBuilder<'a, 'b> { + let start = _fbb.start_table(); + ModelSettingsBuilder { + 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 std::fmt::Debug for ModelSettings<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ModelSettings"); + ds.field("toggles", &self.toggles()); + ds.field("ratios", &self.ratios()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs index 1e72e632..14e97a7e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs @@ -1,175 +1,171 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 ModelTogglesOffset {} -#[derive(Copy, Clone, PartialEq)] - -/// Settings for the skeletal model that are toggles. -pub struct ModelToggles<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for ModelToggles<'a> { - type Inner = ModelToggles<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> ModelToggles<'a> { - pub const VT_EXTENDED_SPINE: flatbuffers::VOffsetT = 4; - pub const VT_EXTENDED_PELVIS: flatbuffers::VOffsetT = 6; - pub const VT_EXTENDED_KNEE: flatbuffers::VOffsetT = 8; - pub const VT_FORCE_ARMS_FROM_HMD: flatbuffers::VOffsetT = 10; - pub const VT_FLOOR_CLIP: flatbuffers::VOffsetT = 12; - pub const VT_SKATING_CORRECTION: flatbuffers::VOffsetT = 14; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - ModelToggles { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args ModelTogglesArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = ModelTogglesBuilder::new(_fbb); - if let Some(x) = args.skating_correction { builder.add_skating_correction(x); } - if let Some(x) = args.floor_clip { builder.add_floor_clip(x); } - if let Some(x) = args.force_arms_from_hmd { builder.add_force_arms_from_hmd(x); } - if let Some(x) = args.extended_knee { builder.add_extended_knee(x); } - if let Some(x) = args.extended_pelvis { builder.add_extended_pelvis(x); } - if let Some(x) = args.extended_spine { builder.add_extended_spine(x); } - builder.finish() - } - - - #[inline] - pub fn extended_spine(&self) -> Option { - self._tab.get::(ModelToggles::VT_EXTENDED_SPINE, None) - } - #[inline] - pub fn extended_pelvis(&self) -> Option { - self._tab.get::(ModelToggles::VT_EXTENDED_PELVIS, None) - } - #[inline] - pub fn extended_knee(&self) -> Option { - self._tab.get::(ModelToggles::VT_EXTENDED_KNEE, None) - } - #[inline] - pub fn force_arms_from_hmd(&self) -> Option { - self._tab.get::(ModelToggles::VT_FORCE_ARMS_FROM_HMD, None) - } - #[inline] - pub fn floor_clip(&self) -> Option { - self._tab.get::(ModelToggles::VT_FLOOR_CLIP, None) - } - #[inline] - pub fn skating_correction(&self) -> Option { - self._tab.get::(ModelToggles::VT_SKATING_CORRECTION, None) - } -} - -impl flatbuffers::Verifiable for ModelToggles<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("extended_spine", Self::VT_EXTENDED_SPINE, false)? - .visit_field::("extended_pelvis", Self::VT_EXTENDED_PELVIS, false)? - .visit_field::("extended_knee", Self::VT_EXTENDED_KNEE, false)? - .visit_field::("force_arms_from_hmd", Self::VT_FORCE_ARMS_FROM_HMD, false)? - .visit_field::("floor_clip", Self::VT_FLOOR_CLIP, false)? - .visit_field::("skating_correction", Self::VT_SKATING_CORRECTION, false)? - .finish(); - Ok(()) - } -} -pub struct ModelTogglesArgs { - pub extended_spine: Option, - pub extended_pelvis: Option, - pub extended_knee: Option, - pub force_arms_from_hmd: Option, - pub floor_clip: Option, - pub skating_correction: Option, -} -impl<'a> Default for ModelTogglesArgs { - #[inline] - fn default() -> Self { - ModelTogglesArgs { - extended_spine: None, - extended_pelvis: None, - extended_knee: None, - force_arms_from_hmd: None, - floor_clip: None, - skating_correction: None, - } - } -} - -pub struct ModelTogglesBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> ModelTogglesBuilder<'a, 'b> { - #[inline] - pub fn add_extended_spine(&mut self, extended_spine: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_EXTENDED_SPINE, extended_spine); - } - #[inline] - pub fn add_extended_pelvis(&mut self, extended_pelvis: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_EXTENDED_PELVIS, extended_pelvis); - } - #[inline] - pub fn add_extended_knee(&mut self, extended_knee: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_EXTENDED_KNEE, extended_knee); - } - #[inline] - pub fn add_force_arms_from_hmd(&mut self, force_arms_from_hmd: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_FORCE_ARMS_FROM_HMD, force_arms_from_hmd); - } - #[inline] - pub fn add_floor_clip(&mut self, floor_clip: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_FLOOR_CLIP, floor_clip); - } - #[inline] - pub fn add_skating_correction(&mut self, skating_correction: bool) { - self.fbb_.push_slot_always::(ModelToggles::VT_SKATING_CORRECTION, skating_correction); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelTogglesBuilder<'a, 'b> { - let start = _fbb.start_table(); - ModelTogglesBuilder { - 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 ModelToggles<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("ModelToggles"); - ds.field("extended_spine", &self.extended_spine()); - ds.field("extended_pelvis", &self.extended_pelvis()); - ds.field("extended_knee", &self.extended_knee()); - ds.field("force_arms_from_hmd", &self.force_arms_from_hmd()); - ds.field("floor_clip", &self.floor_clip()); - ds.field("skating_correction", &self.skating_correction()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum ModelTogglesOffset {} +#[derive(Copy, Clone, PartialEq)] + +/// Settings for the skeletal model that are toggles. +pub struct ModelToggles<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for ModelToggles<'a> { + type Inner = ModelToggles<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> ModelToggles<'a> { + pub const VT_EXTENDED_SPINE: flatbuffers::VOffsetT = 4; + pub const VT_EXTENDED_PELVIS: flatbuffers::VOffsetT = 6; + pub const VT_EXTENDED_KNEE: flatbuffers::VOffsetT = 8; + pub const VT_FORCE_ARMS_FROM_HMD: flatbuffers::VOffsetT = 10; + pub const VT_FLOOR_CLIP: flatbuffers::VOffsetT = 12; + pub const VT_SKATING_CORRECTION: flatbuffers::VOffsetT = 14; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + ModelToggles { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args ModelTogglesArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = ModelTogglesBuilder::new(_fbb); + if let Some(x) = args.skating_correction { builder.add_skating_correction(x); } + if let Some(x) = args.floor_clip { builder.add_floor_clip(x); } + if let Some(x) = args.force_arms_from_hmd { builder.add_force_arms_from_hmd(x); } + if let Some(x) = args.extended_knee { builder.add_extended_knee(x); } + if let Some(x) = args.extended_pelvis { builder.add_extended_pelvis(x); } + if let Some(x) = args.extended_spine { builder.add_extended_spine(x); } + builder.finish() + } + + + #[inline] + pub fn extended_spine(&self) -> Option { + self._tab.get::(ModelToggles::VT_EXTENDED_SPINE, None) + } + #[inline] + pub fn extended_pelvis(&self) -> Option { + self._tab.get::(ModelToggles::VT_EXTENDED_PELVIS, None) + } + #[inline] + pub fn extended_knee(&self) -> Option { + self._tab.get::(ModelToggles::VT_EXTENDED_KNEE, None) + } + #[inline] + pub fn force_arms_from_hmd(&self) -> Option { + self._tab.get::(ModelToggles::VT_FORCE_ARMS_FROM_HMD, None) + } + #[inline] + pub fn floor_clip(&self) -> Option { + self._tab.get::(ModelToggles::VT_FLOOR_CLIP, None) + } + #[inline] + pub fn skating_correction(&self) -> Option { + self._tab.get::(ModelToggles::VT_SKATING_CORRECTION, None) + } +} + +impl flatbuffers::Verifiable for ModelToggles<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("extended_spine", Self::VT_EXTENDED_SPINE, false)? + .visit_field::("extended_pelvis", Self::VT_EXTENDED_PELVIS, false)? + .visit_field::("extended_knee", Self::VT_EXTENDED_KNEE, false)? + .visit_field::("force_arms_from_hmd", Self::VT_FORCE_ARMS_FROM_HMD, false)? + .visit_field::("floor_clip", Self::VT_FLOOR_CLIP, false)? + .visit_field::("skating_correction", Self::VT_SKATING_CORRECTION, false)? + .finish(); + Ok(()) + } +} +pub struct ModelTogglesArgs { + pub extended_spine: Option, + pub extended_pelvis: Option, + pub extended_knee: Option, + pub force_arms_from_hmd: Option, + pub floor_clip: Option, + pub skating_correction: Option, +} +impl<'a> Default for ModelTogglesArgs { + #[inline] + fn default() -> Self { + ModelTogglesArgs { + extended_spine: None, + extended_pelvis: None, + extended_knee: None, + force_arms_from_hmd: None, + floor_clip: None, + skating_correction: None, + } + } +} + +pub struct ModelTogglesBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> ModelTogglesBuilder<'a, 'b> { + #[inline] + pub fn add_extended_spine(&mut self, extended_spine: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_EXTENDED_SPINE, extended_spine); + } + #[inline] + pub fn add_extended_pelvis(&mut self, extended_pelvis: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_EXTENDED_PELVIS, extended_pelvis); + } + #[inline] + pub fn add_extended_knee(&mut self, extended_knee: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_EXTENDED_KNEE, extended_knee); + } + #[inline] + pub fn add_force_arms_from_hmd(&mut self, force_arms_from_hmd: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_FORCE_ARMS_FROM_HMD, force_arms_from_hmd); + } + #[inline] + pub fn add_floor_clip(&mut self, floor_clip: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_FLOOR_CLIP, floor_clip); + } + #[inline] + pub fn add_skating_correction(&mut self, skating_correction: bool) { + self.fbb_.push_slot_always::(ModelToggles::VT_SKATING_CORRECTION, skating_correction); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ModelTogglesBuilder<'a, 'b> { + let start = _fbb.start_table(); + ModelTogglesBuilder { + 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 std::fmt::Debug for ModelToggles<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("ModelToggles"); + ds.field("extended_spine", &self.extended_spine()); + ds.field("extended_pelvis", &self.extended_pelvis()); + ds.field("extended_knee", &self.extended_knee()); + ds.field("force_arms_from_hmd", &self.force_arms_from_hmd()); + ds.field("floor_clip", &self.floor_clip()); + ds.field("skating_correction", &self.skating_correction()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs index ece057c0..29518d4b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SettingsRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SettingsRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SettingsRequest<'a> { - type Inner = SettingsRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SettingsRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SettingsRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args SettingsRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SettingsRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for SettingsRequest<'_> { - #[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 SettingsRequestArgs { -} -impl<'a> Default for SettingsRequestArgs { - #[inline] - fn default() -> Self { - SettingsRequestArgs { - } - } -} - -pub struct SettingsRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SettingsRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SettingsRequestBuilder { - 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 SettingsRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SettingsRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SettingsRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SettingsRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SettingsRequest<'a> { + type Inner = SettingsRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SettingsRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SettingsRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SettingsRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SettingsRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SettingsRequest<'_> { + #[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 SettingsRequestArgs { +} +impl<'a> Default for SettingsRequestArgs { + #[inline] + fn default() -> Self { + SettingsRequestArgs { + } + } +} + +pub struct SettingsRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SettingsRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SettingsRequestBuilder { + 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 std::fmt::Debug for SettingsRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SettingsRequest"); + 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 967d7b27..0ec71136 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 @@ -1,132 +1,128 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SettingsResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SettingsResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SettingsResponse<'a> { - type Inner = SettingsResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SettingsResponse<'a> { - pub const VT_STEAM_VR_TRACKERS: flatbuffers::VOffsetT = 4; - pub const VT_FILTERING: flatbuffers::VOffsetT = 6; - pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 8; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SettingsResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SettingsResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SettingsResponseBuilder::new(_fbb); - if let Some(x) = args.model_settings { builder.add_model_settings(x); } - if let Some(x) = args.filtering { builder.add_filtering(x); } - if let Some(x) = args.steam_vr_trackers { builder.add_steam_vr_trackers(x); } - builder.finish() - } - - - #[inline] - pub fn steam_vr_trackers(&self) -> Option> { - self._tab.get::>(SettingsResponse::VT_STEAM_VR_TRACKERS, None) - } - #[inline] - pub fn filtering(&self) -> Option> { - self._tab.get::>(SettingsResponse::VT_FILTERING, None) - } - #[inline] - pub fn model_settings(&self) -> Option> { - self._tab.get::>(SettingsResponse::VT_MODEL_SETTINGS, None) - } -} - -impl flatbuffers::Verifiable for SettingsResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>("steam_vr_trackers", Self::VT_STEAM_VR_TRACKERS, false)? - .visit_field::>("filtering", Self::VT_FILTERING, false)? - .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? - .finish(); - Ok(()) - } -} -pub struct SettingsResponseArgs<'a> { - pub steam_vr_trackers: Option>>, - pub filtering: Option>>, - pub model_settings: Option>>, -} -impl<'a> Default for SettingsResponseArgs<'a> { - #[inline] - fn default() -> Self { - SettingsResponseArgs { - steam_vr_trackers: None, - filtering: None, - model_settings: None, - } - } -} - -pub struct SettingsResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SettingsResponseBuilder<'a, 'b> { - #[inline] - pub fn add_steam_vr_trackers(&mut self, steam_vr_trackers: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_STEAM_VR_TRACKERS, steam_vr_trackers); - } - #[inline] - pub fn add_filtering(&mut self, filtering: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_FILTERING, filtering); - } - #[inline] - pub fn add_model_settings(&mut self, model_settings: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(SettingsResponse::VT_MODEL_SETTINGS, model_settings); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - SettingsResponseBuilder { - 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 SettingsResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SettingsResponse"); - ds.field("steam_vr_trackers", &self.steam_vr_trackers()); - ds.field("filtering", &self.filtering()); - ds.field("model_settings", &self.model_settings()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SettingsResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SettingsResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SettingsResponse<'a> { + type Inner = SettingsResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SettingsResponse<'a> { + pub const VT_STEAM_VR_TRACKERS: flatbuffers::VOffsetT = 4; + pub const VT_FILTERING: flatbuffers::VOffsetT = 6; + pub const VT_MODEL_SETTINGS: flatbuffers::VOffsetT = 8; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SettingsResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SettingsResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SettingsResponseBuilder::new(_fbb); + if let Some(x) = args.model_settings { builder.add_model_settings(x); } + if let Some(x) = args.filtering { builder.add_filtering(x); } + if let Some(x) = args.steam_vr_trackers { builder.add_steam_vr_trackers(x); } + builder.finish() + } + + + #[inline] + pub fn steam_vr_trackers(&self) -> Option> { + self._tab.get::>(SettingsResponse::VT_STEAM_VR_TRACKERS, None) + } + #[inline] + pub fn filtering(&self) -> Option> { + self._tab.get::>(SettingsResponse::VT_FILTERING, None) + } + #[inline] + pub fn model_settings(&self) -> Option> { + self._tab.get::>(SettingsResponse::VT_MODEL_SETTINGS, None) + } +} + +impl flatbuffers::Verifiable for SettingsResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>("steam_vr_trackers", Self::VT_STEAM_VR_TRACKERS, false)? + .visit_field::>("filtering", Self::VT_FILTERING, false)? + .visit_field::>("model_settings", Self::VT_MODEL_SETTINGS, false)? + .finish(); + Ok(()) + } +} +pub struct SettingsResponseArgs<'a> { + pub steam_vr_trackers: Option>>, + pub filtering: Option>>, + pub model_settings: Option>>, +} +impl<'a> Default for SettingsResponseArgs<'a> { + #[inline] + fn default() -> Self { + SettingsResponseArgs { + steam_vr_trackers: None, + filtering: None, + model_settings: None, + } + } +} + +pub struct SettingsResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SettingsResponseBuilder<'a, 'b> { + #[inline] + pub fn add_steam_vr_trackers(&mut self, steam_vr_trackers: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_STEAM_VR_TRACKERS, steam_vr_trackers); + } + #[inline] + pub fn add_filtering(&mut self, filtering: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_FILTERING, filtering); + } + #[inline] + pub fn add_model_settings(&mut self, model_settings: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(SettingsResponse::VT_MODEL_SETTINGS, model_settings); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SettingsResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + SettingsResponseBuilder { + 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 std::fmt::Debug for SettingsResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SettingsResponse"); + ds.field("steam_vr_trackers", &self.steam_vr_trackers()); + ds.field("filtering", &self.filtering()); + ds.field("model_settings", &self.model_settings()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs index 52710b2f..ba8b853e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs @@ -1,169 +1,165 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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_SKELETON_BONE: u8 = 0; -#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] -pub const ENUM_MAX_SKELETON_BONE: u8 = 19; -#[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_SKELETON_BONE: [SkeletonBone; 20] = [ - SkeletonBone::NONE, - SkeletonBone::HEAD, - SkeletonBone::NECK, - SkeletonBone::TORSO, - SkeletonBone::CHEST, - SkeletonBone::WAIST, - SkeletonBone::HIP_OFFSET, - SkeletonBone::HIPS_WIDTH, - SkeletonBone::LEGS_LENGTH, - SkeletonBone::KNEE_HEIGHT, - SkeletonBone::FOOT_LENGTH, - SkeletonBone::FOOT_SHIFT, - SkeletonBone::SKELETON_OFFSET, - SkeletonBone::CONTROLLER_DISTANCE_Z, - SkeletonBone::CONTROLLER_DISTANCE_Y, - SkeletonBone::FOREARM_LENGTH, - SkeletonBone::SHOULDERS_DISTANCE, - SkeletonBone::SHOULDERS_WIDTH, - SkeletonBone::UPPER_ARM_LENGTH, - SkeletonBone::ELBOW_OFFSET, -]; - -#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] -#[repr(transparent)] -pub struct SkeletonBone(pub u8); -#[allow(non_upper_case_globals)] -impl SkeletonBone { - pub const NONE: Self = Self(0); - pub const HEAD: Self = Self(1); - pub const NECK: Self = Self(2); - pub const TORSO: Self = Self(3); - pub const CHEST: Self = Self(4); - pub const WAIST: Self = Self(5); - pub const HIP_OFFSET: Self = Self(6); - pub const HIPS_WIDTH: Self = Self(7); - pub const LEGS_LENGTH: Self = Self(8); - pub const KNEE_HEIGHT: Self = Self(9); - pub const FOOT_LENGTH: Self = Self(10); - pub const FOOT_SHIFT: Self = Self(11); - pub const SKELETON_OFFSET: Self = Self(12); - pub const CONTROLLER_DISTANCE_Z: Self = Self(13); - pub const CONTROLLER_DISTANCE_Y: Self = Self(14); - pub const FOREARM_LENGTH: Self = Self(15); - pub const SHOULDERS_DISTANCE: Self = Self(16); - pub const SHOULDERS_WIDTH: Self = Self(17); - pub const UPPER_ARM_LENGTH: Self = Self(18); - pub const ELBOW_OFFSET: Self = Self(19); - - pub const ENUM_MIN: u8 = 0; - pub const ENUM_MAX: u8 = 19; - pub const ENUM_VALUES: &'static [Self] = &[ - Self::NONE, - Self::HEAD, - Self::NECK, - Self::TORSO, - Self::CHEST, - Self::WAIST, - Self::HIP_OFFSET, - Self::HIPS_WIDTH, - Self::LEGS_LENGTH, - Self::KNEE_HEIGHT, - Self::FOOT_LENGTH, - Self::FOOT_SHIFT, - Self::SKELETON_OFFSET, - Self::CONTROLLER_DISTANCE_Z, - Self::CONTROLLER_DISTANCE_Y, - Self::FOREARM_LENGTH, - Self::SHOULDERS_DISTANCE, - Self::SHOULDERS_WIDTH, - Self::UPPER_ARM_LENGTH, - Self::ELBOW_OFFSET, - ]; - /// Returns the variant's name or "" if unknown. - pub fn variant_name(self) -> Option<&'static str> { - match self { - Self::NONE => Some("NONE"), - Self::HEAD => Some("HEAD"), - Self::NECK => Some("NECK"), - Self::TORSO => Some("TORSO"), - Self::CHEST => Some("CHEST"), - Self::WAIST => Some("WAIST"), - Self::HIP_OFFSET => Some("HIP_OFFSET"), - Self::HIPS_WIDTH => Some("HIPS_WIDTH"), - Self::LEGS_LENGTH => Some("LEGS_LENGTH"), - Self::KNEE_HEIGHT => Some("KNEE_HEIGHT"), - Self::FOOT_LENGTH => Some("FOOT_LENGTH"), - Self::FOOT_SHIFT => Some("FOOT_SHIFT"), - Self::SKELETON_OFFSET => Some("SKELETON_OFFSET"), - Self::CONTROLLER_DISTANCE_Z => Some("CONTROLLER_DISTANCE_Z"), - Self::CONTROLLER_DISTANCE_Y => Some("CONTROLLER_DISTANCE_Y"), - Self::FOREARM_LENGTH => Some("FOREARM_LENGTH"), - Self::SHOULDERS_DISTANCE => Some("SHOULDERS_DISTANCE"), - Self::SHOULDERS_WIDTH => Some("SHOULDERS_WIDTH"), - Self::UPPER_ARM_LENGTH => Some("UPPER_ARM_LENGTH"), - Self::ELBOW_OFFSET => Some("ELBOW_OFFSET"), - _ => None, - } - } -} -impl core::fmt::Debug for SkeletonBone { - 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 SkeletonBone { - type Inner = Self; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - let b = unsafe { - flatbuffers::read_scalar_at::(buf, loc) - }; - Self(b) - } -} - -impl flatbuffers::Push for SkeletonBone { - type Output = SkeletonBone; - #[inline] - fn push(&self, dst: &mut [u8], _rest: &[u8]) { - unsafe { flatbuffers::emplace_scalar::(dst, self.0); } - } -} - -impl flatbuffers::EndianScalar for SkeletonBone { - #[inline] - fn to_little_endian(self) -> Self { - let b = u8::to_le(self.0); - Self(b) - } - #[inline] - #[allow(clippy::wrong_self_convention)] - fn from_little_endian(self) -> Self { - let b = u8::from_le(self.0); - Self(b) - } -} - -impl<'a> flatbuffers::Verifiable for SkeletonBone { - #[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 SkeletonBone {} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::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_SKELETON_BONE: u8 = 0; +#[deprecated(since = "2.0.0", note = "Use associated constants instead. This will no longer be generated in 2021.")] +pub const ENUM_MAX_SKELETON_BONE: u8 = 19; +#[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_SKELETON_BONE: [SkeletonBone; 20] = [ + SkeletonBone::NONE, + SkeletonBone::HEAD, + SkeletonBone::NECK, + SkeletonBone::TORSO, + SkeletonBone::CHEST, + SkeletonBone::WAIST, + SkeletonBone::HIP_OFFSET, + SkeletonBone::HIPS_WIDTH, + SkeletonBone::LEGS_LENGTH, + SkeletonBone::KNEE_HEIGHT, + SkeletonBone::FOOT_LENGTH, + SkeletonBone::FOOT_SHIFT, + SkeletonBone::SKELETON_OFFSET, + SkeletonBone::CONTROLLER_DISTANCE_Z, + SkeletonBone::CONTROLLER_DISTANCE_Y, + SkeletonBone::FOREARM_LENGTH, + SkeletonBone::SHOULDERS_DISTANCE, + SkeletonBone::SHOULDERS_WIDTH, + SkeletonBone::UPPER_ARM_LENGTH, + SkeletonBone::ELBOW_OFFSET, +]; + +#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] +#[repr(transparent)] +pub struct SkeletonBone(pub u8); +#[allow(non_upper_case_globals)] +impl SkeletonBone { + pub const NONE: Self = Self(0); + pub const HEAD: Self = Self(1); + pub const NECK: Self = Self(2); + pub const TORSO: Self = Self(3); + pub const CHEST: Self = Self(4); + pub const WAIST: Self = Self(5); + pub const HIP_OFFSET: Self = Self(6); + pub const HIPS_WIDTH: Self = Self(7); + pub const LEGS_LENGTH: Self = Self(8); + pub const KNEE_HEIGHT: Self = Self(9); + pub const FOOT_LENGTH: Self = Self(10); + pub const FOOT_SHIFT: Self = Self(11); + pub const SKELETON_OFFSET: Self = Self(12); + pub const CONTROLLER_DISTANCE_Z: Self = Self(13); + pub const CONTROLLER_DISTANCE_Y: Self = Self(14); + pub const FOREARM_LENGTH: Self = Self(15); + pub const SHOULDERS_DISTANCE: Self = Self(16); + pub const SHOULDERS_WIDTH: Self = Self(17); + pub const UPPER_ARM_LENGTH: Self = Self(18); + pub const ELBOW_OFFSET: Self = Self(19); + + pub const ENUM_MIN: u8 = 0; + pub const ENUM_MAX: u8 = 19; + pub const ENUM_VALUES: &'static [Self] = &[ + Self::NONE, + Self::HEAD, + Self::NECK, + Self::TORSO, + Self::CHEST, + Self::WAIST, + Self::HIP_OFFSET, + Self::HIPS_WIDTH, + Self::LEGS_LENGTH, + Self::KNEE_HEIGHT, + Self::FOOT_LENGTH, + Self::FOOT_SHIFT, + Self::SKELETON_OFFSET, + Self::CONTROLLER_DISTANCE_Z, + Self::CONTROLLER_DISTANCE_Y, + Self::FOREARM_LENGTH, + Self::SHOULDERS_DISTANCE, + Self::SHOULDERS_WIDTH, + Self::UPPER_ARM_LENGTH, + Self::ELBOW_OFFSET, + ]; + /// Returns the variant's name or "" if unknown. + pub fn variant_name(self) -> Option<&'static str> { + match self { + Self::NONE => Some("NONE"), + Self::HEAD => Some("HEAD"), + Self::NECK => Some("NECK"), + Self::TORSO => Some("TORSO"), + Self::CHEST => Some("CHEST"), + Self::WAIST => Some("WAIST"), + Self::HIP_OFFSET => Some("HIP_OFFSET"), + Self::HIPS_WIDTH => Some("HIPS_WIDTH"), + Self::LEGS_LENGTH => Some("LEGS_LENGTH"), + Self::KNEE_HEIGHT => Some("KNEE_HEIGHT"), + Self::FOOT_LENGTH => Some("FOOT_LENGTH"), + Self::FOOT_SHIFT => Some("FOOT_SHIFT"), + Self::SKELETON_OFFSET => Some("SKELETON_OFFSET"), + Self::CONTROLLER_DISTANCE_Z => Some("CONTROLLER_DISTANCE_Z"), + Self::CONTROLLER_DISTANCE_Y => Some("CONTROLLER_DISTANCE_Y"), + Self::FOREARM_LENGTH => Some("FOREARM_LENGTH"), + Self::SHOULDERS_DISTANCE => Some("SHOULDERS_DISTANCE"), + Self::SHOULDERS_WIDTH => Some("SHOULDERS_WIDTH"), + Self::UPPER_ARM_LENGTH => Some("UPPER_ARM_LENGTH"), + Self::ELBOW_OFFSET => Some("ELBOW_OFFSET"), + _ => None, + } + } +} +impl std::fmt::Debug for SkeletonBone { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::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 SkeletonBone { + type Inner = Self; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + let b = unsafe { + flatbuffers::read_scalar_at::(buf, loc) + }; + Self(b) + } +} + +impl flatbuffers::Push for SkeletonBone { + type Output = SkeletonBone; + #[inline] + fn push(&self, dst: &mut [u8], _rest: &[u8]) { + unsafe { flatbuffers::emplace_scalar::(dst, self.0); } + } +} + +impl flatbuffers::EndianScalar for SkeletonBone { + #[inline] + fn to_little_endian(self) -> Self { + let b = u8::to_le(self.0); + Self(b) + } + #[inline] + #[allow(clippy::wrong_self_convention)] + fn from_little_endian(self) -> Self { + let b = u8::from_le(self.0); + Self(b) + } +} + +impl<'a> flatbuffers::Verifiable for SkeletonBone { + #[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 SkeletonBone {} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs index 5d22584c..1b1051e9 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SkeletonConfigRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SkeletonConfigRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SkeletonConfigRequest<'a> { - type Inner = SkeletonConfigRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SkeletonConfigRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SkeletonConfigRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args SkeletonConfigRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SkeletonConfigRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for SkeletonConfigRequest<'_> { - #[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 SkeletonConfigRequestArgs { -} -impl<'a> Default for SkeletonConfigRequestArgs { - #[inline] - fn default() -> Self { - SkeletonConfigRequestArgs { - } - } -} - -pub struct SkeletonConfigRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SkeletonConfigRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonConfigRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SkeletonConfigRequestBuilder { - 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 SkeletonConfigRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SkeletonConfigRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SkeletonConfigRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SkeletonConfigRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SkeletonConfigRequest<'a> { + type Inner = SkeletonConfigRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SkeletonConfigRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SkeletonConfigRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SkeletonConfigRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SkeletonConfigRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SkeletonConfigRequest<'_> { + #[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 SkeletonConfigRequestArgs { +} +impl<'a> Default for SkeletonConfigRequestArgs { + #[inline] + fn default() -> Self { + SkeletonConfigRequestArgs { + } + } +} + +pub struct SkeletonConfigRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SkeletonConfigRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonConfigRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SkeletonConfigRequestBuilder { + 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 std::fmt::Debug for SkeletonConfigRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SkeletonConfigRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs index e0c64469..b07132c8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs @@ -1,104 +1,100 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SkeletonConfigResponseOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SkeletonConfigResponse<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SkeletonConfigResponse<'a> { - type Inner = SkeletonConfigResponse<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SkeletonConfigResponse<'a> { - pub const VT_SKELETON_PARTS: flatbuffers::VOffsetT = 4; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SkeletonConfigResponse { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SkeletonConfigResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = SkeletonConfigResponseBuilder::new(_fbb); - if let Some(x) = args.skeleton_parts { builder.add_skeleton_parts(x); } - builder.finish() - } - - - #[inline] - pub fn skeleton_parts(&self) -> Option>>> { - self._tab.get::>>>(SkeletonConfigResponse::VT_SKELETON_PARTS, None) - } -} - -impl flatbuffers::Verifiable for SkeletonConfigResponse<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::>>>("skeleton_parts", Self::VT_SKELETON_PARTS, false)? - .finish(); - Ok(()) - } -} -pub struct SkeletonConfigResponseArgs<'a> { - pub skeleton_parts: Option>>>>, -} -impl<'a> Default for SkeletonConfigResponseArgs<'a> { - #[inline] - fn default() -> Self { - SkeletonConfigResponseArgs { - skeleton_parts: None, - } - } -} - -pub struct SkeletonConfigResponseBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SkeletonConfigResponseBuilder<'a, 'b> { - #[inline] - pub fn add_skeleton_parts(&mut self, skeleton_parts: flatbuffers::WIPOffset>>>) { - self.fbb_.push_slot_always::>(SkeletonConfigResponse::VT_SKELETON_PARTS, skeleton_parts); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonConfigResponseBuilder<'a, 'b> { - let start = _fbb.start_table(); - SkeletonConfigResponseBuilder { - 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 SkeletonConfigResponse<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SkeletonConfigResponse"); - ds.field("skeleton_parts", &self.skeleton_parts()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SkeletonConfigResponseOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SkeletonConfigResponse<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SkeletonConfigResponse<'a> { + type Inner = SkeletonConfigResponse<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SkeletonConfigResponse<'a> { + pub const VT_SKELETON_PARTS: flatbuffers::VOffsetT = 4; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SkeletonConfigResponse { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SkeletonConfigResponseArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = SkeletonConfigResponseBuilder::new(_fbb); + if let Some(x) = args.skeleton_parts { builder.add_skeleton_parts(x); } + builder.finish() + } + + + #[inline] + pub fn skeleton_parts(&self) -> Option>>> { + self._tab.get::>>>(SkeletonConfigResponse::VT_SKELETON_PARTS, None) + } +} + +impl flatbuffers::Verifiable for SkeletonConfigResponse<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::>>>("skeleton_parts", Self::VT_SKELETON_PARTS, false)? + .finish(); + Ok(()) + } +} +pub struct SkeletonConfigResponseArgs<'a> { + pub skeleton_parts: Option>>>>, +} +impl<'a> Default for SkeletonConfigResponseArgs<'a> { + #[inline] + fn default() -> Self { + SkeletonConfigResponseArgs { + skeleton_parts: None, + } + } +} + +pub struct SkeletonConfigResponseBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SkeletonConfigResponseBuilder<'a, 'b> { + #[inline] + pub fn add_skeleton_parts(&mut self, skeleton_parts: flatbuffers::WIPOffset>>>) { + self.fbb_.push_slot_always::>(SkeletonConfigResponse::VT_SKELETON_PARTS, skeleton_parts); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonConfigResponseBuilder<'a, 'b> { + let start = _fbb.start_table(); + SkeletonConfigResponseBuilder { + 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 std::fmt::Debug for SkeletonConfigResponse<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SkeletonConfigResponse"); + ds.field("skeleton_parts", &self.skeleton_parts()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs index b9ac93ff..45f39216 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs @@ -1,118 +1,114 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SkeletonPartOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SkeletonPart<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SkeletonPart<'a> { - type Inner = SkeletonPart<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SkeletonPart<'a> { - pub const VT_BONE: flatbuffers::VOffsetT = 4; - pub const VT_VALUE: flatbuffers::VOffsetT = 6; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SkeletonPart { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SkeletonPartArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SkeletonPartBuilder::new(_fbb); - builder.add_value(args.value); - builder.add_bone(args.bone); - builder.finish() - } - - - #[inline] - pub fn bone(&self) -> SkeletonBone { - self._tab.get::(SkeletonPart::VT_BONE, Some(SkeletonBone::NONE)).unwrap() - } - #[inline] - pub fn value(&self) -> f32 { - self._tab.get::(SkeletonPart::VT_VALUE, Some(0.0)).unwrap() - } -} - -impl flatbuffers::Verifiable for SkeletonPart<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("bone", Self::VT_BONE, false)? - .visit_field::("value", Self::VT_VALUE, false)? - .finish(); - Ok(()) - } -} -pub struct SkeletonPartArgs { - pub bone: SkeletonBone, - pub value: f32, -} -impl<'a> Default for SkeletonPartArgs { - #[inline] - fn default() -> Self { - SkeletonPartArgs { - bone: SkeletonBone::NONE, - value: 0.0, - } - } -} - -pub struct SkeletonPartBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SkeletonPartBuilder<'a, 'b> { - #[inline] - pub fn add_bone(&mut self, bone: SkeletonBone) { - self.fbb_.push_slot::(SkeletonPart::VT_BONE, bone, SkeletonBone::NONE); - } - #[inline] - pub fn add_value(&mut self, value: f32) { - self.fbb_.push_slot::(SkeletonPart::VT_VALUE, value, 0.0); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonPartBuilder<'a, 'b> { - let start = _fbb.start_table(); - SkeletonPartBuilder { - 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 SkeletonPart<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SkeletonPart"); - ds.field("bone", &self.bone()); - ds.field("value", &self.value()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SkeletonPartOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SkeletonPart<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SkeletonPart<'a> { + type Inner = SkeletonPart<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SkeletonPart<'a> { + pub const VT_BONE: flatbuffers::VOffsetT = 4; + pub const VT_VALUE: flatbuffers::VOffsetT = 6; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SkeletonPart { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SkeletonPartArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SkeletonPartBuilder::new(_fbb); + builder.add_value(args.value); + builder.add_bone(args.bone); + builder.finish() + } + + + #[inline] + pub fn bone(&self) -> SkeletonBone { + self._tab.get::(SkeletonPart::VT_BONE, Some(SkeletonBone::NONE)).unwrap() + } + #[inline] + pub fn value(&self) -> f32 { + self._tab.get::(SkeletonPart::VT_VALUE, Some(0.0)).unwrap() + } +} + +impl flatbuffers::Verifiable for SkeletonPart<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("bone", Self::VT_BONE, false)? + .visit_field::("value", Self::VT_VALUE, false)? + .finish(); + Ok(()) + } +} +pub struct SkeletonPartArgs { + pub bone: SkeletonBone, + pub value: f32, +} +impl<'a> Default for SkeletonPartArgs { + #[inline] + fn default() -> Self { + SkeletonPartArgs { + bone: SkeletonBone::NONE, + value: 0.0, + } + } +} + +pub struct SkeletonPartBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SkeletonPartBuilder<'a, 'b> { + #[inline] + pub fn add_bone(&mut self, bone: SkeletonBone) { + self.fbb_.push_slot::(SkeletonPart::VT_BONE, bone, SkeletonBone::NONE); + } + #[inline] + pub fn add_value(&mut self, value: f32) { + self.fbb_.push_slot::(SkeletonPart::VT_VALUE, value, 0.0); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonPartBuilder<'a, 'b> { + let start = _fbb.start_table(); + SkeletonPartBuilder { + 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 std::fmt::Debug for SkeletonPart<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SkeletonPart"); + ds.field("bone", &self.bone()); + ds.field("value", &self.value()); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs index 6d3d4652..ee07a68f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs @@ -1,89 +1,85 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SkeletonResetAllRequestOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SkeletonResetAllRequest<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SkeletonResetAllRequest<'a> { - type Inner = SkeletonResetAllRequest<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SkeletonResetAllRequest<'a> { - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SkeletonResetAllRequest { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - _args: &'args SkeletonResetAllRequestArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SkeletonResetAllRequestBuilder::new(_fbb); - builder.finish() - } - -} - -impl flatbuffers::Verifiable for SkeletonResetAllRequest<'_> { - #[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 SkeletonResetAllRequestArgs { -} -impl<'a> Default for SkeletonResetAllRequestArgs { - #[inline] - fn default() -> Self { - SkeletonResetAllRequestArgs { - } - } -} - -pub struct SkeletonResetAllRequestBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SkeletonResetAllRequestBuilder<'a, 'b> { - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonResetAllRequestBuilder<'a, 'b> { - let start = _fbb.start_table(); - SkeletonResetAllRequestBuilder { - 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 SkeletonResetAllRequest<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SkeletonResetAllRequest"); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SkeletonResetAllRequestOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SkeletonResetAllRequest<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SkeletonResetAllRequest<'a> { + type Inner = SkeletonResetAllRequest<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SkeletonResetAllRequest<'a> { + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SkeletonResetAllRequest { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + _args: &'args SkeletonResetAllRequestArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SkeletonResetAllRequestBuilder::new(_fbb); + builder.finish() + } + +} + +impl flatbuffers::Verifiable for SkeletonResetAllRequest<'_> { + #[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 SkeletonResetAllRequestArgs { +} +impl<'a> Default for SkeletonResetAllRequestArgs { + #[inline] + fn default() -> Self { + SkeletonResetAllRequestArgs { + } + } +} + +pub struct SkeletonResetAllRequestBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SkeletonResetAllRequestBuilder<'a, 'b> { + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SkeletonResetAllRequestBuilder<'a, 'b> { + let start = _fbb.start_table(); + SkeletonResetAllRequestBuilder { + 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 std::fmt::Debug for SkeletonResetAllRequest<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SkeletonResetAllRequest"); + ds.finish() + } +} diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs index 808b4972..9324da49 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs @@ -1,160 +1,156 @@ -// automatically generated by the FlatBuffers compiler, do not modify -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 SteamVRTrackersSettingOffset {} -#[derive(Copy, Clone, PartialEq)] - -pub struct SteamVRTrackersSetting<'a> { - pub _tab: flatbuffers::Table<'a>, -} - -impl<'a> flatbuffers::Follow<'a> for SteamVRTrackersSetting<'a> { - type Inner = SteamVRTrackersSetting<'a>; - #[inline] - fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { - Self { _tab: flatbuffers::Table { buf, loc } } - } -} - -impl<'a> SteamVRTrackersSetting<'a> { - pub const VT_WAIST: flatbuffers::VOffsetT = 4; - pub const VT_CHEST: flatbuffers::VOffsetT = 6; - pub const VT_LEGS: flatbuffers::VOffsetT = 8; - pub const VT_KNEES: flatbuffers::VOffsetT = 10; - pub const VT_ELBOWS: flatbuffers::VOffsetT = 12; - - #[inline] - pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - SteamVRTrackersSetting { _tab: table } - } - #[allow(unused_mut)] - pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( - _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args SteamVRTrackersSettingArgs - ) -> flatbuffers::WIPOffset> { - let mut builder = SteamVRTrackersSettingBuilder::new(_fbb); - builder.add_elbows(args.elbows); - builder.add_knees(args.knees); - builder.add_legs(args.legs); - builder.add_chest(args.chest); - builder.add_waist(args.waist); - builder.finish() - } - - - #[inline] - pub fn waist(&self) -> bool { - self._tab.get::(SteamVRTrackersSetting::VT_WAIST, Some(false)).unwrap() - } - #[inline] - pub fn chest(&self) -> bool { - self._tab.get::(SteamVRTrackersSetting::VT_CHEST, Some(false)).unwrap() - } - #[inline] - pub fn legs(&self) -> bool { - self._tab.get::(SteamVRTrackersSetting::VT_LEGS, Some(false)).unwrap() - } - #[inline] - pub fn knees(&self) -> bool { - self._tab.get::(SteamVRTrackersSetting::VT_KNEES, Some(false)).unwrap() - } - #[inline] - pub fn elbows(&self) -> bool { - self._tab.get::(SteamVRTrackersSetting::VT_ELBOWS, Some(false)).unwrap() - } -} - -impl flatbuffers::Verifiable for SteamVRTrackersSetting<'_> { - #[inline] - fn run_verifier( - v: &mut flatbuffers::Verifier, pos: usize - ) -> Result<(), flatbuffers::InvalidFlatbuffer> { - use self::flatbuffers::Verifiable; - v.visit_table(pos)? - .visit_field::("waist", Self::VT_WAIST, false)? - .visit_field::("chest", Self::VT_CHEST, false)? - .visit_field::("legs", Self::VT_LEGS, false)? - .visit_field::("knees", Self::VT_KNEES, false)? - .visit_field::("elbows", Self::VT_ELBOWS, false)? - .finish(); - Ok(()) - } -} -pub struct SteamVRTrackersSettingArgs { - pub waist: bool, - pub chest: bool, - pub legs: bool, - pub knees: bool, - pub elbows: bool, -} -impl<'a> Default for SteamVRTrackersSettingArgs { - #[inline] - fn default() -> Self { - SteamVRTrackersSettingArgs { - waist: false, - chest: false, - legs: false, - knees: false, - elbows: false, - } - } -} - -pub struct SteamVRTrackersSettingBuilder<'a: 'b, 'b> { - fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, - start_: flatbuffers::WIPOffset, -} -impl<'a: 'b, 'b> SteamVRTrackersSettingBuilder<'a, 'b> { - #[inline] - pub fn add_waist(&mut self, waist: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_WAIST, waist, false); - } - #[inline] - pub fn add_chest(&mut self, chest: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_CHEST, chest, false); - } - #[inline] - pub fn add_legs(&mut self, legs: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEGS, legs, false); - } - #[inline] - pub fn add_knees(&mut self, knees: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_KNEES, knees, false); - } - #[inline] - pub fn add_elbows(&mut self, elbows: bool) { - self.fbb_.push_slot::(SteamVRTrackersSetting::VT_ELBOWS, elbows, false); - } - #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SteamVRTrackersSettingBuilder<'a, 'b> { - let start = _fbb.start_table(); - SteamVRTrackersSettingBuilder { - 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 SteamVRTrackersSetting<'_> { - fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("SteamVRTrackersSetting"); - ds.field("waist", &self.waist()); - ds.field("chest", &self.chest()); - ds.field("legs", &self.legs()); - ds.field("knees", &self.knees()); - ds.field("elbows", &self.elbows()); - ds.finish() - } -} +// automatically generated by the FlatBuffers compiler, do not modify +extern crate flatbuffers; +use std::mem; +use std::cmp::Ordering; +use self::flatbuffers::{EndianScalar, Follow}; +use super::*; +pub enum SteamVRTrackersSettingOffset {} +#[derive(Copy, Clone, PartialEq)] + +pub struct SteamVRTrackersSetting<'a> { + pub _tab: flatbuffers::Table<'a>, +} + +impl<'a> flatbuffers::Follow<'a> for SteamVRTrackersSetting<'a> { + type Inner = SteamVRTrackersSetting<'a>; + #[inline] + fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { + Self { _tab: flatbuffers::Table { buf, loc } } + } +} + +impl<'a> SteamVRTrackersSetting<'a> { + pub const VT_WAIST: flatbuffers::VOffsetT = 4; + pub const VT_CHEST: flatbuffers::VOffsetT = 6; + pub const VT_LEGS: flatbuffers::VOffsetT = 8; + pub const VT_KNEES: flatbuffers::VOffsetT = 10; + pub const VT_ELBOWS: flatbuffers::VOffsetT = 12; + + #[inline] + pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { + SteamVRTrackersSetting { _tab: table } + } + #[allow(unused_mut)] + pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( + _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, + args: &'args SteamVRTrackersSettingArgs + ) -> flatbuffers::WIPOffset> { + let mut builder = SteamVRTrackersSettingBuilder::new(_fbb); + builder.add_elbows(args.elbows); + builder.add_knees(args.knees); + builder.add_legs(args.legs); + builder.add_chest(args.chest); + builder.add_waist(args.waist); + builder.finish() + } + + + #[inline] + pub fn waist(&self) -> bool { + self._tab.get::(SteamVRTrackersSetting::VT_WAIST, Some(false)).unwrap() + } + #[inline] + pub fn chest(&self) -> bool { + self._tab.get::(SteamVRTrackersSetting::VT_CHEST, Some(false)).unwrap() + } + #[inline] + pub fn legs(&self) -> bool { + self._tab.get::(SteamVRTrackersSetting::VT_LEGS, Some(false)).unwrap() + } + #[inline] + pub fn knees(&self) -> bool { + self._tab.get::(SteamVRTrackersSetting::VT_KNEES, Some(false)).unwrap() + } + #[inline] + pub fn elbows(&self) -> bool { + self._tab.get::(SteamVRTrackersSetting::VT_ELBOWS, Some(false)).unwrap() + } +} + +impl flatbuffers::Verifiable for SteamVRTrackersSetting<'_> { + #[inline] + fn run_verifier( + v: &mut flatbuffers::Verifier, pos: usize + ) -> Result<(), flatbuffers::InvalidFlatbuffer> { + use self::flatbuffers::Verifiable; + v.visit_table(pos)? + .visit_field::("waist", Self::VT_WAIST, false)? + .visit_field::("chest", Self::VT_CHEST, false)? + .visit_field::("legs", Self::VT_LEGS, false)? + .visit_field::("knees", Self::VT_KNEES, false)? + .visit_field::("elbows", Self::VT_ELBOWS, false)? + .finish(); + Ok(()) + } +} +pub struct SteamVRTrackersSettingArgs { + pub waist: bool, + pub chest: bool, + pub legs: bool, + pub knees: bool, + pub elbows: bool, +} +impl<'a> Default for SteamVRTrackersSettingArgs { + #[inline] + fn default() -> Self { + SteamVRTrackersSettingArgs { + waist: false, + chest: false, + legs: false, + knees: false, + elbows: false, + } + } +} + +pub struct SteamVRTrackersSettingBuilder<'a: 'b, 'b> { + fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, + start_: flatbuffers::WIPOffset, +} +impl<'a: 'b, 'b> SteamVRTrackersSettingBuilder<'a, 'b> { + #[inline] + pub fn add_waist(&mut self, waist: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_WAIST, waist, false); + } + #[inline] + pub fn add_chest(&mut self, chest: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_CHEST, chest, false); + } + #[inline] + pub fn add_legs(&mut self, legs: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_LEGS, legs, false); + } + #[inline] + pub fn add_knees(&mut self, knees: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_KNEES, knees, false); + } + #[inline] + pub fn add_elbows(&mut self, elbows: bool) { + self.fbb_.push_slot::(SteamVRTrackersSetting::VT_ELBOWS, elbows, false); + } + #[inline] + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> SteamVRTrackersSettingBuilder<'a, 'b> { + let start = _fbb.start_table(); + SteamVRTrackersSettingBuilder { + 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 std::fmt::Debug for SteamVRTrackersSetting<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut ds = f.debug_struct("SteamVRTrackersSetting"); + ds.field("waist", &self.waist()); + ds.field("chest", &self.chest()); + ds.field("legs", &self.legs()); + ds.field("knees", &self.knees()); + ds.field("elbows", &self.elbows()); + ds.finish() + } +} diff --git a/protocol/typescript/src/all.ts b/protocol/typescript/src/all.ts index c5cda16f..26c2a49b 100644 --- a/protocol/typescript/src/all.ts +++ b/protocol/typescript/src/all.ts @@ -1,70 +1,83 @@ -export { MessageBundle, MessageBundleT } from './solarxr-protocol/message-bundle'; -export { Bone, BoneT } from './solarxr-protocol/data-feed/bone'; -export { DataFeedConfig, DataFeedConfigT } from './solarxr-protocol/data-feed/data-feed-config'; -export { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from './solarxr-protocol/data-feed/data-feed-message'; -export { DataFeedMessageHeader, DataFeedMessageHeaderT } from './solarxr-protocol/data-feed/data-feed-message-header'; -export { DataFeedUpdate, DataFeedUpdateT } from './solarxr-protocol/data-feed/data-feed-update'; -export { PollDataFeed, PollDataFeedT } from './solarxr-protocol/data-feed/poll-data-feed'; -export { StartDataFeed, StartDataFeedT } from './solarxr-protocol/data-feed/start-data-feed'; -export { DeviceData, DeviceDataT } from './solarxr-protocol/data-feed/device-data/device-data'; -export { DeviceDataMask, DeviceDataMaskT } from './solarxr-protocol/data-feed/device-data/device-data-mask'; -export { TrackerData, TrackerDataT } from './solarxr-protocol/data-feed/tracker/tracker-data'; -export { TrackerDataMask, TrackerDataMaskT } from './solarxr-protocol/data-feed/tracker/tracker-data-mask'; -export { TrackerInfo, TrackerInfoT } from './solarxr-protocol/data-feed/tracker/tracker-info'; -export { BodyPart } from './solarxr-protocol/datatypes/body-part'; -export { DeviceId, DeviceIdT } from './solarxr-protocol/datatypes/device-id'; -export { FilteringType } from './solarxr-protocol/datatypes/filtering-type'; -export { FirmwareErrorCode } from './solarxr-protocol/datatypes/firmware-error-code'; -export { HzF32, HzF32T } from './solarxr-protocol/datatypes/hz-f32'; -export { Ipv4Address, Ipv4AddressT } from './solarxr-protocol/datatypes/ipv4address'; -export { LogData, LogDataT } from './solarxr-protocol/datatypes/log-data'; -export { Temperature, TemperatureT } from './solarxr-protocol/datatypes/temperature'; -export { TrackerId, TrackerIdT } from './solarxr-protocol/datatypes/tracker-id'; -export { TrackerStatus } from './solarxr-protocol/datatypes/tracker-status'; -export { TransactionId, TransactionIdT } from './solarxr-protocol/datatypes/transaction-id'; -export { FirmwareStatusMask, FirmwareStatusMaskT } from './solarxr-protocol/datatypes/hardware-info/firmware-status-mask'; -export { HardwareAddress, HardwareAddressT } from './solarxr-protocol/datatypes/hardware-info/hardware-address'; -export { HardwareInfo, HardwareInfoT } from './solarxr-protocol/datatypes/hardware-info/hardware-info'; -export { HardwareStatus, HardwareStatusT } from './solarxr-protocol/datatypes/hardware-info/hardware-status'; -export { ImuType } from './solarxr-protocol/datatypes/hardware-info/imu-type'; -export { McuType } from './solarxr-protocol/datatypes/hardware-info/mcu-type'; -export { Quat, QuatT } from './solarxr-protocol/datatypes/math/quat'; -export { Vec3f, Vec3fT } from './solarxr-protocol/datatypes/math/vec3f'; -export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr-protocol/rpc/assign-tracker-request'; -export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr-protocol/rpc/auto-bone-epoch-response'; -export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr-protocol/rpc/auto-bone-process-request'; -export { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from './solarxr-protocol/rpc/auto-bone-process-status-response'; -export { AutoBoneProcessType } from './solarxr-protocol/rpc/auto-bone-process-type'; -export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr-protocol/rpc/change-settings-request'; -export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr-protocol/rpc/change-skeleton-config-request'; -export { CloseSerialRequest, CloseSerialRequestT } from './solarxr-protocol/rpc/close-serial-request'; -export { FilteringSettings, FilteringSettingsT } from './solarxr-protocol/rpc/filtering-settings'; -export { HeartbeatRequest, HeartbeatRequestT } from './solarxr-protocol/rpc/heartbeat-request'; -export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/heartbeat-response'; -export { OpenSerialRequest, OpenSerialRequestT } from './solarxr-protocol/rpc/open-serial-request'; -export { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-change-request'; -export { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-request'; -export { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from './solarxr-protocol/rpc/overlay-display-mode-response'; -export { RecordBVHRequest, RecordBVHRequestT } from './solarxr-protocol/rpc/record-bvhrequest'; -export { RecordBVHStatus, RecordBVHStatusT } from './solarxr-protocol/rpc/record-bvhstatus'; -export { ResetRequest, ResetRequestT } from './solarxr-protocol/rpc/reset-request'; -export { ResetResponse, ResetResponseT } from './solarxr-protocol/rpc/reset-response'; -export { ResetType } from './solarxr-protocol/rpc/reset-type'; -export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr-protocol/rpc/rpc-message'; -export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr-protocol/rpc/rpc-message-header'; -export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr-protocol/rpc/serial-tracker-factory-reset-request'; -export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr-protocol/rpc/serial-tracker-get-info-request'; -export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr-protocol/rpc/serial-tracker-reboot-request'; -export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr-protocol/rpc/serial-update-response'; -export { SetWifiRequest, SetWifiRequestT } from './solarxr-protocol/rpc/set-wifi-request'; -export { SettingsRequest, SettingsRequestT } from './solarxr-protocol/rpc/settings-request'; -export { SettingsResponse, SettingsResponseT } from './solarxr-protocol/rpc/settings-response'; -export { SkeletonBone } from './solarxr-protocol/rpc/skeleton-bone'; -export { SkeletonConfigRequest, SkeletonConfigRequestT } from './solarxr-protocol/rpc/skeleton-config-request'; -export { SkeletonConfigResponse, SkeletonConfigResponseT } from './solarxr-protocol/rpc/skeleton-config-response'; -export { SkeletonPart, SkeletonPartT } from './solarxr-protocol/rpc/skeleton-part'; -export { SkeletonResetAllRequest, SkeletonResetAllRequestT } from './solarxr-protocol/rpc/skeleton-reset-all-request'; -export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr-protocol/rpc/steam-vrtrackers-setting'; -export { ModelRatios, ModelRatiosT } from './solarxr-protocol/rpc/settings/model-ratios'; -export { ModelSettings, ModelSettingsT } from './solarxr-protocol/rpc/settings/model-settings'; -export { ModelToggles, ModelTogglesT } from './solarxr-protocol/rpc/settings/model-toggles'; +export { MessageBundle, MessageBundleT } from './solarxr_protocol/message-bundle'; +export { Bone, BoneT } from './solarxr_protocol/data_feed/bone'; +export { DataFeedConfig, DataFeedConfigT } from './solarxr_protocol/data_feed/data-feed-config'; +export { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from './solarxr_protocol/data_feed/data-feed-message'; +export { DataFeedMessageHeader, DataFeedMessageHeaderT } from './solarxr_protocol/data_feed/data-feed-message-header'; +export { DataFeedUpdate, DataFeedUpdateT } from './solarxr_protocol/data_feed/data-feed-update'; +export { PollDataFeed, PollDataFeedT } from './solarxr_protocol/data_feed/poll-data-feed'; +export { StartDataFeed, StartDataFeedT } from './solarxr_protocol/data_feed/start-data-feed'; +export { DeviceData, DeviceDataT } from './solarxr_protocol/data_feed/device_data/device-data'; +export { DeviceDataMask, DeviceDataMaskT } from './solarxr_protocol/data_feed/device_data/device-data-mask'; +export { TrackerData, TrackerDataT } from './solarxr_protocol/data_feed/tracker/tracker-data'; +export { TrackerDataMask, TrackerDataMaskT } from './solarxr_protocol/data_feed/tracker/tracker-data-mask'; +export { TrackerInfo, TrackerInfoT } from './solarxr_protocol/data_feed/tracker/tracker-info'; +export { BodyPart } from './solarxr_protocol/datatypes/body-part'; +export { Bytes, BytesT } from './solarxr_protocol/datatypes/bytes'; +export { DeviceId, DeviceIdT } from './solarxr_protocol/datatypes/device-id'; +export { FilteringType } from './solarxr_protocol/datatypes/filtering-type'; +export { FirmwareErrorCode } from './solarxr_protocol/datatypes/firmware-error-code'; +export { HzF32, HzF32T } from './solarxr_protocol/datatypes/hz-f32'; +export { Ipv4Address, Ipv4AddressT } from './solarxr_protocol/datatypes/ipv4-address'; +export { LogData, LogDataT } from './solarxr_protocol/datatypes/log-data'; +export { String, StringT } from './solarxr_protocol/datatypes/string'; +export { Temperature, TemperatureT } from './solarxr_protocol/datatypes/temperature'; +export { TrackerId, TrackerIdT } from './solarxr_protocol/datatypes/tracker-id'; +export { TrackerStatus } from './solarxr_protocol/datatypes/tracker-status'; +export { TransactionId, TransactionIdT } from './solarxr_protocol/datatypes/transaction-id'; +export { FirmwareStatusMask, FirmwareStatusMaskT } from './solarxr_protocol/datatypes/hardware_info/firmware-status-mask'; +export { HardwareAddress, HardwareAddressT } from './solarxr_protocol/datatypes/hardware_info/hardware-address'; +export { HardwareInfo, HardwareInfoT } from './solarxr_protocol/datatypes/hardware_info/hardware-info'; +export { HardwareStatus, HardwareStatusT } from './solarxr_protocol/datatypes/hardware_info/hardware-status'; +export { ImuType } from './solarxr_protocol/datatypes/hardware_info/imu-type'; +export { McuType } from './solarxr_protocol/datatypes/hardware_info/mcu-type'; +export { Quat, QuatT } from './solarxr_protocol/datatypes/math/quat'; +export { Vec3f, Vec3fT } from './solarxr_protocol/datatypes/math/vec3f'; +export { KeyValues, KeyValuesT } from './solarxr_protocol/pub_sub/key-values'; +export { Message, MessageT } from './solarxr_protocol/pub_sub/message'; +export { Payload, unionToPayload, unionListToPayload } from './solarxr_protocol/pub_sub/payload'; +export { PubSubHeader, PubSubHeaderT } from './solarxr_protocol/pub_sub/pub-sub-header'; +export { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from './solarxr_protocol/pub_sub/pub-sub-union'; +export { SubscriptionRequest, SubscriptionRequestT } from './solarxr_protocol/pub_sub/subscription-request'; +export { Topic, unionToTopic, unionListToTopic } from './solarxr_protocol/pub_sub/topic'; +export { TopicHandle, TopicHandleT } from './solarxr_protocol/pub_sub/topic-handle'; +export { TopicHandleRequest, TopicHandleRequestT } from './solarxr_protocol/pub_sub/topic-handle-request'; +export { TopicHandleResponse, TopicHandleResponseT } from './solarxr_protocol/pub_sub/topic-handle-response'; +export { TopicId, TopicIdT } from './solarxr_protocol/pub_sub/topic-id'; +export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr_protocol/rpc/assign-tracker-request'; +export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr_protocol/rpc/auto-bone-epoch-response'; +export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr_protocol/rpc/auto-bone-process-request'; +export { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from './solarxr_protocol/rpc/auto-bone-process-status-response'; +export { AutoBoneProcessType } from './solarxr_protocol/rpc/auto-bone-process-type'; +export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr_protocol/rpc/change-settings-request'; +export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr_protocol/rpc/change-skeleton-config-request'; +export { CloseSerialRequest, CloseSerialRequestT } from './solarxr_protocol/rpc/close-serial-request'; +export { FilteringSettings, FilteringSettingsT } from './solarxr_protocol/rpc/filtering-settings'; +export { HeartbeatRequest, HeartbeatRequestT } from './solarxr_protocol/rpc/heartbeat-request'; +export { HeartbeatResponse, HeartbeatResponseT } from './solarxr_protocol/rpc/heartbeat-response'; +export { OpenSerialRequest, OpenSerialRequestT } from './solarxr_protocol/rpc/open-serial-request'; +export { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from './solarxr_protocol/rpc/overlay-display-mode-change-request'; +export { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from './solarxr_protocol/rpc/overlay-display-mode-request'; +export { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from './solarxr_protocol/rpc/overlay-display-mode-response'; +export { RecordBVHRequest, RecordBVHRequestT } from './solarxr_protocol/rpc/record-b-v-h-request'; +export { RecordBVHStatus, RecordBVHStatusT } from './solarxr_protocol/rpc/record-b-v-h-status'; +export { ResetRequest, ResetRequestT } from './solarxr_protocol/rpc/reset-request'; +export { ResetResponse, ResetResponseT } from './solarxr_protocol/rpc/reset-response'; +export { ResetType } from './solarxr_protocol/rpc/reset-type'; +export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr_protocol/rpc/rpc-message'; +export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr_protocol/rpc/rpc-message-header'; +export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr_protocol/rpc/serial-tracker-factory-reset-request'; +export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr_protocol/rpc/serial-tracker-get-info-request'; +export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr_protocol/rpc/serial-tracker-reboot-request'; +export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr_protocol/rpc/serial-update-response'; +export { SetWifiRequest, SetWifiRequestT } from './solarxr_protocol/rpc/set-wifi-request'; +export { SettingsRequest, SettingsRequestT } from './solarxr_protocol/rpc/settings-request'; +export { SettingsResponse, SettingsResponseT } from './solarxr_protocol/rpc/settings-response'; +export { SkeletonBone } from './solarxr_protocol/rpc/skeleton-bone'; +export { SkeletonConfigRequest, SkeletonConfigRequestT } from './solarxr_protocol/rpc/skeleton-config-request'; +export { SkeletonConfigResponse, SkeletonConfigResponseT } from './solarxr_protocol/rpc/skeleton-config-response'; +export { SkeletonPart, SkeletonPartT } from './solarxr_protocol/rpc/skeleton-part'; +export { SkeletonResetAllRequest, SkeletonResetAllRequestT } from './solarxr_protocol/rpc/skeleton-reset-all-request'; +export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr_protocol/rpc/steam-v-r-trackers-setting'; +export { ModelRatios, ModelRatiosT } from './solarxr_protocol/rpc/settings/model-ratios'; +export { ModelSettings, ModelSettingsT } from './solarxr_protocol/rpc/settings/model-settings'; +export { ModelToggles, ModelTogglesT } from './solarxr_protocol/rpc/settings/model-toggles'; diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/bone.ts b/protocol/typescript/src/solarxr_protocol/data_feed/bone.ts similarity index 91% rename from protocol/typescript/src/solarxr-protocol/data-feed/bone.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/bone.ts index 56c40ae3..5ace3e0f 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/bone.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/bone.ts @@ -1,122 +1,122 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { BodyPart } from '../../solarxr-protocol/datatypes/body-part'; -import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat'; -import { Vec3f, Vec3fT } from '../../solarxr-protocol/datatypes/math/vec3f'; - - -export class Bone { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):Bone { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsBone(bb:flatbuffers.ByteBuffer, obj?:Bone):Bone { - return (obj || new Bone()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsBone(bb:flatbuffers.ByteBuffer, obj?:Bone):Bone { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new Bone()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -bodyPart():BodyPart { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : BodyPart.NONE; -} - -/** - * The global rotation of the bone. - * - * Note that the identity rotation is where a bone's tail is towards -y (assuming - * the head of the bone is the origin) - */ -rotationG(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -boneLength():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -/** - * The global position of the head of this bone. - * - * The head of a bone is joint/node of the bone touching the parent bone. The - * parent is defined as the bone closer to the HMD. - */ -headPositionG(obj?:Vec3f):Vec3f|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; -} - -static startBone(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addBodyPart(builder:flatbuffers.Builder, bodyPart:BodyPart) { - builder.addFieldInt8(0, bodyPart, BodyPart.NONE); -} - -static addRotationG(builder:flatbuffers.Builder, rotationGOffset:flatbuffers.Offset) { - builder.addFieldStruct(1, rotationGOffset, 0); -} - -static addBoneLength(builder:flatbuffers.Builder, boneLength:number) { - builder.addFieldFloat32(2, boneLength, 0.0); -} - -static addHeadPositionG(builder:flatbuffers.Builder, headPositionGOffset:flatbuffers.Offset) { - builder.addFieldStruct(3, headPositionGOffset, 0); -} - -static endBone(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): BoneT { - return new BoneT( - this.bodyPart(), - (this.rotationG() !== null ? this.rotationG()!.unpack() : null), - this.boneLength(), - (this.headPositionG() !== null ? this.headPositionG()!.unpack() : null) - ); -} - - -unpackTo(_o: BoneT): void { - _o.bodyPart = this.bodyPart(); - _o.rotationG = (this.rotationG() !== null ? this.rotationG()!.unpack() : null); - _o.boneLength = this.boneLength(); - _o.headPositionG = (this.headPositionG() !== null ? this.headPositionG()!.unpack() : null); -} -} - -export class BoneT { -constructor( - public bodyPart: BodyPart = BodyPart.NONE, - public rotationG: QuatT|null = null, - public boneLength: number = 0.0, - public headPositionG: Vec3fT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - Bone.startBone(builder); - Bone.addBodyPart(builder, this.bodyPart); - Bone.addRotationG(builder, (this.rotationG !== null ? this.rotationG!.pack(builder) : 0)); - Bone.addBoneLength(builder, this.boneLength); - Bone.addHeadPositionG(builder, (this.headPositionG !== null ? this.headPositionG!.pack(builder) : 0)); - - return Bone.endBone(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { BodyPart } from '../../solarxr_protocol/datatypes/body-part'; +import { Quat, QuatT } from '../../solarxr_protocol/datatypes/math/quat'; +import { Vec3f, Vec3fT } from '../../solarxr_protocol/datatypes/math/vec3f'; + + +export class Bone { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Bone { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsBone(bb:flatbuffers.ByteBuffer, obj?:Bone):Bone { + return (obj || new Bone()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsBone(bb:flatbuffers.ByteBuffer, obj?:Bone):Bone { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new Bone()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +bodyPart():BodyPart { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : BodyPart.NONE; +} + +/** + * The global rotation of the bone. + * + * Note that the identity rotation is where a bone's tail is towards -y (assuming + * the head of the bone is the origin) + */ +rotationG(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +boneLength():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +/** + * The global position of the head of this bone. + * + * The head of a bone is joint/node of the bone touching the parent bone. The + * parent is defined as the bone closer to the HMD. + */ +headPositionG(obj?:Vec3f):Vec3f|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; +} + +static startBone(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addBodyPart(builder:flatbuffers.Builder, bodyPart:BodyPart) { + builder.addFieldInt8(0, bodyPart, BodyPart.NONE); +} + +static addRotationG(builder:flatbuffers.Builder, rotationGOffset:flatbuffers.Offset) { + builder.addFieldStruct(1, rotationGOffset, 0); +} + +static addBoneLength(builder:flatbuffers.Builder, boneLength:number) { + builder.addFieldFloat32(2, boneLength, 0.0); +} + +static addHeadPositionG(builder:flatbuffers.Builder, headPositionGOffset:flatbuffers.Offset) { + builder.addFieldStruct(3, headPositionGOffset, 0); +} + +static endBone(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): BoneT { + return new BoneT( + this.bodyPart(), + (this.rotationG() !== null ? this.rotationG()!.unpack() : null), + this.boneLength(), + (this.headPositionG() !== null ? this.headPositionG()!.unpack() : null) + ); +} + + +unpackTo(_o: BoneT): void { + _o.bodyPart = this.bodyPart(); + _o.rotationG = (this.rotationG() !== null ? this.rotationG()!.unpack() : null); + _o.boneLength = this.boneLength(); + _o.headPositionG = (this.headPositionG() !== null ? this.headPositionG()!.unpack() : null); +} +} + +export class BoneT { +constructor( + public bodyPart: BodyPart = BodyPart.NONE, + public rotationG: QuatT|null = null, + public boneLength: number = 0.0, + public headPositionG: Vec3fT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + Bone.startBone(builder); + Bone.addBodyPart(builder, this.bodyPart); + Bone.addRotationG(builder, (this.rotationG !== null ? this.rotationG!.pack(builder) : 0)); + Bone.addBoneLength(builder, this.boneLength); + Bone.addHeadPositionG(builder, (this.headPositionG !== null ? this.headPositionG!.pack(builder) : 0)); + + return Bone.endBone(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-config.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/data-feed-config.ts index 48221dd7..eb00a869 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-config.ts @@ -1,120 +1,120 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { DeviceDataMask, DeviceDataMaskT } from '../../solarxr-protocol/data-feed/device-data/device-data-mask'; -import { TrackerDataMask, TrackerDataMaskT } from '../../solarxr-protocol/data-feed/tracker/tracker-data-mask'; - - -/** - * All information related to the configuration of a data feed. This may be sent - * as part of a `StartFeed`. - */ -export class DataFeedConfig { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):DataFeedConfig { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsDataFeedConfig(bb:flatbuffers.ByteBuffer, obj?:DataFeedConfig):DataFeedConfig { - return (obj || new DataFeedConfig()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsDataFeedConfig(bb:flatbuffers.ByteBuffer, obj?:DataFeedConfig):DataFeedConfig { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new DataFeedConfig()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * Minimum delay in milliseconds between new data updates. This value will be - * ignored when used for a `PollDataFeed`. - */ -minimumTimeSinceLast():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; -} - -dataMask(obj?:DeviceDataMask):DeviceDataMask|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new DeviceDataMask()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -syntheticTrackersMask(obj?:TrackerDataMask):TrackerDataMask|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new TrackerDataMask()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -boneMask():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startDataFeedConfig(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addMinimumTimeSinceLast(builder:flatbuffers.Builder, minimumTimeSinceLast:number) { - builder.addFieldInt16(0, minimumTimeSinceLast, 0); -} - -static addDataMask(builder:flatbuffers.Builder, dataMaskOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, dataMaskOffset, 0); -} - -static addSyntheticTrackersMask(builder:flatbuffers.Builder, syntheticTrackersMaskOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, syntheticTrackersMaskOffset, 0); -} - -static addBoneMask(builder:flatbuffers.Builder, boneMask:boolean) { - builder.addFieldInt8(3, +boneMask, +false); -} - -static endDataFeedConfig(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): DataFeedConfigT { - return new DataFeedConfigT( - this.minimumTimeSinceLast(), - (this.dataMask() !== null ? this.dataMask()!.unpack() : null), - (this.syntheticTrackersMask() !== null ? this.syntheticTrackersMask()!.unpack() : null), - this.boneMask() - ); -} - - -unpackTo(_o: DataFeedConfigT): void { - _o.minimumTimeSinceLast = this.minimumTimeSinceLast(); - _o.dataMask = (this.dataMask() !== null ? this.dataMask()!.unpack() : null); - _o.syntheticTrackersMask = (this.syntheticTrackersMask() !== null ? this.syntheticTrackersMask()!.unpack() : null); - _o.boneMask = this.boneMask(); -} -} - -export class DataFeedConfigT { -constructor( - public minimumTimeSinceLast: number = 0, - public dataMask: DeviceDataMaskT|null = null, - public syntheticTrackersMask: TrackerDataMaskT|null = null, - public boneMask: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const dataMask = (this.dataMask !== null ? this.dataMask!.pack(builder) : 0); - const syntheticTrackersMask = (this.syntheticTrackersMask !== null ? this.syntheticTrackersMask!.pack(builder) : 0); - - DataFeedConfig.startDataFeedConfig(builder); - DataFeedConfig.addMinimumTimeSinceLast(builder, this.minimumTimeSinceLast); - DataFeedConfig.addDataMask(builder, dataMask); - DataFeedConfig.addSyntheticTrackersMask(builder, syntheticTrackersMask); - DataFeedConfig.addBoneMask(builder, this.boneMask); - - return DataFeedConfig.endDataFeedConfig(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DeviceDataMask, DeviceDataMaskT } from '../../solarxr_protocol/data_feed/device_data/device-data-mask'; +import { TrackerDataMask, TrackerDataMaskT } from '../../solarxr_protocol/data_feed/tracker/tracker-data-mask'; + + +/** + * All information related to the configuration of a data feed. This may be sent + * as part of a `StartFeed`. + */ +export class DataFeedConfig { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):DataFeedConfig { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDataFeedConfig(bb:flatbuffers.ByteBuffer, obj?:DataFeedConfig):DataFeedConfig { + return (obj || new DataFeedConfig()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDataFeedConfig(bb:flatbuffers.ByteBuffer, obj?:DataFeedConfig):DataFeedConfig { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DataFeedConfig()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Minimum delay in milliseconds between new data updates. This value will be + * ignored when used for a `PollDataFeed`. + */ +minimumTimeSinceLast():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; +} + +dataMask(obj?:DeviceDataMask):DeviceDataMask|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new DeviceDataMask()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +syntheticTrackersMask(obj?:TrackerDataMask):TrackerDataMask|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new TrackerDataMask()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +boneMask():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startDataFeedConfig(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addMinimumTimeSinceLast(builder:flatbuffers.Builder, minimumTimeSinceLast:number) { + builder.addFieldInt16(0, minimumTimeSinceLast, 0); +} + +static addDataMask(builder:flatbuffers.Builder, dataMaskOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, dataMaskOffset, 0); +} + +static addSyntheticTrackersMask(builder:flatbuffers.Builder, syntheticTrackersMaskOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, syntheticTrackersMaskOffset, 0); +} + +static addBoneMask(builder:flatbuffers.Builder, boneMask:boolean) { + builder.addFieldInt8(3, +boneMask, +false); +} + +static endDataFeedConfig(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): DataFeedConfigT { + return new DataFeedConfigT( + this.minimumTimeSinceLast(), + (this.dataMask() !== null ? this.dataMask()!.unpack() : null), + (this.syntheticTrackersMask() !== null ? this.syntheticTrackersMask()!.unpack() : null), + this.boneMask() + ); +} + + +unpackTo(_o: DataFeedConfigT): void { + _o.minimumTimeSinceLast = this.minimumTimeSinceLast(); + _o.dataMask = (this.dataMask() !== null ? this.dataMask()!.unpack() : null); + _o.syntheticTrackersMask = (this.syntheticTrackersMask() !== null ? this.syntheticTrackersMask()!.unpack() : null); + _o.boneMask = this.boneMask(); +} +} + +export class DataFeedConfigT { +constructor( + public minimumTimeSinceLast: number = 0, + public dataMask: DeviceDataMaskT|null = null, + public syntheticTrackersMask: TrackerDataMaskT|null = null, + public boneMask: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const dataMask = (this.dataMask !== null ? this.dataMask!.pack(builder) : 0); + const syntheticTrackersMask = (this.syntheticTrackersMask !== null ? this.syntheticTrackersMask!.pack(builder) : 0); + + DataFeedConfig.startDataFeedConfig(builder); + DataFeedConfig.addMinimumTimeSinceLast(builder, this.minimumTimeSinceLast); + DataFeedConfig.addDataMask(builder, dataMask); + DataFeedConfig.addSyntheticTrackersMask(builder, syntheticTrackersMask); + DataFeedConfig.addBoneMask(builder, this.boneMask); + + return DataFeedConfig.endDataFeedConfig(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message-header.ts b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message-header.ts similarity index 85% rename from protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message-header.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message-header.ts index ca468e9f..6aa31808 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message-header.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message-header.ts @@ -1,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; -import { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from '../../solarxr-protocol/data-feed/data-feed-message'; -import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update'; -import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed'; -import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed'; - - -export class DataFeedMessageHeader { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):DataFeedMessageHeader { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsDataFeedMessageHeader(bb:flatbuffers.ByteBuffer, obj?:DataFeedMessageHeader):DataFeedMessageHeader { - return (obj || new DataFeedMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsDataFeedMessageHeader(bb:flatbuffers.ByteBuffer, obj?:DataFeedMessageHeader):DataFeedMessageHeader { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new DataFeedMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -messageType():DataFeedMessage { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : DataFeedMessage.NONE; -} - -message(obj:any):any|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; -} - -static startDataFeedMessageHeader(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addMessageType(builder:flatbuffers.Builder, messageType:DataFeedMessage) { - builder.addFieldInt8(0, messageType, DataFeedMessage.NONE); -} - -static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, messageOffset, 0); -} - -static endDataFeedMessageHeader(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createDataFeedMessageHeader(builder:flatbuffers.Builder, messageType:DataFeedMessage, messageOffset:flatbuffers.Offset):flatbuffers.Offset { - DataFeedMessageHeader.startDataFeedMessageHeader(builder); - DataFeedMessageHeader.addMessageType(builder, messageType); - DataFeedMessageHeader.addMessage(builder, messageOffset); - return DataFeedMessageHeader.endDataFeedMessageHeader(builder); -} - -unpack(): DataFeedMessageHeaderT { - return new DataFeedMessageHeaderT( - this.messageType(), - (() => { - let temp = unionToDataFeedMessage(this.messageType(), this.message.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })() - ); -} - - -unpackTo(_o: DataFeedMessageHeaderT): void { - _o.messageType = this.messageType(); - _o.message = (() => { - let temp = unionToDataFeedMessage(this.messageType(), this.message.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class DataFeedMessageHeaderT { -constructor( - public messageType: DataFeedMessage = DataFeedMessage.NONE, - public message: DataFeedConfigT|DataFeedUpdateT|PollDataFeedT|StartDataFeedT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const message = builder.createObjectOffset(this.message); - - return DataFeedMessageHeader.createDataFeedMessageHeader(builder, - this.messageType, - message - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; +import { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from '../../solarxr_protocol/data_feed/data-feed-message'; +import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr_protocol/data_feed/data-feed-update'; +import { PollDataFeed, PollDataFeedT } from '../../solarxr_protocol/data_feed/poll-data-feed'; +import { StartDataFeed, StartDataFeedT } from '../../solarxr_protocol/data_feed/start-data-feed'; + + +export class DataFeedMessageHeader { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):DataFeedMessageHeader { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDataFeedMessageHeader(bb:flatbuffers.ByteBuffer, obj?:DataFeedMessageHeader):DataFeedMessageHeader { + return (obj || new DataFeedMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDataFeedMessageHeader(bb:flatbuffers.ByteBuffer, obj?:DataFeedMessageHeader):DataFeedMessageHeader { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DataFeedMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +messageType():DataFeedMessage { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : DataFeedMessage.NONE; +} + +message(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +static startDataFeedMessageHeader(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addMessageType(builder:flatbuffers.Builder, messageType:DataFeedMessage) { + builder.addFieldInt8(0, messageType, DataFeedMessage.NONE); +} + +static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, messageOffset, 0); +} + +static endDataFeedMessageHeader(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createDataFeedMessageHeader(builder:flatbuffers.Builder, messageType:DataFeedMessage, messageOffset:flatbuffers.Offset):flatbuffers.Offset { + DataFeedMessageHeader.startDataFeedMessageHeader(builder); + DataFeedMessageHeader.addMessageType(builder, messageType); + DataFeedMessageHeader.addMessage(builder, messageOffset); + return DataFeedMessageHeader.endDataFeedMessageHeader(builder); +} + +unpack(): DataFeedMessageHeaderT { + return new DataFeedMessageHeaderT( + this.messageType(), + (() => { + let temp = unionToDataFeedMessage(this.messageType(), this.message.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: DataFeedMessageHeaderT): void { + _o.messageType = this.messageType(); + _o.message = (() => { + let temp = unionToDataFeedMessage(this.messageType(), this.message.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class DataFeedMessageHeaderT { +constructor( + public messageType: DataFeedMessage = DataFeedMessage.NONE, + public message: DataFeedConfigT|DataFeedUpdateT|PollDataFeedT|StartDataFeedT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const message = builder.createObjectOffset(this.message); + + return DataFeedMessageHeader.createDataFeedMessageHeader(builder, + this.messageType, + message + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message.ts b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message.ts similarity index 79% rename from protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message.ts index 61b4a629..ef3e5d28 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message.ts @@ -1,45 +1,45 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; -import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update'; -import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed'; -import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed'; - - -export enum DataFeedMessage{ - NONE = 0, - PollDataFeed = 1, - StartDataFeed = 2, - DataFeedUpdate = 3, - DataFeedConfig = 4 -} - -export function unionToDataFeedMessage( - type: DataFeedMessage, - accessor: (obj:DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed) => DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null -): DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null { - switch(DataFeedMessage[type]) { - case 'NONE': return null; - case 'PollDataFeed': return accessor(new PollDataFeed())! as PollDataFeed; - case 'StartDataFeed': return accessor(new StartDataFeed())! as StartDataFeed; - case 'DataFeedUpdate': return accessor(new DataFeedUpdate())! as DataFeedUpdate; - case 'DataFeedConfig': return accessor(new DataFeedConfig())! as DataFeedConfig; - default: return null; - } -} - -export function unionListToDataFeedMessage( - type: DataFeedMessage, - accessor: (index: number, obj:DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed) => DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null, - index: number -): DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null { - switch(DataFeedMessage[type]) { - case 'NONE': return null; - case 'PollDataFeed': return accessor(index, new PollDataFeed())! as PollDataFeed; - case 'StartDataFeed': return accessor(index, new StartDataFeed())! as StartDataFeed; - case 'DataFeedUpdate': return accessor(index, new DataFeedUpdate())! as DataFeedUpdate; - case 'DataFeedConfig': return accessor(index, new DataFeedConfig())! as DataFeedConfig; - default: return null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; +import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr_protocol/data_feed/data-feed-update'; +import { PollDataFeed, PollDataFeedT } from '../../solarxr_protocol/data_feed/poll-data-feed'; +import { StartDataFeed, StartDataFeedT } from '../../solarxr_protocol/data_feed/start-data-feed'; + + +export enum DataFeedMessage{ + NONE = 0, + PollDataFeed = 1, + StartDataFeed = 2, + DataFeedUpdate = 3, + DataFeedConfig = 4 +} + +export function unionToDataFeedMessage( + type: DataFeedMessage, + accessor: (obj:DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed) => DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null +): DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null { + switch(DataFeedMessage[type]) { + case 'NONE': return null; + case 'PollDataFeed': return accessor(new PollDataFeed())! as PollDataFeed; + case 'StartDataFeed': return accessor(new StartDataFeed())! as StartDataFeed; + case 'DataFeedUpdate': return accessor(new DataFeedUpdate())! as DataFeedUpdate; + case 'DataFeedConfig': return accessor(new DataFeedConfig())! as DataFeedConfig; + default: return null; + } +} + +export function unionListToDataFeedMessage( + type: DataFeedMessage, + accessor: (index: number, obj:DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed) => DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null, + index: number +): DataFeedConfig|DataFeedUpdate|PollDataFeed|StartDataFeed|null { + switch(DataFeedMessage[type]) { + case 'NONE': return null; + case 'PollDataFeed': return accessor(index, new PollDataFeed())! as PollDataFeed; + case 'StartDataFeed': return accessor(index, new StartDataFeed())! as StartDataFeed; + case 'DataFeedUpdate': return accessor(index, new DataFeedUpdate())! as DataFeedUpdate; + case 'DataFeedConfig': return accessor(index, new DataFeedConfig())! as DataFeedConfig; + default: return null; + } +} + diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-update.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/data-feed-update.ts index 28895139..afff416f 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-update.ts @@ -1,170 +1,170 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { Bone, BoneT } from '../../solarxr-protocol/data-feed/bone'; -import { DeviceData, DeviceDataT } from '../../solarxr-protocol/data-feed/device-data/device-data'; -import { TrackerData, TrackerDataT } from '../../solarxr-protocol/data-feed/tracker/tracker-data'; - - -/** - * All of the data components related to a single data feed. A data feed is comprised - * of device data, and tracker data. - * - * A data feed might send data only when it changes/updates, and we should make no - * assumptions that the data is actually delivered. If you want to guarantee - * delivery and avoid dropped observations of data (such as a user-initiated - * button press), it is better to use the RPC system. - */ -export class DataFeedUpdate { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):DataFeedUpdate { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsDataFeedUpdate(bb:flatbuffers.ByteBuffer, obj?:DataFeedUpdate):DataFeedUpdate { - return (obj || new DataFeedUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsDataFeedUpdate(bb:flatbuffers.ByteBuffer, obj?:DataFeedUpdate):DataFeedUpdate { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new DataFeedUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -devices(index: number, obj?:DeviceData):DeviceData|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new DeviceData()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -devicesLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -syntheticTrackers(index: number, obj?:TrackerData):TrackerData|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new TrackerData()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -syntheticTrackersLength():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -/** - * This must represent a set, where there is no more than one bone for a `BodyPart`. - */ -bones(index: number, obj?:Bone):Bone|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new Bone()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -bonesLength():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startDataFeedUpdate(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -static addDevices(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, devicesOffset, 0); -} - -static createDevicesVector(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 startDevicesVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static addSyntheticTrackers(builder:flatbuffers.Builder, syntheticTrackersOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, syntheticTrackersOffset, 0); -} - -static createSyntheticTrackersVector(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 startSyntheticTrackersVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static addBones(builder:flatbuffers.Builder, bonesOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, bonesOffset, 0); -} - -static createBonesVector(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 startBonesVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endDataFeedUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createDataFeedUpdate(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset, syntheticTrackersOffset:flatbuffers.Offset, bonesOffset:flatbuffers.Offset):flatbuffers.Offset { - DataFeedUpdate.startDataFeedUpdate(builder); - DataFeedUpdate.addDevices(builder, devicesOffset); - DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackersOffset); - DataFeedUpdate.addBones(builder, bonesOffset); - return DataFeedUpdate.endDataFeedUpdate(builder); -} - -unpack(): DataFeedUpdateT { - return new DataFeedUpdateT( - this.bb!.createObjList(this.devices.bind(this), this.devicesLength()), - this.bb!.createObjList(this.syntheticTrackers.bind(this), this.syntheticTrackersLength()), - this.bb!.createObjList(this.bones.bind(this), this.bonesLength()) - ); -} - - -unpackTo(_o: DataFeedUpdateT): void { - _o.devices = this.bb!.createObjList(this.devices.bind(this), this.devicesLength()); - _o.syntheticTrackers = this.bb!.createObjList(this.syntheticTrackers.bind(this), this.syntheticTrackersLength()); - _o.bones = this.bb!.createObjList(this.bones.bind(this), this.bonesLength()); -} -} - -export class DataFeedUpdateT { -constructor( - public devices: (DeviceDataT)[] = [], - public syntheticTrackers: (TrackerDataT)[] = [], - public bones: (BoneT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const devices = DataFeedUpdate.createDevicesVector(builder, builder.createObjectOffsetList(this.devices)); - const syntheticTrackers = DataFeedUpdate.createSyntheticTrackersVector(builder, builder.createObjectOffsetList(this.syntheticTrackers)); - const bones = DataFeedUpdate.createBonesVector(builder, builder.createObjectOffsetList(this.bones)); - - return DataFeedUpdate.createDataFeedUpdate(builder, - devices, - syntheticTrackers, - bones - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Bone, BoneT } from '../../solarxr_protocol/data_feed/bone'; +import { DeviceData, DeviceDataT } from '../../solarxr_protocol/data_feed/device_data/device-data'; +import { TrackerData, TrackerDataT } from '../../solarxr_protocol/data_feed/tracker/tracker-data'; + + +/** + * All of the data components related to a single data feed. A data feed is comprised + * of device data, and tracker data. + * + * A data feed might send data only when it changes/updates, and we should make no + * assumptions that the data is actually delivered. If you want to guarantee + * delivery and avoid dropped observations of data (such as a user-initiated + * button press), it is better to use the RPC system. + */ +export class DataFeedUpdate { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):DataFeedUpdate { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDataFeedUpdate(bb:flatbuffers.ByteBuffer, obj?:DataFeedUpdate):DataFeedUpdate { + return (obj || new DataFeedUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDataFeedUpdate(bb:flatbuffers.ByteBuffer, obj?:DataFeedUpdate):DataFeedUpdate { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DataFeedUpdate()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +devices(index: number, obj?:DeviceData):DeviceData|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new DeviceData()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +devicesLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +syntheticTrackers(index: number, obj?:TrackerData):TrackerData|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new TrackerData()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +syntheticTrackersLength():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +/** + * This must represent a set, where there is no more than one bone for a `BodyPart`. + */ +bones(index: number, obj?:Bone):Bone|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new Bone()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +bonesLength():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startDataFeedUpdate(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addDevices(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, devicesOffset, 0); +} + +static createDevicesVector(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 startDevicesVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static addSyntheticTrackers(builder:flatbuffers.Builder, syntheticTrackersOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, syntheticTrackersOffset, 0); +} + +static createSyntheticTrackersVector(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 startSyntheticTrackersVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static addBones(builder:flatbuffers.Builder, bonesOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, bonesOffset, 0); +} + +static createBonesVector(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 startBonesVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endDataFeedUpdate(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createDataFeedUpdate(builder:flatbuffers.Builder, devicesOffset:flatbuffers.Offset, syntheticTrackersOffset:flatbuffers.Offset, bonesOffset:flatbuffers.Offset):flatbuffers.Offset { + DataFeedUpdate.startDataFeedUpdate(builder); + DataFeedUpdate.addDevices(builder, devicesOffset); + DataFeedUpdate.addSyntheticTrackers(builder, syntheticTrackersOffset); + DataFeedUpdate.addBones(builder, bonesOffset); + return DataFeedUpdate.endDataFeedUpdate(builder); +} + +unpack(): DataFeedUpdateT { + return new DataFeedUpdateT( + this.bb!.createObjList(this.devices.bind(this), this.devicesLength()), + this.bb!.createObjList(this.syntheticTrackers.bind(this), this.syntheticTrackersLength()), + this.bb!.createObjList(this.bones.bind(this), this.bonesLength()) + ); +} + + +unpackTo(_o: DataFeedUpdateT): void { + _o.devices = this.bb!.createObjList(this.devices.bind(this), this.devicesLength()); + _o.syntheticTrackers = this.bb!.createObjList(this.syntheticTrackers.bind(this), this.syntheticTrackersLength()); + _o.bones = this.bb!.createObjList(this.bones.bind(this), this.bonesLength()); +} +} + +export class DataFeedUpdateT { +constructor( + public devices: (DeviceDataT)[] = [], + public syntheticTrackers: (TrackerDataT)[] = [], + public bones: (BoneT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const devices = DataFeedUpdate.createDevicesVector(builder, builder.createObjectOffsetList(this.devices)); + const syntheticTrackers = DataFeedUpdate.createSyntheticTrackersVector(builder, builder.createObjectOffsetList(this.syntheticTrackers)); + const bones = DataFeedUpdate.createBonesVector(builder, builder.createObjectOffsetList(this.bones)); + + return DataFeedUpdate.createDataFeedUpdate(builder, + devices, + syntheticTrackers, + bones + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data-mask.ts b/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data-mask.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data-mask.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data-mask.ts index 0089a6c1..d4e7cf85 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data-mask.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data-mask.ts @@ -1,103 +1,103 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerDataMask, TrackerDataMaskT } from '../../../solarxr-protocol/data-feed/tracker/tracker-data-mask'; - - -/** - * A mask of values to be reported in subsequent DeviceStatus. Values set to `false` - * or `null` will not reported. By default, all fields are false/null. - * - * If you set a value to `true`, it is not guaranteed that the sender actually has - * such a value to send. In this case, they will probably send `null`, and the receiver - * has the choice to disconnect due to missing data. - */ -export class DeviceDataMask { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):DeviceDataMask { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsDeviceDataMask(bb:flatbuffers.ByteBuffer, obj?:DeviceDataMask):DeviceDataMask { - return (obj || new DeviceDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsDeviceDataMask(bb:flatbuffers.ByteBuffer, obj?:DeviceDataMask):DeviceDataMask { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new DeviceDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * Which tracker data should be sent in this data feed - */ -trackerData(obj?:TrackerDataMask):TrackerDataMask|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new TrackerDataMask()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -/** - * true if device data should be sent in this data feed - */ -deviceData():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startDeviceDataMask(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addTrackerData(builder:flatbuffers.Builder, trackerDataOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerDataOffset, 0); -} - -static addDeviceData(builder:flatbuffers.Builder, deviceData:boolean) { - builder.addFieldInt8(1, +deviceData, +false); -} - -static endDeviceDataMask(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createDeviceDataMask(builder:flatbuffers.Builder, trackerDataOffset:flatbuffers.Offset, deviceData:boolean):flatbuffers.Offset { - DeviceDataMask.startDeviceDataMask(builder); - DeviceDataMask.addTrackerData(builder, trackerDataOffset); - DeviceDataMask.addDeviceData(builder, deviceData); - return DeviceDataMask.endDeviceDataMask(builder); -} - -unpack(): DeviceDataMaskT { - return new DeviceDataMaskT( - (this.trackerData() !== null ? this.trackerData()!.unpack() : null), - this.deviceData() - ); -} - - -unpackTo(_o: DeviceDataMaskT): void { - _o.trackerData = (this.trackerData() !== null ? this.trackerData()!.unpack() : null); - _o.deviceData = this.deviceData(); -} -} - -export class DeviceDataMaskT { -constructor( - public trackerData: TrackerDataMaskT|null = null, - public deviceData: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerData = (this.trackerData !== null ? this.trackerData!.pack(builder) : 0); - - return DeviceDataMask.createDeviceDataMask(builder, - trackerData, - this.deviceData - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerDataMask, TrackerDataMaskT } from '../../../solarxr_protocol/data_feed/tracker/tracker-data-mask'; + + +/** + * A mask of values to be reported in subsequent DeviceStatus. Values set to `false` + * or `null` will not reported. By default, all fields are false/null. + * + * If you set a value to `true`, it is not guaranteed that the sender actually has + * such a value to send. In this case, they will probably send `null`, and the receiver + * has the choice to disconnect due to missing data. + */ +export class DeviceDataMask { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):DeviceDataMask { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDeviceDataMask(bb:flatbuffers.ByteBuffer, obj?:DeviceDataMask):DeviceDataMask { + return (obj || new DeviceDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDeviceDataMask(bb:flatbuffers.ByteBuffer, obj?:DeviceDataMask):DeviceDataMask { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DeviceDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * Which tracker data should be sent in this data feed + */ +trackerData(obj?:TrackerDataMask):TrackerDataMask|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TrackerDataMask()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +/** + * true if device data should be sent in this data feed + */ +deviceData():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startDeviceDataMask(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addTrackerData(builder:flatbuffers.Builder, trackerDataOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerDataOffset, 0); +} + +static addDeviceData(builder:flatbuffers.Builder, deviceData:boolean) { + builder.addFieldInt8(1, +deviceData, +false); +} + +static endDeviceDataMask(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createDeviceDataMask(builder:flatbuffers.Builder, trackerDataOffset:flatbuffers.Offset, deviceData:boolean):flatbuffers.Offset { + DeviceDataMask.startDeviceDataMask(builder); + DeviceDataMask.addTrackerData(builder, trackerDataOffset); + DeviceDataMask.addDeviceData(builder, deviceData); + return DeviceDataMask.endDeviceDataMask(builder); +} + +unpack(): DeviceDataMaskT { + return new DeviceDataMaskT( + (this.trackerData() !== null ? this.trackerData()!.unpack() : null), + this.deviceData() + ); +} + + +unpackTo(_o: DeviceDataMaskT): void { + _o.trackerData = (this.trackerData() !== null ? this.trackerData()!.unpack() : null); + _o.deviceData = this.deviceData(); +} +} + +export class DeviceDataMaskT { +constructor( + public trackerData: TrackerDataMaskT|null = null, + public deviceData: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerData = (this.trackerData !== null ? this.trackerData!.pack(builder) : 0); + + return DeviceDataMask.createDeviceDataMask(builder, + trackerData, + this.deviceData + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data.ts b/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data.ts similarity index 92% rename from protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data.ts index a28bc4f8..c58520df 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data.ts @@ -1,166 +1,166 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerData, TrackerDataT } from '../../../solarxr-protocol/data-feed/tracker/tracker-data'; -import { DeviceId, DeviceIdT } from '../../../solarxr-protocol/datatypes/device-id'; -import { HardwareInfo, HardwareInfoT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-info'; -import { HardwareStatus, HardwareStatusT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-status'; - - -/** - * Describes all possible information about a hardware device. For example, a - * vive tracker is a single hardware device, and a slime tracker with two - * extensions is a single hardware device but two trackers. - */ -export class DeviceData { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):DeviceData { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsDeviceData(bb:flatbuffers.ByteBuffer, obj?:DeviceData):DeviceData { - return (obj || new DeviceData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsDeviceData(bb:flatbuffers.ByteBuffer, obj?:DeviceData):DeviceData { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new DeviceData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -id(obj?:DeviceId):DeviceId|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new DeviceId()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * The dynamically changeable name of the device. This might be set by the - * user to help them remember which tracker is which. - */ -customName():string|null -customName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -customName(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; -} - -/** - * Mostly-static info about the device hardware - */ -hardwareInfo(obj?:HardwareInfo):HardwareInfo|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new HardwareInfo()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -/** - * General info about the status of the device - */ -hardwareStatus(obj?:HardwareStatus):HardwareStatus|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new HardwareStatus()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -/** - * Info about all trackers attached to this device - */ -trackers(index: number, obj?:TrackerData):TrackerData|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? (obj || new TrackerData()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -trackersLength():number { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startDeviceData(builder:flatbuffers.Builder) { - builder.startObject(5); -} - -static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) { - builder.addFieldStruct(0, idOffset, 0); -} - -static addCustomName(builder:flatbuffers.Builder, customNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, customNameOffset, 0); -} - -static addHardwareInfo(builder:flatbuffers.Builder, hardwareInfoOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, hardwareInfoOffset, 0); -} - -static addHardwareStatus(builder:flatbuffers.Builder, hardwareStatusOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, hardwareStatusOffset, 0); -} - -static addTrackers(builder:flatbuffers.Builder, trackersOffset:flatbuffers.Offset) { - builder.addFieldOffset(4, trackersOffset, 0); -} - -static createTrackersVector(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 startTrackersVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endDeviceData(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): DeviceDataT { - return new DeviceDataT( - (this.id() !== null ? this.id()!.unpack() : null), - this.customName(), - (this.hardwareInfo() !== null ? this.hardwareInfo()!.unpack() : null), - (this.hardwareStatus() !== null ? this.hardwareStatus()!.unpack() : null), - this.bb!.createObjList(this.trackers.bind(this), this.trackersLength()) - ); -} - - -unpackTo(_o: DeviceDataT): void { - _o.id = (this.id() !== null ? this.id()!.unpack() : null); - _o.customName = this.customName(); - _o.hardwareInfo = (this.hardwareInfo() !== null ? this.hardwareInfo()!.unpack() : null); - _o.hardwareStatus = (this.hardwareStatus() !== null ? this.hardwareStatus()!.unpack() : null); - _o.trackers = this.bb!.createObjList(this.trackers.bind(this), this.trackersLength()); -} -} - -export class DeviceDataT { -constructor( - public id: DeviceIdT|null = null, - public customName: string|Uint8Array|null = null, - public hardwareInfo: HardwareInfoT|null = null, - public hardwareStatus: HardwareStatusT|null = null, - public trackers: (TrackerDataT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const customName = (this.customName !== null ? builder.createString(this.customName!) : 0); - const hardwareInfo = (this.hardwareInfo !== null ? this.hardwareInfo!.pack(builder) : 0); - const hardwareStatus = (this.hardwareStatus !== null ? this.hardwareStatus!.pack(builder) : 0); - const trackers = DeviceData.createTrackersVector(builder, builder.createObjectOffsetList(this.trackers)); - - DeviceData.startDeviceData(builder); - DeviceData.addId(builder, (this.id !== null ? this.id!.pack(builder) : 0)); - DeviceData.addCustomName(builder, customName); - DeviceData.addHardwareInfo(builder, hardwareInfo); - DeviceData.addHardwareStatus(builder, hardwareStatus); - DeviceData.addTrackers(builder, trackers); - - return DeviceData.endDeviceData(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerData, TrackerDataT } from '../../../solarxr_protocol/data_feed/tracker/tracker-data'; +import { DeviceId, DeviceIdT } from '../../../solarxr_protocol/datatypes/device-id'; +import { HardwareInfo, HardwareInfoT } from '../../../solarxr_protocol/datatypes/hardware_info/hardware-info'; +import { HardwareStatus, HardwareStatusT } from '../../../solarxr_protocol/datatypes/hardware_info/hardware-status'; + + +/** + * Describes all possible information about a hardware device. For example, a + * vive tracker is a single hardware device, and a slime tracker with two + * extensions is a single hardware device but two trackers. + */ +export class DeviceData { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):DeviceData { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsDeviceData(bb:flatbuffers.ByteBuffer, obj?:DeviceData):DeviceData { + return (obj || new DeviceData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsDeviceData(bb:flatbuffers.ByteBuffer, obj?:DeviceData):DeviceData { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new DeviceData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +id(obj?:DeviceId):DeviceId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new DeviceId()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * The dynamically changeable name of the device. This might be set by the + * user to help them remember which tracker is which. + */ +customName():string|null +customName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +customName(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; +} + +/** + * Mostly-static info about the device hardware + */ +hardwareInfo(obj?:HardwareInfo):HardwareInfo|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new HardwareInfo()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +/** + * General info about the status of the device + */ +hardwareStatus(obj?:HardwareStatus):HardwareStatus|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new HardwareStatus()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +/** + * Info about all trackers attached to this device + */ +trackers(index: number, obj?:TrackerData):TrackerData|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? (obj || new TrackerData()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +trackersLength():number { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startDeviceData(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) { + builder.addFieldStruct(0, idOffset, 0); +} + +static addCustomName(builder:flatbuffers.Builder, customNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, customNameOffset, 0); +} + +static addHardwareInfo(builder:flatbuffers.Builder, hardwareInfoOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, hardwareInfoOffset, 0); +} + +static addHardwareStatus(builder:flatbuffers.Builder, hardwareStatusOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, hardwareStatusOffset, 0); +} + +static addTrackers(builder:flatbuffers.Builder, trackersOffset:flatbuffers.Offset) { + builder.addFieldOffset(4, trackersOffset, 0); +} + +static createTrackersVector(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 startTrackersVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endDeviceData(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): DeviceDataT { + return new DeviceDataT( + (this.id() !== null ? this.id()!.unpack() : null), + this.customName(), + (this.hardwareInfo() !== null ? this.hardwareInfo()!.unpack() : null), + (this.hardwareStatus() !== null ? this.hardwareStatus()!.unpack() : null), + this.bb!.createObjList(this.trackers.bind(this), this.trackersLength()) + ); +} + + +unpackTo(_o: DeviceDataT): void { + _o.id = (this.id() !== null ? this.id()!.unpack() : null); + _o.customName = this.customName(); + _o.hardwareInfo = (this.hardwareInfo() !== null ? this.hardwareInfo()!.unpack() : null); + _o.hardwareStatus = (this.hardwareStatus() !== null ? this.hardwareStatus()!.unpack() : null); + _o.trackers = this.bb!.createObjList(this.trackers.bind(this), this.trackersLength()); +} +} + +export class DeviceDataT { +constructor( + public id: DeviceIdT|null = null, + public customName: string|Uint8Array|null = null, + public hardwareInfo: HardwareInfoT|null = null, + public hardwareStatus: HardwareStatusT|null = null, + public trackers: (TrackerDataT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const customName = (this.customName !== null ? builder.createString(this.customName!) : 0); + const hardwareInfo = (this.hardwareInfo !== null ? this.hardwareInfo!.pack(builder) : 0); + const hardwareStatus = (this.hardwareStatus !== null ? this.hardwareStatus!.pack(builder) : 0); + const trackers = DeviceData.createTrackersVector(builder, builder.createObjectOffsetList(this.trackers)); + + DeviceData.startDeviceData(builder); + DeviceData.addId(builder, (this.id !== null ? this.id!.pack(builder) : 0)); + DeviceData.addCustomName(builder, customName); + DeviceData.addHardwareInfo(builder, hardwareInfo); + DeviceData.addHardwareStatus(builder, hardwareStatus); + DeviceData.addTrackers(builder, trackers); + + return DeviceData.endDeviceData(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/poll-data-feed.ts b/protocol/typescript/src/solarxr_protocol/data_feed/poll-data-feed.ts similarity index 92% rename from protocol/typescript/src/solarxr-protocol/data-feed/poll-data-feed.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/poll-data-feed.ts index 93a6aa61..a86d1d5a 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/poll-data-feed.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/poll-data-feed.ts @@ -1,79 +1,79 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; - - -/** - * Requests for a single `Update` to be sent. This is helpful when getting - * initial info about the device. - */ -export class PollDataFeed { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):PollDataFeed { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsPollDataFeed(bb:flatbuffers.ByteBuffer, obj?:PollDataFeed):PollDataFeed { - return (obj || new PollDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsPollDataFeed(bb:flatbuffers.ByteBuffer, obj?:PollDataFeed):PollDataFeed { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new PollDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -config(obj?:DataFeedConfig):DataFeedConfig|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new DataFeedConfig()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startPollDataFeed(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addConfig(builder:flatbuffers.Builder, configOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, configOffset, 0); -} - -static endPollDataFeed(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createPollDataFeed(builder:flatbuffers.Builder, configOffset:flatbuffers.Offset):flatbuffers.Offset { - PollDataFeed.startPollDataFeed(builder); - PollDataFeed.addConfig(builder, configOffset); - return PollDataFeed.endPollDataFeed(builder); -} - -unpack(): PollDataFeedT { - return new PollDataFeedT( - (this.config() !== null ? this.config()!.unpack() : null) - ); -} - - -unpackTo(_o: PollDataFeedT): void { - _o.config = (this.config() !== null ? this.config()!.unpack() : null); -} -} - -export class PollDataFeedT { -constructor( - public config: DataFeedConfigT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const config = (this.config !== null ? this.config!.pack(builder) : 0); - - return PollDataFeed.createPollDataFeed(builder, - config - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; + + +/** + * Requests for a single `Update` to be sent. This is helpful when getting + * initial info about the device. + */ +export class PollDataFeed { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):PollDataFeed { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsPollDataFeed(bb:flatbuffers.ByteBuffer, obj?:PollDataFeed):PollDataFeed { + return (obj || new PollDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsPollDataFeed(bb:flatbuffers.ByteBuffer, obj?:PollDataFeed):PollDataFeed { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new PollDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +config(obj?:DataFeedConfig):DataFeedConfig|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new DataFeedConfig()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startPollDataFeed(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addConfig(builder:flatbuffers.Builder, configOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, configOffset, 0); +} + +static endPollDataFeed(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createPollDataFeed(builder:flatbuffers.Builder, configOffset:flatbuffers.Offset):flatbuffers.Offset { + PollDataFeed.startPollDataFeed(builder); + PollDataFeed.addConfig(builder, configOffset); + return PollDataFeed.endPollDataFeed(builder); +} + +unpack(): PollDataFeedT { + return new PollDataFeedT( + (this.config() !== null ? this.config()!.unpack() : null) + ); +} + + +unpackTo(_o: PollDataFeedT): void { + _o.config = (this.config() !== null ? this.config()!.unpack() : null); +} +} + +export class PollDataFeedT { +constructor( + public config: DataFeedConfigT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const config = (this.config !== null ? this.config!.pack(builder) : 0); + + return PollDataFeed.createPollDataFeed(builder, + config + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/start-data-feed.ts b/protocol/typescript/src/solarxr_protocol/data_feed/start-data-feed.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/data-feed/start-data-feed.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/start-data-feed.ts index b5fd87d8..08299a90 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/start-data-feed.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/start-data-feed.ts @@ -1,102 +1,102 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; - - -/** - * Requests for the other party to send `data_feeds`. - * For example, GUI requests for position data to be sent from server. - * - * When sending a new `StartFeed`, the old data feeds should stop being sent. - * We still support multiple data feeds at the same time, because `data_feeds` - * is a list. - * - * Multiple data feeds are useful to get data at different frequencies. - */ -export class StartDataFeed { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):StartDataFeed { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsStartDataFeed(bb:flatbuffers.ByteBuffer, obj?:StartDataFeed):StartDataFeed { - return (obj || new StartDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsStartDataFeed(bb:flatbuffers.ByteBuffer, obj?:StartDataFeed):StartDataFeed { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new StartDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -dataFeeds(index: number, obj?:DataFeedConfig):DataFeedConfig|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new DataFeedConfig()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -dataFeedsLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startStartDataFeed(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addDataFeeds(builder:flatbuffers.Builder, dataFeedsOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, dataFeedsOffset, 0); -} - -static createDataFeedsVector(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 startDataFeedsVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endStartDataFeed(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createStartDataFeed(builder:flatbuffers.Builder, dataFeedsOffset:flatbuffers.Offset):flatbuffers.Offset { - StartDataFeed.startStartDataFeed(builder); - StartDataFeed.addDataFeeds(builder, dataFeedsOffset); - return StartDataFeed.endStartDataFeed(builder); -} - -unpack(): StartDataFeedT { - return new StartDataFeedT( - this.bb!.createObjList(this.dataFeeds.bind(this), this.dataFeedsLength()) - ); -} - - -unpackTo(_o: StartDataFeedT): void { - _o.dataFeeds = this.bb!.createObjList(this.dataFeeds.bind(this), this.dataFeedsLength()); -} -} - -export class StartDataFeedT { -constructor( - public dataFeeds: (DataFeedConfigT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const dataFeeds = StartDataFeed.createDataFeedsVector(builder, builder.createObjectOffsetList(this.dataFeeds)); - - return StartDataFeed.createStartDataFeed(builder, - dataFeeds - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; + + +/** + * Requests for the other party to send `data_feeds`. + * For example, GUI requests for position data to be sent from server. + * + * When sending a new `StartFeed`, the old data feeds should stop being sent. + * We still support multiple data feeds at the same time, because `data_feeds` + * is a list. + * + * Multiple data feeds are useful to get data at different frequencies. + */ +export class StartDataFeed { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):StartDataFeed { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsStartDataFeed(bb:flatbuffers.ByteBuffer, obj?:StartDataFeed):StartDataFeed { + return (obj || new StartDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsStartDataFeed(bb:flatbuffers.ByteBuffer, obj?:StartDataFeed):StartDataFeed { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new StartDataFeed()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +dataFeeds(index: number, obj?:DataFeedConfig):DataFeedConfig|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new DataFeedConfig()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +dataFeedsLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startStartDataFeed(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addDataFeeds(builder:flatbuffers.Builder, dataFeedsOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, dataFeedsOffset, 0); +} + +static createDataFeedsVector(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 startDataFeedsVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endStartDataFeed(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createStartDataFeed(builder:flatbuffers.Builder, dataFeedsOffset:flatbuffers.Offset):flatbuffers.Offset { + StartDataFeed.startStartDataFeed(builder); + StartDataFeed.addDataFeeds(builder, dataFeedsOffset); + return StartDataFeed.endStartDataFeed(builder); +} + +unpack(): StartDataFeedT { + return new StartDataFeedT( + this.bb!.createObjList(this.dataFeeds.bind(this), this.dataFeedsLength()) + ); +} + + +unpackTo(_o: StartDataFeedT): void { + _o.dataFeeds = this.bb!.createObjList(this.dataFeeds.bind(this), this.dataFeedsLength()); +} +} + +export class StartDataFeedT { +constructor( + public dataFeeds: (DataFeedConfigT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const dataFeeds = StartDataFeed.createDataFeedsVector(builder, builder.createObjectOffsetList(this.dataFeeds)); + + return StartDataFeed.createStartDataFeed(builder, + dataFeeds + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts b/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data-mask.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data-mask.ts index 0428ff29..84d72847 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data-mask.ts @@ -1,159 +1,159 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * A mask of the different components in `TrackerComponent` - */ -export class TrackerDataMask { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):TrackerDataMask { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTrackerDataMask(bb:flatbuffers.ByteBuffer, obj?:TrackerDataMask):TrackerDataMask { - return (obj || new TrackerDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTrackerDataMask(bb:flatbuffers.ByteBuffer, obj?:TrackerDataMask):TrackerDataMask { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TrackerDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -info():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -status():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rotation():boolean { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -position():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rawRotVel():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rawTransAccel():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -temp():boolean { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startTrackerDataMask(builder:flatbuffers.Builder) { - builder.startObject(7); -} - -static addInfo(builder:flatbuffers.Builder, info:boolean) { - builder.addFieldInt8(0, +info, +false); -} - -static addStatus(builder:flatbuffers.Builder, status:boolean) { - builder.addFieldInt8(1, +status, +false); -} - -static addRotation(builder:flatbuffers.Builder, rotation:boolean) { - builder.addFieldInt8(2, +rotation, +false); -} - -static addPosition(builder:flatbuffers.Builder, position:boolean) { - builder.addFieldInt8(3, +position, +false); -} - -static addRawRotVel(builder:flatbuffers.Builder, rawRotVel:boolean) { - builder.addFieldInt8(4, +rawRotVel, +false); -} - -static addRawTransAccel(builder:flatbuffers.Builder, rawTransAccel:boolean) { - builder.addFieldInt8(5, +rawTransAccel, +false); -} - -static addTemp(builder:flatbuffers.Builder, temp:boolean) { - builder.addFieldInt8(6, +temp, +false); -} - -static endTrackerDataMask(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTrackerDataMask(builder:flatbuffers.Builder, info:boolean, status:boolean, rotation:boolean, position:boolean, rawRotVel:boolean, rawTransAccel:boolean, temp:boolean):flatbuffers.Offset { - TrackerDataMask.startTrackerDataMask(builder); - TrackerDataMask.addInfo(builder, info); - TrackerDataMask.addStatus(builder, status); - TrackerDataMask.addRotation(builder, rotation); - TrackerDataMask.addPosition(builder, position); - TrackerDataMask.addRawRotVel(builder, rawRotVel); - TrackerDataMask.addRawTransAccel(builder, rawTransAccel); - TrackerDataMask.addTemp(builder, temp); - return TrackerDataMask.endTrackerDataMask(builder); -} - -unpack(): TrackerDataMaskT { - return new TrackerDataMaskT( - this.info(), - this.status(), - this.rotation(), - this.position(), - this.rawRotVel(), - this.rawTransAccel(), - this.temp() - ); -} - - -unpackTo(_o: TrackerDataMaskT): void { - _o.info = this.info(); - _o.status = this.status(); - _o.rotation = this.rotation(); - _o.position = this.position(); - _o.rawRotVel = this.rawRotVel(); - _o.rawTransAccel = this.rawTransAccel(); - _o.temp = this.temp(); -} -} - -export class TrackerDataMaskT { -constructor( - public info: boolean = false, - public status: boolean = false, - public rotation: boolean = false, - public position: boolean = false, - public rawRotVel: boolean = false, - public rawTransAccel: boolean = false, - public temp: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TrackerDataMask.createTrackerDataMask(builder, - this.info, - this.status, - this.rotation, - this.position, - this.rawRotVel, - this.rawTransAccel, - this.temp - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * A mask of the different components in `TrackerComponent` + */ +export class TrackerDataMask { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TrackerDataMask { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackerDataMask(bb:flatbuffers.ByteBuffer, obj?:TrackerDataMask):TrackerDataMask { + return (obj || new TrackerDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackerDataMask(bb:flatbuffers.ByteBuffer, obj?:TrackerDataMask):TrackerDataMask { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackerDataMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +info():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +status():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rotation():boolean { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +position():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rawRotVel():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rawTransAccel():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +temp():boolean { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startTrackerDataMask(builder:flatbuffers.Builder) { + builder.startObject(7); +} + +static addInfo(builder:flatbuffers.Builder, info:boolean) { + builder.addFieldInt8(0, +info, +false); +} + +static addStatus(builder:flatbuffers.Builder, status:boolean) { + builder.addFieldInt8(1, +status, +false); +} + +static addRotation(builder:flatbuffers.Builder, rotation:boolean) { + builder.addFieldInt8(2, +rotation, +false); +} + +static addPosition(builder:flatbuffers.Builder, position:boolean) { + builder.addFieldInt8(3, +position, +false); +} + +static addRawRotVel(builder:flatbuffers.Builder, rawRotVel:boolean) { + builder.addFieldInt8(4, +rawRotVel, +false); +} + +static addRawTransAccel(builder:flatbuffers.Builder, rawTransAccel:boolean) { + builder.addFieldInt8(5, +rawTransAccel, +false); +} + +static addTemp(builder:flatbuffers.Builder, temp:boolean) { + builder.addFieldInt8(6, +temp, +false); +} + +static endTrackerDataMask(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTrackerDataMask(builder:flatbuffers.Builder, info:boolean, status:boolean, rotation:boolean, position:boolean, rawRotVel:boolean, rawTransAccel:boolean, temp:boolean):flatbuffers.Offset { + TrackerDataMask.startTrackerDataMask(builder); + TrackerDataMask.addInfo(builder, info); + TrackerDataMask.addStatus(builder, status); + TrackerDataMask.addRotation(builder, rotation); + TrackerDataMask.addPosition(builder, position); + TrackerDataMask.addRawRotVel(builder, rawRotVel); + TrackerDataMask.addRawTransAccel(builder, rawTransAccel); + TrackerDataMask.addTemp(builder, temp); + return TrackerDataMask.endTrackerDataMask(builder); +} + +unpack(): TrackerDataMaskT { + return new TrackerDataMaskT( + this.info(), + this.status(), + this.rotation(), + this.position(), + this.rawRotVel(), + this.rawTransAccel(), + this.temp() + ); +} + + +unpackTo(_o: TrackerDataMaskT): void { + _o.info = this.info(); + _o.status = this.status(); + _o.rotation = this.rotation(); + _o.position = this.position(); + _o.rawRotVel = this.rawRotVel(); + _o.rawTransAccel = this.rawTransAccel(); + _o.temp = this.temp(); +} +} + +export class TrackerDataMaskT { +constructor( + public info: boolean = false, + public status: boolean = false, + public rotation: boolean = false, + public position: boolean = false, + public rawRotVel: boolean = false, + public rawTransAccel: boolean = false, + public temp: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackerDataMask.createTrackerDataMask(builder, + this.info, + this.status, + this.rotation, + this.position, + this.rawRotVel, + this.rawTransAccel, + this.temp + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts b/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data.ts similarity index 91% rename from protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data.ts index f9a1b020..d2f2bf02 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data.ts @@ -1,187 +1,187 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TrackerInfo, TrackerInfoT } from '../../../solarxr-protocol/data-feed/tracker/tracker-info'; -import { Temperature, TemperatureT } from '../../../solarxr-protocol/datatypes/temperature'; -import { TrackerId, TrackerIdT } from '../../../solarxr-protocol/datatypes/tracker-id'; -import { TrackerStatus } from '../../../solarxr-protocol/datatypes/tracker-status'; -import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat'; -import { Vec3f, Vec3fT } from '../../../solarxr-protocol/datatypes/math/vec3f'; - - -/** - * Describes all possible information about a tracker. A tracker is anything that - * provides kinematic data about a particular body part. - * - * Trackers may be synthetic/computed or instead part of an actual hardware device. - * There can be multiple trackers per hardware device. - */ -export class TrackerData { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):TrackerData { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTrackerData(bb:flatbuffers.ByteBuffer, obj?:TrackerData):TrackerData { - return (obj || new TrackerData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTrackerData(bb:flatbuffers.ByteBuffer, obj?:TrackerData):TrackerData { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TrackerData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -trackerId(obj?:TrackerId):TrackerId|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new TrackerId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -info(obj?:TrackerInfo):TrackerInfo|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new TrackerInfo()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -status():TrackerStatus { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : TrackerStatus.NONE; -} - -rotation(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Position, in meters - */ -position(obj?:Vec3f):Vec3f|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Raw rotational velocity, in euler angles - */ -rawRotVel(obj?:Vec3f):Vec3f|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Raw translational acceleration, in m/s^2 - */ -rawTransAccel(obj?:Vec3f):Vec3f|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * Temperature in degrees celsius - */ -temp(obj?:Temperature):Temperature|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? (obj || new Temperature()).__init(this.bb_pos + offset, this.bb!) : null; -} - -static startTrackerData(builder:flatbuffers.Builder) { - builder.startObject(8); -} - -static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerIdOffset, 0); -} - -static addInfo(builder:flatbuffers.Builder, infoOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, infoOffset, 0); -} - -static addStatus(builder:flatbuffers.Builder, status:TrackerStatus) { - builder.addFieldInt8(2, status, TrackerStatus.NONE); -} - -static addRotation(builder:flatbuffers.Builder, rotationOffset:flatbuffers.Offset) { - builder.addFieldStruct(3, rotationOffset, 0); -} - -static addPosition(builder:flatbuffers.Builder, positionOffset:flatbuffers.Offset) { - builder.addFieldStruct(4, positionOffset, 0); -} - -static addRawRotVel(builder:flatbuffers.Builder, rawRotVelOffset:flatbuffers.Offset) { - builder.addFieldStruct(5, rawRotVelOffset, 0); -} - -static addRawTransAccel(builder:flatbuffers.Builder, rawTransAccelOffset:flatbuffers.Offset) { - builder.addFieldStruct(6, rawTransAccelOffset, 0); -} - -static addTemp(builder:flatbuffers.Builder, tempOffset:flatbuffers.Offset) { - builder.addFieldStruct(7, tempOffset, 0); -} - -static endTrackerData(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): TrackerDataT { - return new TrackerDataT( - (this.trackerId() !== null ? this.trackerId()!.unpack() : null), - (this.info() !== null ? this.info()!.unpack() : null), - this.status(), - (this.rotation() !== null ? this.rotation()!.unpack() : null), - (this.position() !== null ? this.position()!.unpack() : null), - (this.rawRotVel() !== null ? this.rawRotVel()!.unpack() : null), - (this.rawTransAccel() !== null ? this.rawTransAccel()!.unpack() : null), - (this.temp() !== null ? this.temp()!.unpack() : null) - ); -} - - -unpackTo(_o: TrackerDataT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); - _o.info = (this.info() !== null ? this.info()!.unpack() : null); - _o.status = this.status(); - _o.rotation = (this.rotation() !== null ? this.rotation()!.unpack() : null); - _o.position = (this.position() !== null ? this.position()!.unpack() : null); - _o.rawRotVel = (this.rawRotVel() !== null ? this.rawRotVel()!.unpack() : null); - _o.rawTransAccel = (this.rawTransAccel() !== null ? this.rawTransAccel()!.unpack() : null); - _o.temp = (this.temp() !== null ? this.temp()!.unpack() : null); -} -} - -export class TrackerDataT { -constructor( - public trackerId: TrackerIdT|null = null, - public info: TrackerInfoT|null = null, - public status: TrackerStatus = TrackerStatus.NONE, - public rotation: QuatT|null = null, - public position: Vec3fT|null = null, - public rawRotVel: Vec3fT|null = null, - public rawTransAccel: Vec3fT|null = null, - public temp: TemperatureT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); - const info = (this.info !== null ? this.info!.pack(builder) : 0); - - TrackerData.startTrackerData(builder); - TrackerData.addTrackerId(builder, trackerId); - TrackerData.addInfo(builder, info); - TrackerData.addStatus(builder, this.status); - TrackerData.addRotation(builder, (this.rotation !== null ? this.rotation!.pack(builder) : 0)); - TrackerData.addPosition(builder, (this.position !== null ? this.position!.pack(builder) : 0)); - TrackerData.addRawRotVel(builder, (this.rawRotVel !== null ? this.rawRotVel!.pack(builder) : 0)); - TrackerData.addRawTransAccel(builder, (this.rawTransAccel !== null ? this.rawTransAccel!.pack(builder) : 0)); - TrackerData.addTemp(builder, (this.temp !== null ? this.temp!.pack(builder) : 0)); - - return TrackerData.endTrackerData(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TrackerInfo, TrackerInfoT } from '../../../solarxr_protocol/data_feed/tracker/tracker-info'; +import { Temperature, TemperatureT } from '../../../solarxr_protocol/datatypes/temperature'; +import { TrackerId, TrackerIdT } from '../../../solarxr_protocol/datatypes/tracker-id'; +import { TrackerStatus } from '../../../solarxr_protocol/datatypes/tracker-status'; +import { Quat, QuatT } from '../../../solarxr_protocol/datatypes/math/quat'; +import { Vec3f, Vec3fT } from '../../../solarxr_protocol/datatypes/math/vec3f'; + + +/** + * Describes all possible information about a tracker. A tracker is anything that + * provides kinematic data about a particular body part. + * + * Trackers may be synthetic/computed or instead part of an actual hardware device. + * There can be multiple trackers per hardware device. + */ +export class TrackerData { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TrackerData { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackerData(bb:flatbuffers.ByteBuffer, obj?:TrackerData):TrackerData { + return (obj || new TrackerData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackerData(bb:flatbuffers.ByteBuffer, obj?:TrackerData):TrackerData { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackerData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +trackerId(obj?:TrackerId):TrackerId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TrackerId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +info(obj?:TrackerInfo):TrackerInfo|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new TrackerInfo()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +status():TrackerStatus { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : TrackerStatus.NONE; +} + +rotation(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Position, in meters + */ +position(obj?:Vec3f):Vec3f|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Raw rotational velocity, in euler angles + */ +rawRotVel(obj?:Vec3f):Vec3f|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Raw translational acceleration, in m/s^2 + */ +rawTransAccel(obj?:Vec3f):Vec3f|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? (obj || new Vec3f()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * Temperature in degrees celsius + */ +temp(obj?:Temperature):Temperature|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? (obj || new Temperature()).__init(this.bb_pos + offset, this.bb!) : null; +} + +static startTrackerData(builder:flatbuffers.Builder) { + builder.startObject(8); +} + +static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerIdOffset, 0); +} + +static addInfo(builder:flatbuffers.Builder, infoOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, infoOffset, 0); +} + +static addStatus(builder:flatbuffers.Builder, status:TrackerStatus) { + builder.addFieldInt8(2, status, TrackerStatus.NONE); +} + +static addRotation(builder:flatbuffers.Builder, rotationOffset:flatbuffers.Offset) { + builder.addFieldStruct(3, rotationOffset, 0); +} + +static addPosition(builder:flatbuffers.Builder, positionOffset:flatbuffers.Offset) { + builder.addFieldStruct(4, positionOffset, 0); +} + +static addRawRotVel(builder:flatbuffers.Builder, rawRotVelOffset:flatbuffers.Offset) { + builder.addFieldStruct(5, rawRotVelOffset, 0); +} + +static addRawTransAccel(builder:flatbuffers.Builder, rawTransAccelOffset:flatbuffers.Offset) { + builder.addFieldStruct(6, rawTransAccelOffset, 0); +} + +static addTemp(builder:flatbuffers.Builder, tempOffset:flatbuffers.Offset) { + builder.addFieldStruct(7, tempOffset, 0); +} + +static endTrackerData(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): TrackerDataT { + return new TrackerDataT( + (this.trackerId() !== null ? this.trackerId()!.unpack() : null), + (this.info() !== null ? this.info()!.unpack() : null), + this.status(), + (this.rotation() !== null ? this.rotation()!.unpack() : null), + (this.position() !== null ? this.position()!.unpack() : null), + (this.rawRotVel() !== null ? this.rawRotVel()!.unpack() : null), + (this.rawTransAccel() !== null ? this.rawTransAccel()!.unpack() : null), + (this.temp() !== null ? this.temp()!.unpack() : null) + ); +} + + +unpackTo(_o: TrackerDataT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); + _o.info = (this.info() !== null ? this.info()!.unpack() : null); + _o.status = this.status(); + _o.rotation = (this.rotation() !== null ? this.rotation()!.unpack() : null); + _o.position = (this.position() !== null ? this.position()!.unpack() : null); + _o.rawRotVel = (this.rawRotVel() !== null ? this.rawRotVel()!.unpack() : null); + _o.rawTransAccel = (this.rawTransAccel() !== null ? this.rawTransAccel()!.unpack() : null); + _o.temp = (this.temp() !== null ? this.temp()!.unpack() : null); +} +} + +export class TrackerDataT { +constructor( + public trackerId: TrackerIdT|null = null, + public info: TrackerInfoT|null = null, + public status: TrackerStatus = TrackerStatus.NONE, + public rotation: QuatT|null = null, + public position: Vec3fT|null = null, + public rawRotVel: Vec3fT|null = null, + public rawTransAccel: Vec3fT|null = null, + public temp: TemperatureT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); + const info = (this.info !== null ? this.info!.pack(builder) : 0); + + TrackerData.startTrackerData(builder); + TrackerData.addTrackerId(builder, trackerId); + TrackerData.addInfo(builder, info); + TrackerData.addStatus(builder, this.status); + TrackerData.addRotation(builder, (this.rotation !== null ? this.rotation!.pack(builder) : 0)); + TrackerData.addPosition(builder, (this.position !== null ? this.position!.pack(builder) : 0)); + TrackerData.addRawRotVel(builder, (this.rawRotVel !== null ? this.rawRotVel!.pack(builder) : 0)); + TrackerData.addRawTransAccel(builder, (this.rawTransAccel !== null ? this.rawTransAccel!.pack(builder) : 0)); + TrackerData.addTemp(builder, (this.temp !== null ? this.temp!.pack(builder) : 0)); + + return TrackerData.endTrackerData(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-info.ts b/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-info.ts similarity index 92% rename from protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-info.ts rename to protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-info.ts index e2ab69f9..ceaf06fc 100644 --- a/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-info.ts +++ b/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-info.ts @@ -1,188 +1,188 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { BodyPart } from '../../../solarxr-protocol/datatypes/body-part'; -import { HzF32, HzF32T } from '../../../solarxr-protocol/datatypes/hz-f32'; -import { ImuType } from '../../../solarxr-protocol/datatypes/hardware-info/imu-type'; -import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat'; - - -/** - * Static description of a tracker - */ -export class TrackerInfo { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):TrackerInfo { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTrackerInfo(bb:flatbuffers.ByteBuffer, obj?:TrackerInfo):TrackerInfo { - return (obj || new TrackerInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTrackerInfo(bb:flatbuffers.ByteBuffer, obj?:TrackerInfo):TrackerInfo { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TrackerInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -imuType():ImuType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : ImuType.Other; -} - -/** - * The user-assigned role of the tracker. - */ -bodyPart():BodyPart { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : BodyPart.NONE; -} - -/** - * average samples per second - */ -pollRate(obj?:HzF32):HzF32|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new HzF32()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * The orientation of the tracker when mounted on the body - */ -mountingOrientation(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -editable():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -computed():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -/** - * A human-friendly name to display as the name of the tracker. - */ -displayName():string|null -displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -displayName(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * name to display as the name of the tracker set by the user - */ -customName():string|null -customName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -customName(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -static startTrackerInfo(builder:flatbuffers.Builder) { - builder.startObject(8); -} - -static addImuType(builder:flatbuffers.Builder, imuType:ImuType) { - builder.addFieldInt16(0, imuType, ImuType.Other); -} - -static addBodyPart(builder:flatbuffers.Builder, bodyPart:BodyPart) { - builder.addFieldInt8(1, bodyPart, BodyPart.NONE); -} - -static addPollRate(builder:flatbuffers.Builder, pollRateOffset:flatbuffers.Offset) { - builder.addFieldStruct(2, pollRateOffset, 0); -} - -static addMountingOrientation(builder:flatbuffers.Builder, mountingOrientationOffset:flatbuffers.Offset) { - builder.addFieldStruct(3, mountingOrientationOffset, 0); -} - -static addEditable(builder:flatbuffers.Builder, editable:boolean) { - builder.addFieldInt8(4, +editable, +false); -} - -static addComputed(builder:flatbuffers.Builder, computed:boolean) { - builder.addFieldInt8(5, +computed, +false); -} - -static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(6, displayNameOffset, 0); -} - -static addCustomName(builder:flatbuffers.Builder, customNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(7, customNameOffset, 0); -} - -static endTrackerInfo(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): TrackerInfoT { - return new TrackerInfoT( - this.imuType(), - this.bodyPart(), - (this.pollRate() !== null ? this.pollRate()!.unpack() : null), - (this.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null), - this.editable(), - this.computed(), - this.displayName(), - this.customName() - ); -} - - -unpackTo(_o: TrackerInfoT): void { - _o.imuType = this.imuType(); - _o.bodyPart = this.bodyPart(); - _o.pollRate = (this.pollRate() !== null ? this.pollRate()!.unpack() : null); - _o.mountingOrientation = (this.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null); - _o.editable = this.editable(); - _o.computed = this.computed(); - _o.displayName = this.displayName(); - _o.customName = this.customName(); -} -} - -export class TrackerInfoT { -constructor( - public imuType: ImuType = ImuType.Other, - public bodyPart: BodyPart = BodyPart.NONE, - public pollRate: HzF32T|null = null, - public mountingOrientation: QuatT|null = null, - public editable: boolean = false, - public computed: boolean = false, - public displayName: string|Uint8Array|null = null, - public customName: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const displayName = (this.displayName !== null ? builder.createString(this.displayName!) : 0); - const customName = (this.customName !== null ? builder.createString(this.customName!) : 0); - - TrackerInfo.startTrackerInfo(builder); - TrackerInfo.addImuType(builder, this.imuType); - TrackerInfo.addBodyPart(builder, this.bodyPart); - TrackerInfo.addPollRate(builder, (this.pollRate !== null ? this.pollRate!.pack(builder) : 0)); - TrackerInfo.addMountingOrientation(builder, (this.mountingOrientation !== null ? this.mountingOrientation!.pack(builder) : 0)); - TrackerInfo.addEditable(builder, this.editable); - TrackerInfo.addComputed(builder, this.computed); - TrackerInfo.addDisplayName(builder, displayName); - TrackerInfo.addCustomName(builder, customName); - - return TrackerInfo.endTrackerInfo(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { BodyPart } from '../../../solarxr_protocol/datatypes/body-part'; +import { HzF32, HzF32T } from '../../../solarxr_protocol/datatypes/hz-f32'; +import { ImuType } from '../../../solarxr_protocol/datatypes/hardware_info/imu-type'; +import { Quat, QuatT } from '../../../solarxr_protocol/datatypes/math/quat'; + + +/** + * Static description of a tracker + */ +export class TrackerInfo { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TrackerInfo { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackerInfo(bb:flatbuffers.ByteBuffer, obj?:TrackerInfo):TrackerInfo { + return (obj || new TrackerInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackerInfo(bb:flatbuffers.ByteBuffer, obj?:TrackerInfo):TrackerInfo { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackerInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +imuType():ImuType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : ImuType.Other; +} + +/** + * The user-assigned role of the tracker. + */ +bodyPart():BodyPart { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : BodyPart.NONE; +} + +/** + * average samples per second + */ +pollRate(obj?:HzF32):HzF32|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new HzF32()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * The orientation of the tracker when mounted on the body + */ +mountingOrientation(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +editable():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +computed():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +/** + * A human-friendly name to display as the name of the tracker. + */ +displayName():string|null +displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +displayName(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * name to display as the name of the tracker set by the user + */ +customName():string|null +customName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +customName(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startTrackerInfo(builder:flatbuffers.Builder) { + builder.startObject(8); +} + +static addImuType(builder:flatbuffers.Builder, imuType:ImuType) { + builder.addFieldInt16(0, imuType, ImuType.Other); +} + +static addBodyPart(builder:flatbuffers.Builder, bodyPart:BodyPart) { + builder.addFieldInt8(1, bodyPart, BodyPart.NONE); +} + +static addPollRate(builder:flatbuffers.Builder, pollRateOffset:flatbuffers.Offset) { + builder.addFieldStruct(2, pollRateOffset, 0); +} + +static addMountingOrientation(builder:flatbuffers.Builder, mountingOrientationOffset:flatbuffers.Offset) { + builder.addFieldStruct(3, mountingOrientationOffset, 0); +} + +static addEditable(builder:flatbuffers.Builder, editable:boolean) { + builder.addFieldInt8(4, +editable, +false); +} + +static addComputed(builder:flatbuffers.Builder, computed:boolean) { + builder.addFieldInt8(5, +computed, +false); +} + +static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(6, displayNameOffset, 0); +} + +static addCustomName(builder:flatbuffers.Builder, customNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(7, customNameOffset, 0); +} + +static endTrackerInfo(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): TrackerInfoT { + return new TrackerInfoT( + this.imuType(), + this.bodyPart(), + (this.pollRate() !== null ? this.pollRate()!.unpack() : null), + (this.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null), + this.editable(), + this.computed(), + this.displayName(), + this.customName() + ); +} + + +unpackTo(_o: TrackerInfoT): void { + _o.imuType = this.imuType(); + _o.bodyPart = this.bodyPart(); + _o.pollRate = (this.pollRate() !== null ? this.pollRate()!.unpack() : null); + _o.mountingOrientation = (this.mountingOrientation() !== null ? this.mountingOrientation()!.unpack() : null); + _o.editable = this.editable(); + _o.computed = this.computed(); + _o.displayName = this.displayName(); + _o.customName = this.customName(); +} +} + +export class TrackerInfoT { +constructor( + public imuType: ImuType = ImuType.Other, + public bodyPart: BodyPart = BodyPart.NONE, + public pollRate: HzF32T|null = null, + public mountingOrientation: QuatT|null = null, + public editable: boolean = false, + public computed: boolean = false, + public displayName: string|Uint8Array|null = null, + public customName: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const displayName = (this.displayName !== null ? builder.createString(this.displayName!) : 0); + const customName = (this.customName !== null ? builder.createString(this.customName!) : 0); + + TrackerInfo.startTrackerInfo(builder); + TrackerInfo.addImuType(builder, this.imuType); + TrackerInfo.addBodyPart(builder, this.bodyPart); + TrackerInfo.addPollRate(builder, (this.pollRate !== null ? this.pollRate!.pack(builder) : 0)); + TrackerInfo.addMountingOrientation(builder, (this.mountingOrientation !== null ? this.mountingOrientation!.pack(builder) : 0)); + TrackerInfo.addEditable(builder, this.editable); + TrackerInfo.addComputed(builder, this.computed); + TrackerInfo.addDisplayName(builder, displayName); + TrackerInfo.addCustomName(builder, customName); + + return TrackerInfo.endTrackerInfo(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/body-part.ts b/protocol/typescript/src/solarxr_protocol/datatypes/body-part.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/datatypes/body-part.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/body-part.ts index ce97f8b1..b1bd12fa 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/body-part.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/body-part.ts @@ -1,31 +1,31 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -/** - * Different parts of the body. Roughly maps to each possible bone in the skeleton. - * These are *NOT* the trackers. - */ -export enum BodyPart{ - NONE = 0, - HEAD = 1, - NECK = 2, - CHEST = 3, - WAIST = 4, - HIP = 5, - LEFT_UPPER_LEG = 6, - RIGHT_UPPER_LEG = 7, - LEFT_LOWER_LEG = 8, - RIGHT_LOWER_LEG = 9, - LEFT_FOOT = 10, - RIGHT_FOOT = 11, - LEFT_CONTROLLER = 12, - RIGHT_CONTROLLER = 13, - LEFT_LOWER_ARM = 14, - RIGHT_LOWER_ARM = 15, - LEFT_UPPER_ARM = 16, - RIGHT_UPPER_ARM = 17, - LEFT_HAND = 18, - RIGHT_HAND = 19, - LEFT_SHOULDER = 20, - RIGHT_SHOULDER = 21 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +/** + * Different parts of the body. Roughly maps to each possible bone in the skeleton. + * These are *NOT* the trackers. + */ +export enum BodyPart{ + NONE = 0, + HEAD = 1, + NECK = 2, + CHEST = 3, + WAIST = 4, + HIP = 5, + LEFT_UPPER_LEG = 6, + RIGHT_UPPER_LEG = 7, + LEFT_LOWER_LEG = 8, + RIGHT_LOWER_LEG = 9, + LEFT_FOOT = 10, + RIGHT_FOOT = 11, + LEFT_CONTROLLER = 12, + RIGHT_CONTROLLER = 13, + LEFT_LOWER_ARM = 14, + RIGHT_LOWER_ARM = 15, + LEFT_UPPER_ARM = 16, + RIGHT_UPPER_ARM = 17, + LEFT_HAND = 18, + RIGHT_HAND = 19, + LEFT_SHOULDER = 20, + RIGHT_SHOULDER = 21 +} + diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/bytes.ts b/protocol/typescript/src/solarxr_protocol/datatypes/bytes.ts new file mode 100644 index 00000000..c56c30da --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/datatypes/bytes.ts @@ -0,0 +1,96 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class Bytes { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Bytes { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsBytes(bb:flatbuffers.ByteBuffer, obj?:Bytes):Bytes { + return (obj || new Bytes()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsBytes(bb:flatbuffers.ByteBuffer, obj?:Bytes):Bytes { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new Bytes()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +b(index: number):number|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; +} + +bLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +bArray():Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; +} + +static startBytes(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addB(builder:flatbuffers.Builder, bOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, bOffset, 0); +} + +static createBVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { + builder.startVector(1, data.length, 1); + for (let i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]!); + } + return builder.endVector(); +} + +static startBVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(1, numElems, 1); +} + +static endBytes(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createBytes(builder:flatbuffers.Builder, bOffset:flatbuffers.Offset):flatbuffers.Offset { + Bytes.startBytes(builder); + Bytes.addB(builder, bOffset); + return Bytes.endBytes(builder); +} + +unpack(): BytesT { + return new BytesT( + this.bb!.createScalarList(this.b.bind(this), this.bLength()) + ); +} + + +unpackTo(_o: BytesT): void { + _o.b = this.bb!.createScalarList(this.b.bind(this), this.bLength()); +} +} + +export class BytesT { +constructor( + public b: (number)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const b = Bytes.createBVector(builder, this.b); + + return Bytes.createBytes(builder, + b + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts b/protocol/typescript/src/solarxr_protocol/datatypes/device-id.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/device-id.ts index d67f4b0c..ffb75199 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/device-id.ts @@ -1,58 +1,58 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * A unique ID for the device. IDs are not guaranteed to be the same after - * the connection is terminated. - */ -export class DeviceId { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):DeviceId { - this.bb_pos = i; - this.bb = bb; - return this; -} - -id():number { - return this.bb!.readUint8(this.bb_pos); -} - -static sizeOf():number { - return 1; -} - -static createDeviceId(builder:flatbuffers.Builder, id: number):flatbuffers.Offset { - builder.prep(1, 1); - builder.writeInt8(id); - return builder.offset(); -} - - -unpack(): DeviceIdT { - return new DeviceIdT( - this.id() - ); -} - - -unpackTo(_o: DeviceIdT): void { - _o.id = this.id(); -} -} - -export class DeviceIdT { -constructor( - public id: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return DeviceId.createDeviceId(builder, - this.id - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * A unique ID for the device. IDs are not guaranteed to be the same after + * the connection is terminated. + */ +export class DeviceId { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):DeviceId { + this.bb_pos = i; + this.bb = bb; + return this; +} + +id():number { + return this.bb!.readUint8(this.bb_pos); +} + +static sizeOf():number { + return 1; +} + +static createDeviceId(builder:flatbuffers.Builder, id: number):flatbuffers.Offset { + builder.prep(1, 1); + builder.writeInt8(id); + return builder.offset(); +} + + +unpack(): DeviceIdT { + return new DeviceIdT( + this.id() + ); +} + + +unpackTo(_o: DeviceIdT): void { + _o.id = this.id(); +} +} + +export class DeviceIdT { +constructor( + public id: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return DeviceId.createDeviceId(builder, + this.id + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts b/protocol/typescript/src/solarxr_protocol/datatypes/filtering-type.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/filtering-type.ts index 41f82f67..0067b480 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/filtering-type.ts @@ -1,11 +1,11 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -/** - * Used for filtering tracker rotations in software - */ -export enum FilteringType{ - NONE = 0, - SMOOTHING = 1, - PREDICTION = 2 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +/** + * Used for filtering tracker rotations in software + */ +export enum FilteringType{ + NONE = 0, + SMOOTHING = 1, + PREDICTION = 2 +} + diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts b/protocol/typescript/src/solarxr_protocol/datatypes/firmware-error-code.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/firmware-error-code.ts index be29c6f7..94e3372f 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/firmware-error-code.ts @@ -1,12 +1,12 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -/** - * A list of error codes for error conditions on the device - */ -export enum FirmwareErrorCode{ - Other = 0, - Disconnected = 1, - Occluded = 2, - ImuError = 3 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +/** + * A list of error codes for error conditions on the device + */ +export enum FirmwareErrorCode{ + Other = 0, + Disconnected = 1, + Occluded = 2, + ImuError = 3 +} + diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/firmware-status-mask.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/firmware-status-mask.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/firmware-status-mask.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/firmware-status-mask.ts index 9c0adf1f..8ec3e242 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/firmware-status-mask.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/firmware-status-mask.ts @@ -1,159 +1,159 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * A mask of the data in `FirmwareStatus` - */ -export class FirmwareStatusMask { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):FirmwareStatusMask { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsFirmwareStatusMask(bb:flatbuffers.ByteBuffer, obj?:FirmwareStatusMask):FirmwareStatusMask { - return (obj || new FirmwareStatusMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsFirmwareStatusMask(bb:flatbuffers.ByteBuffer, obj?:FirmwareStatusMask):FirmwareStatusMask { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new FirmwareStatusMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -errorStatus():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -tps():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -ping():boolean { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -rssi():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -mcuTemp():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -batteryVoltage():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -batteryPctEstimate():boolean { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startFirmwareStatusMask(builder:flatbuffers.Builder) { - builder.startObject(7); -} - -static addErrorStatus(builder:flatbuffers.Builder, errorStatus:boolean) { - builder.addFieldInt8(0, +errorStatus, +false); -} - -static addTps(builder:flatbuffers.Builder, tps:boolean) { - builder.addFieldInt8(1, +tps, +false); -} - -static addPing(builder:flatbuffers.Builder, ping:boolean) { - builder.addFieldInt8(2, +ping, +false); -} - -static addRssi(builder:flatbuffers.Builder, rssi:boolean) { - builder.addFieldInt8(3, +rssi, +false); -} - -static addMcuTemp(builder:flatbuffers.Builder, mcuTemp:boolean) { - builder.addFieldInt8(4, +mcuTemp, +false); -} - -static addBatteryVoltage(builder:flatbuffers.Builder, batteryVoltage:boolean) { - builder.addFieldInt8(5, +batteryVoltage, +false); -} - -static addBatteryPctEstimate(builder:flatbuffers.Builder, batteryPctEstimate:boolean) { - builder.addFieldInt8(6, +batteryPctEstimate, +false); -} - -static endFirmwareStatusMask(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createFirmwareStatusMask(builder:flatbuffers.Builder, errorStatus:boolean, tps:boolean, ping:boolean, rssi:boolean, mcuTemp:boolean, batteryVoltage:boolean, batteryPctEstimate:boolean):flatbuffers.Offset { - FirmwareStatusMask.startFirmwareStatusMask(builder); - FirmwareStatusMask.addErrorStatus(builder, errorStatus); - FirmwareStatusMask.addTps(builder, tps); - FirmwareStatusMask.addPing(builder, ping); - FirmwareStatusMask.addRssi(builder, rssi); - FirmwareStatusMask.addMcuTemp(builder, mcuTemp); - FirmwareStatusMask.addBatteryVoltage(builder, batteryVoltage); - FirmwareStatusMask.addBatteryPctEstimate(builder, batteryPctEstimate); - return FirmwareStatusMask.endFirmwareStatusMask(builder); -} - -unpack(): FirmwareStatusMaskT { - return new FirmwareStatusMaskT( - this.errorStatus(), - this.tps(), - this.ping(), - this.rssi(), - this.mcuTemp(), - this.batteryVoltage(), - this.batteryPctEstimate() - ); -} - - -unpackTo(_o: FirmwareStatusMaskT): void { - _o.errorStatus = this.errorStatus(); - _o.tps = this.tps(); - _o.ping = this.ping(); - _o.rssi = this.rssi(); - _o.mcuTemp = this.mcuTemp(); - _o.batteryVoltage = this.batteryVoltage(); - _o.batteryPctEstimate = this.batteryPctEstimate(); -} -} - -export class FirmwareStatusMaskT { -constructor( - public errorStatus: boolean = false, - public tps: boolean = false, - public ping: boolean = false, - public rssi: boolean = false, - public mcuTemp: boolean = false, - public batteryVoltage: boolean = false, - public batteryPctEstimate: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return FirmwareStatusMask.createFirmwareStatusMask(builder, - this.errorStatus, - this.tps, - this.ping, - this.rssi, - this.mcuTemp, - this.batteryVoltage, - this.batteryPctEstimate - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * A mask of the data in `FirmwareStatus` + */ +export class FirmwareStatusMask { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):FirmwareStatusMask { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsFirmwareStatusMask(bb:flatbuffers.ByteBuffer, obj?:FirmwareStatusMask):FirmwareStatusMask { + return (obj || new FirmwareStatusMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsFirmwareStatusMask(bb:flatbuffers.ByteBuffer, obj?:FirmwareStatusMask):FirmwareStatusMask { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new FirmwareStatusMask()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +errorStatus():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +tps():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +ping():boolean { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +rssi():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +mcuTemp():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +batteryVoltage():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +batteryPctEstimate():boolean { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startFirmwareStatusMask(builder:flatbuffers.Builder) { + builder.startObject(7); +} + +static addErrorStatus(builder:flatbuffers.Builder, errorStatus:boolean) { + builder.addFieldInt8(0, +errorStatus, +false); +} + +static addTps(builder:flatbuffers.Builder, tps:boolean) { + builder.addFieldInt8(1, +tps, +false); +} + +static addPing(builder:flatbuffers.Builder, ping:boolean) { + builder.addFieldInt8(2, +ping, +false); +} + +static addRssi(builder:flatbuffers.Builder, rssi:boolean) { + builder.addFieldInt8(3, +rssi, +false); +} + +static addMcuTemp(builder:flatbuffers.Builder, mcuTemp:boolean) { + builder.addFieldInt8(4, +mcuTemp, +false); +} + +static addBatteryVoltage(builder:flatbuffers.Builder, batteryVoltage:boolean) { + builder.addFieldInt8(5, +batteryVoltage, +false); +} + +static addBatteryPctEstimate(builder:flatbuffers.Builder, batteryPctEstimate:boolean) { + builder.addFieldInt8(6, +batteryPctEstimate, +false); +} + +static endFirmwareStatusMask(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createFirmwareStatusMask(builder:flatbuffers.Builder, errorStatus:boolean, tps:boolean, ping:boolean, rssi:boolean, mcuTemp:boolean, batteryVoltage:boolean, batteryPctEstimate:boolean):flatbuffers.Offset { + FirmwareStatusMask.startFirmwareStatusMask(builder); + FirmwareStatusMask.addErrorStatus(builder, errorStatus); + FirmwareStatusMask.addTps(builder, tps); + FirmwareStatusMask.addPing(builder, ping); + FirmwareStatusMask.addRssi(builder, rssi); + FirmwareStatusMask.addMcuTemp(builder, mcuTemp); + FirmwareStatusMask.addBatteryVoltage(builder, batteryVoltage); + FirmwareStatusMask.addBatteryPctEstimate(builder, batteryPctEstimate); + return FirmwareStatusMask.endFirmwareStatusMask(builder); +} + +unpack(): FirmwareStatusMaskT { + return new FirmwareStatusMaskT( + this.errorStatus(), + this.tps(), + this.ping(), + this.rssi(), + this.mcuTemp(), + this.batteryVoltage(), + this.batteryPctEstimate() + ); +} + + +unpackTo(_o: FirmwareStatusMaskT): void { + _o.errorStatus = this.errorStatus(); + _o.tps = this.tps(); + _o.ping = this.ping(); + _o.rssi = this.rssi(); + _o.mcuTemp = this.mcuTemp(); + _o.batteryVoltage = this.batteryVoltage(); + _o.batteryPctEstimate = this.batteryPctEstimate(); +} +} + +export class FirmwareStatusMaskT { +constructor( + public errorStatus: boolean = false, + public tps: boolean = false, + public ping: boolean = false, + public rssi: boolean = false, + public mcuTemp: boolean = false, + public batteryVoltage: boolean = false, + public batteryPctEstimate: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return FirmwareStatusMask.createFirmwareStatusMask(builder, + this.errorStatus, + this.tps, + this.ping, + this.rssi, + this.mcuTemp, + this.batteryVoltage, + this.batteryPctEstimate + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-address.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-address.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-address.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-address.ts index ee770bc4..ed738cc2 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-address.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-address.ts @@ -1,59 +1,59 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * A MAC address or a bluetooth address, or some other uniquely identifying address - * associated with the endpoint that we are communicating with. If it doesn't take - * up the full set of bytes, it is aligned towards the least significant bits. - */ -export class HardwareAddress { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):HardwareAddress { - this.bb_pos = i; - this.bb = bb; - return this; -} - -addr():bigint { - return this.bb!.readUint64(this.bb_pos); -} - -static sizeOf():number { - return 8; -} - -static createHardwareAddress(builder:flatbuffers.Builder, addr: bigint):flatbuffers.Offset { - builder.prep(8, 8); - builder.writeInt64(addr); - return builder.offset(); -} - - -unpack(): HardwareAddressT { - return new HardwareAddressT( - this.addr() - ); -} - - -unpackTo(_o: HardwareAddressT): void { - _o.addr = this.addr(); -} -} - -export class HardwareAddressT { -constructor( - public addr: bigint = BigInt('0') -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return HardwareAddress.createHardwareAddress(builder, - this.addr - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * A MAC address or a bluetooth address, or some other uniquely identifying address + * associated with the endpoint that we are communicating with. If it doesn't take + * up the full set of bytes, it is aligned towards the least significant bits. + */ +export class HardwareAddress { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):HardwareAddress { + this.bb_pos = i; + this.bb = bb; + return this; +} + +addr():bigint { + return this.bb!.readUint64(this.bb_pos); +} + +static sizeOf():number { + return 8; +} + +static createHardwareAddress(builder:flatbuffers.Builder, addr: bigint):flatbuffers.Offset { + builder.prep(8, 8); + builder.writeInt64(addr); + return builder.offset(); +} + + +unpack(): HardwareAddressT { + return new HardwareAddressT( + this.addr() + ); +} + + +unpackTo(_o: HardwareAddressT): void { + _o.addr = this.addr(); +} +} + +export class HardwareAddressT { +constructor( + public addr: bigint = BigInt('0') +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HardwareAddress.createHardwareAddress(builder, + this.addr + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-info.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-info.ts index 435986dd..834ce4e0 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-info.ts @@ -1,196 +1,196 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { Ipv4Address, Ipv4AddressT } from '../../../solarxr-protocol/datatypes/ipv4address'; -import { HardwareAddress, HardwareAddressT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-address'; -import { McuType } from '../../../solarxr-protocol/datatypes/hardware-info/mcu-type'; - - -/** - * Mostly static info about the device's hardware/firmware. - */ -export class HardwareInfo { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):HardwareInfo { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsHardwareInfo(bb:flatbuffers.ByteBuffer, obj?:HardwareInfo):HardwareInfo { - return (obj || new HardwareInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsHardwareInfo(bb:flatbuffers.ByteBuffer, obj?:HardwareInfo):HardwareInfo { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new HardwareInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -mcuId():McuType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : McuType.Other; -} - -/** - * A human-friendly name to display as the name of the device. - */ -displayName():string|null -displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -displayName(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; -} - -/** - * A human-friendly string for the device model. - */ -model():string|null -model(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -model(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * A human-friendly string for the manufacturer of the device. - */ -manufacturer():string|null -manufacturer(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -manufacturer(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * The hardware version of the device. For example, pcb version. - */ -hardwareRevision():string|null -hardwareRevision(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -hardwareRevision(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -/** - * The version of the slimevr firmware that the device is running. - */ -firmwareVersion():string|null -firmwareVersion(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -firmwareVersion(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -hardwareAddress(obj?:HardwareAddress):HardwareAddress|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? (obj || new HardwareAddress()).__init(this.bb_pos + offset, this.bb!) : null; -} - -ipAddress(obj?:Ipv4Address):Ipv4Address|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? (obj || new Ipv4Address()).__init(this.bb_pos + offset, this.bb!) : null; -} - -static startHardwareInfo(builder:flatbuffers.Builder) { - builder.startObject(8); -} - -static addMcuId(builder:flatbuffers.Builder, mcuId:McuType) { - builder.addFieldInt16(0, mcuId, McuType.Other); -} - -static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, displayNameOffset, 0); -} - -static addModel(builder:flatbuffers.Builder, modelOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, modelOffset, 0); -} - -static addManufacturer(builder:flatbuffers.Builder, manufacturerOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, manufacturerOffset, 0); -} - -static addHardwareRevision(builder:flatbuffers.Builder, hardwareRevisionOffset:flatbuffers.Offset) { - builder.addFieldOffset(4, hardwareRevisionOffset, 0); -} - -static addFirmwareVersion(builder:flatbuffers.Builder, firmwareVersionOffset:flatbuffers.Offset) { - builder.addFieldOffset(5, firmwareVersionOffset, 0); -} - -static addHardwareAddress(builder:flatbuffers.Builder, hardwareAddressOffset:flatbuffers.Offset) { - builder.addFieldStruct(6, hardwareAddressOffset, 0); -} - -static addIpAddress(builder:flatbuffers.Builder, ipAddressOffset:flatbuffers.Offset) { - builder.addFieldStruct(7, ipAddressOffset, 0); -} - -static endHardwareInfo(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): HardwareInfoT { - return new HardwareInfoT( - this.mcuId(), - this.displayName(), - this.model(), - this.manufacturer(), - this.hardwareRevision(), - this.firmwareVersion(), - (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null), - (this.ipAddress() !== null ? this.ipAddress()!.unpack() : null) - ); -} - - -unpackTo(_o: HardwareInfoT): void { - _o.mcuId = this.mcuId(); - _o.displayName = this.displayName(); - _o.model = this.model(); - _o.manufacturer = this.manufacturer(); - _o.hardwareRevision = this.hardwareRevision(); - _o.firmwareVersion = this.firmwareVersion(); - _o.hardwareAddress = (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null); - _o.ipAddress = (this.ipAddress() !== null ? this.ipAddress()!.unpack() : null); -} -} - -export class HardwareInfoT { -constructor( - public mcuId: McuType = McuType.Other, - public displayName: string|Uint8Array|null = null, - public model: string|Uint8Array|null = null, - public manufacturer: string|Uint8Array|null = null, - public hardwareRevision: string|Uint8Array|null = null, - public firmwareVersion: string|Uint8Array|null = null, - public hardwareAddress: HardwareAddressT|null = null, - public ipAddress: Ipv4AddressT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const displayName = (this.displayName !== null ? builder.createString(this.displayName!) : 0); - const model = (this.model !== null ? builder.createString(this.model!) : 0); - const manufacturer = (this.manufacturer !== null ? builder.createString(this.manufacturer!) : 0); - const hardwareRevision = (this.hardwareRevision !== null ? builder.createString(this.hardwareRevision!) : 0); - const firmwareVersion = (this.firmwareVersion !== null ? builder.createString(this.firmwareVersion!) : 0); - - HardwareInfo.startHardwareInfo(builder); - HardwareInfo.addMcuId(builder, this.mcuId); - HardwareInfo.addDisplayName(builder, displayName); - HardwareInfo.addModel(builder, model); - HardwareInfo.addManufacturer(builder, manufacturer); - HardwareInfo.addHardwareRevision(builder, hardwareRevision); - HardwareInfo.addFirmwareVersion(builder, firmwareVersion); - HardwareInfo.addHardwareAddress(builder, (this.hardwareAddress !== null ? this.hardwareAddress!.pack(builder) : 0)); - HardwareInfo.addIpAddress(builder, (this.ipAddress !== null ? this.ipAddress!.pack(builder) : 0)); - - return HardwareInfo.endHardwareInfo(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Ipv4Address, Ipv4AddressT } from '../../../solarxr_protocol/datatypes/ipv4-address'; +import { HardwareAddress, HardwareAddressT } from '../../../solarxr_protocol/datatypes/hardware_info/hardware-address'; +import { McuType } from '../../../solarxr_protocol/datatypes/hardware_info/mcu-type'; + + +/** + * Mostly static info about the device's hardware/firmware. + */ +export class HardwareInfo { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):HardwareInfo { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsHardwareInfo(bb:flatbuffers.ByteBuffer, obj?:HardwareInfo):HardwareInfo { + return (obj || new HardwareInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsHardwareInfo(bb:flatbuffers.ByteBuffer, obj?:HardwareInfo):HardwareInfo { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new HardwareInfo()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +mcuId():McuType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : McuType.Other; +} + +/** + * A human-friendly name to display as the name of the device. + */ +displayName():string|null +displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +displayName(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; +} + +/** + * A human-friendly string for the device model. + */ +model():string|null +model(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +model(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * A human-friendly string for the manufacturer of the device. + */ +manufacturer():string|null +manufacturer(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +manufacturer(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * The hardware version of the device. For example, pcb version. + */ +hardwareRevision():string|null +hardwareRevision(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +hardwareRevision(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +/** + * The version of the slimevr firmware that the device is running. + */ +firmwareVersion():string|null +firmwareVersion(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +firmwareVersion(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +hardwareAddress(obj?:HardwareAddress):HardwareAddress|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? (obj || new HardwareAddress()).__init(this.bb_pos + offset, this.bb!) : null; +} + +ipAddress(obj?:Ipv4Address):Ipv4Address|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? (obj || new Ipv4Address()).__init(this.bb_pos + offset, this.bb!) : null; +} + +static startHardwareInfo(builder:flatbuffers.Builder) { + builder.startObject(8); +} + +static addMcuId(builder:flatbuffers.Builder, mcuId:McuType) { + builder.addFieldInt16(0, mcuId, McuType.Other); +} + +static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, displayNameOffset, 0); +} + +static addModel(builder:flatbuffers.Builder, modelOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, modelOffset, 0); +} + +static addManufacturer(builder:flatbuffers.Builder, manufacturerOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, manufacturerOffset, 0); +} + +static addHardwareRevision(builder:flatbuffers.Builder, hardwareRevisionOffset:flatbuffers.Offset) { + builder.addFieldOffset(4, hardwareRevisionOffset, 0); +} + +static addFirmwareVersion(builder:flatbuffers.Builder, firmwareVersionOffset:flatbuffers.Offset) { + builder.addFieldOffset(5, firmwareVersionOffset, 0); +} + +static addHardwareAddress(builder:flatbuffers.Builder, hardwareAddressOffset:flatbuffers.Offset) { + builder.addFieldStruct(6, hardwareAddressOffset, 0); +} + +static addIpAddress(builder:flatbuffers.Builder, ipAddressOffset:flatbuffers.Offset) { + builder.addFieldStruct(7, ipAddressOffset, 0); +} + +static endHardwareInfo(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): HardwareInfoT { + return new HardwareInfoT( + this.mcuId(), + this.displayName(), + this.model(), + this.manufacturer(), + this.hardwareRevision(), + this.firmwareVersion(), + (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null), + (this.ipAddress() !== null ? this.ipAddress()!.unpack() : null) + ); +} + + +unpackTo(_o: HardwareInfoT): void { + _o.mcuId = this.mcuId(); + _o.displayName = this.displayName(); + _o.model = this.model(); + _o.manufacturer = this.manufacturer(); + _o.hardwareRevision = this.hardwareRevision(); + _o.firmwareVersion = this.firmwareVersion(); + _o.hardwareAddress = (this.hardwareAddress() !== null ? this.hardwareAddress()!.unpack() : null); + _o.ipAddress = (this.ipAddress() !== null ? this.ipAddress()!.unpack() : null); +} +} + +export class HardwareInfoT { +constructor( + public mcuId: McuType = McuType.Other, + public displayName: string|Uint8Array|null = null, + public model: string|Uint8Array|null = null, + public manufacturer: string|Uint8Array|null = null, + public hardwareRevision: string|Uint8Array|null = null, + public firmwareVersion: string|Uint8Array|null = null, + public hardwareAddress: HardwareAddressT|null = null, + public ipAddress: Ipv4AddressT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const displayName = (this.displayName !== null ? builder.createString(this.displayName!) : 0); + const model = (this.model !== null ? builder.createString(this.model!) : 0); + const manufacturer = (this.manufacturer !== null ? builder.createString(this.manufacturer!) : 0); + const hardwareRevision = (this.hardwareRevision !== null ? builder.createString(this.hardwareRevision!) : 0); + const firmwareVersion = (this.firmwareVersion !== null ? builder.createString(this.firmwareVersion!) : 0); + + HardwareInfo.startHardwareInfo(builder); + HardwareInfo.addMcuId(builder, this.mcuId); + HardwareInfo.addDisplayName(builder, displayName); + HardwareInfo.addModel(builder, model); + HardwareInfo.addManufacturer(builder, manufacturer); + HardwareInfo.addHardwareRevision(builder, hardwareRevision); + HardwareInfo.addFirmwareVersion(builder, firmwareVersion); + HardwareInfo.addHardwareAddress(builder, (this.hardwareAddress !== null ? this.hardwareAddress!.pack(builder) : 0)); + HardwareInfo.addIpAddress(builder, (this.ipAddress !== null ? this.ipAddress!.pack(builder) : 0)); + + return HardwareInfo.endHardwareInfo(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-status.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-status.ts similarity index 83% rename from protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-status.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-status.ts index f62e9c97..c4de7733 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-status.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-status.ts @@ -1,179 +1,172 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { FirmwareErrorCode } from '../../../solarxr-protocol/datatypes/firmware-error-code'; -import { LogData, LogDataT } from '../../../solarxr-protocol/datatypes/log-data'; - - -/** - * Mostly-dynamic status info about a tracked device's firmware - */ -export class HardwareStatus { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):HardwareStatus { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsHardwareStatus(bb:flatbuffers.ByteBuffer, obj?:HardwareStatus):HardwareStatus { - return (obj || new HardwareStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsHardwareStatus(bb:flatbuffers.ByteBuffer, obj?:HardwareStatus):HardwareStatus { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new HardwareStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -errorStatus():FirmwareErrorCode|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -tps():number|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -ping():number|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; -} - -/** - * “Received Signal Strength Indicator" between device and wifi adapter in dBm - */ -rssi():number|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readInt16(this.bb_pos + offset) : null; -} - -/** - * Temperature in degrees celsius - */ -mcuTemp():number|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -batteryVoltage():number|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -batteryPctEstimate():number|null { - const offset = this.bb!.__offset(this.bb_pos, 16); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; -} - -logData(obj?:LogData):LogData|null { - const offset = this.bb!.__offset(this.bb_pos, 18); - return offset ? (obj || new LogData()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startHardwareStatus(builder:flatbuffers.Builder) { - builder.startObject(8); -} - -static addErrorStatus(builder:flatbuffers.Builder, errorStatus:FirmwareErrorCode) { - builder.addFieldInt8(0, errorStatus, 0); -} - -static addTps(builder:flatbuffers.Builder, tps:number) { - builder.addFieldInt8(1, tps, 0); -} - -static addPing(builder:flatbuffers.Builder, ping:number) { - builder.addFieldInt16(2, ping, 0); -} - -static addRssi(builder:flatbuffers.Builder, rssi:number) { - builder.addFieldInt16(3, rssi, 0); -} - -static addMcuTemp(builder:flatbuffers.Builder, mcuTemp:number) { - builder.addFieldFloat32(4, mcuTemp, 0); -} - -static addBatteryVoltage(builder:flatbuffers.Builder, batteryVoltage:number) { - builder.addFieldFloat32(5, batteryVoltage, 0); -} - -static addBatteryPctEstimate(builder:flatbuffers.Builder, batteryPctEstimate:number) { - builder.addFieldInt8(6, batteryPctEstimate, 0); -} - -static addLogData(builder:flatbuffers.Builder, logDataOffset:flatbuffers.Offset) { - builder.addFieldOffset(7, logDataOffset, 0); -} - -static endHardwareStatus(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): HardwareStatusT { - return new HardwareStatusT( - this.errorStatus(), - this.tps(), - this.ping(), - this.rssi(), - this.mcuTemp(), - this.batteryVoltage(), - this.batteryPctEstimate(), - (this.logData() !== null ? this.logData()!.unpack() : null) - ); -} - - -unpackTo(_o: HardwareStatusT): void { - _o.errorStatus = this.errorStatus(); - _o.tps = this.tps(); - _o.ping = this.ping(); - _o.rssi = this.rssi(); - _o.mcuTemp = this.mcuTemp(); - _o.batteryVoltage = this.batteryVoltage(); - _o.batteryPctEstimate = this.batteryPctEstimate(); - _o.logData = (this.logData() !== null ? this.logData()!.unpack() : null); -} -} - -export class HardwareStatusT { -constructor( - public errorStatus: FirmwareErrorCode|null = null, - public tps: number|null = null, - public ping: number|null = null, - public rssi: number|null = null, - public mcuTemp: number|null = null, - public batteryVoltage: number|null = null, - public batteryPctEstimate: number|null = null, - public logData: LogDataT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const logData = (this.logData !== null ? this.logData!.pack(builder) : 0); - - HardwareStatus.startHardwareStatus(builder); - if (this.errorStatus !== null) - HardwareStatus.addErrorStatus(builder, this.errorStatus); - if (this.tps !== null) - HardwareStatus.addTps(builder, this.tps); - if (this.ping !== null) - HardwareStatus.addPing(builder, this.ping); - if (this.rssi !== null) - HardwareStatus.addRssi(builder, this.rssi); - if (this.mcuTemp !== null) - HardwareStatus.addMcuTemp(builder, this.mcuTemp); - if (this.batteryVoltage !== null) - HardwareStatus.addBatteryVoltage(builder, this.batteryVoltage); - if (this.batteryPctEstimate !== null) - HardwareStatus.addBatteryPctEstimate(builder, this.batteryPctEstimate); - HardwareStatus.addLogData(builder, logData); - - return HardwareStatus.endHardwareStatus(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { FirmwareErrorCode } from '../../../solarxr_protocol/datatypes/firmware-error-code'; +import { LogData, LogDataT } from '../../../solarxr_protocol/datatypes/log-data'; + + +/** + * Mostly-dynamic status info about a tracked device's firmware + */ +export class HardwareStatus { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):HardwareStatus { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsHardwareStatus(bb:flatbuffers.ByteBuffer, obj?:HardwareStatus):HardwareStatus { + return (obj || new HardwareStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsHardwareStatus(bb:flatbuffers.ByteBuffer, obj?:HardwareStatus):HardwareStatus { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new HardwareStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +errorStatus():FirmwareErrorCode|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +tps():number|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +ping():number|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : null; +} + +/** + * “Received Signal Strength Indicator" between device and wifi adapter in dBm + */ +rssi():number|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readInt16(this.bb_pos + offset) : null; +} + +/** + * Temperature in degrees celsius + */ +mcuTemp():number|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +batteryVoltage():number|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +batteryPctEstimate():number|null { + const offset = this.bb!.__offset(this.bb_pos, 16); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : null; +} + +logData(obj?:LogData):LogData|null { + const offset = this.bb!.__offset(this.bb_pos, 18); + return offset ? (obj || new LogData()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startHardwareStatus(builder:flatbuffers.Builder) { + builder.startObject(8); +} + +static addErrorStatus(builder:flatbuffers.Builder, errorStatus:FirmwareErrorCode) { + builder.addFieldInt8(0, errorStatus, 0); +} + +static addTps(builder:flatbuffers.Builder, tps:number) { + builder.addFieldInt8(1, tps, 0); +} + +static addPing(builder:flatbuffers.Builder, ping:number) { + builder.addFieldInt16(2, ping, 0); +} + +static addRssi(builder:flatbuffers.Builder, rssi:number) { + builder.addFieldInt16(3, rssi, 0); +} + +static addMcuTemp(builder:flatbuffers.Builder, mcuTemp:number) { + builder.addFieldFloat32(4, mcuTemp, 0); +} + +static addBatteryVoltage(builder:flatbuffers.Builder, batteryVoltage:number) { + builder.addFieldFloat32(5, batteryVoltage, 0); +} + +static addBatteryPctEstimate(builder:flatbuffers.Builder, batteryPctEstimate:number) { + builder.addFieldInt8(6, batteryPctEstimate, 0); +} + +static addLogData(builder:flatbuffers.Builder, logDataOffset:flatbuffers.Offset) { + builder.addFieldOffset(7, logDataOffset, 0); +} + +static endHardwareStatus(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): HardwareStatusT { + return new HardwareStatusT( + this.errorStatus(), + this.tps(), + this.ping(), + this.rssi(), + this.mcuTemp(), + this.batteryVoltage(), + this.batteryPctEstimate(), + (this.logData() !== null ? this.logData()!.unpack() : null) + ); +} + + +unpackTo(_o: HardwareStatusT): void { + _o.errorStatus = this.errorStatus(); + _o.tps = this.tps(); + _o.ping = this.ping(); + _o.rssi = this.rssi(); + _o.mcuTemp = this.mcuTemp(); + _o.batteryVoltage = this.batteryVoltage(); + _o.batteryPctEstimate = this.batteryPctEstimate(); + _o.logData = (this.logData() !== null ? this.logData()!.unpack() : null); +} +} + +export class HardwareStatusT { +constructor( + public errorStatus: FirmwareErrorCode|null = null, + public tps: number|null = null, + public ping: number|null = null, + public rssi: number|null = null, + public mcuTemp: number|null = null, + public batteryVoltage: number|null = null, + public batteryPctEstimate: number|null = null, + public logData: LogDataT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const logData = (this.logData !== null ? this.logData!.pack(builder) : 0); + + HardwareStatus.startHardwareStatus(builder); + HardwareStatus.addErrorStatus(builder, this.errorStatus); + HardwareStatus.addTps(builder, this.tps); + HardwareStatus.addPing(builder, this.ping); + HardwareStatus.addRssi(builder, this.rssi); + HardwareStatus.addMcuTemp(builder, this.mcuTemp); + HardwareStatus.addBatteryVoltage(builder, this.batteryVoltage); + HardwareStatus.addBatteryPctEstimate(builder, this.batteryPctEstimate); + HardwareStatus.addLogData(builder, logData); + + return HardwareStatus.endHardwareStatus(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/imu-type.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/imu-type.ts index 2b8c5f93..50857f07 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/imu-type.ts @@ -1,11 +1,11 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ImuType{ - Other = 0, - BNO085 = 1, - BNO080 = 2, - MPU6050 = 3, - MPU9250 = 4, - MPU6500 = 5 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +export enum ImuType{ + Other = 0, + BNO085 = 1, + BNO080 = 2, + MPU6050 = 3, + MPU9250 = 4, + MPU6500 = 5 +} + diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/mcu-type.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/mcu-type.ts index a501be21..73eb09ff 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/mcu-type.ts @@ -1,10 +1,10 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum McuType{ - Other = 0, - ESP8266 = 1, - ESP32_S2 = 2, - ESP32_S3 = 3, - ESP32_C3 = 4 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +export enum McuType{ + Other = 0, + ESP8266 = 1, + ESP32_S2 = 2, + ESP32_S3 = 3, + ESP32_C3 = 4 +} + diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts b/protocol/typescript/src/solarxr_protocol/datatypes/hz-f32.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/hz-f32.ts index 96e32f37..6b04eb55 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/hz-f32.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Frequency as 32 bit float - */ -export class HzF32 { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):HzF32 { - this.bb_pos = i; - this.bb = bb; - return this; -} - -f():number { - return this.bb!.readFloat32(this.bb_pos); -} - -static sizeOf():number { - return 4; -} - -static createHzF32(builder:flatbuffers.Builder, f: number):flatbuffers.Offset { - builder.prep(4, 4); - builder.writeFloat32(f); - return builder.offset(); -} - - -unpack(): HzF32T { - return new HzF32T( - this.f() - ); -} - - -unpackTo(_o: HzF32T): void { - _o.f = this.f(); -} -} - -export class HzF32T { -constructor( - public f: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return HzF32.createHzF32(builder, - this.f - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Frequency as 32 bit float + */ +export class HzF32 { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):HzF32 { + this.bb_pos = i; + this.bb = bb; + return this; +} + +f():number { + return this.bb!.readFloat32(this.bb_pos); +} + +static sizeOf():number { + return 4; +} + +static createHzF32(builder:flatbuffers.Builder, f: number):flatbuffers.Offset { + builder.prep(4, 4); + builder.writeFloat32(f); + return builder.offset(); +} + + +unpack(): HzF32T { + return new HzF32T( + this.f() + ); +} + + +unpackTo(_o: HzF32T): void { + _o.f = this.f(); +} +} + +export class HzF32T { +constructor( + public f: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HzF32.createHzF32(builder, + this.f + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts b/protocol/typescript/src/solarxr_protocol/datatypes/ipv4-address.ts similarity index 100% rename from protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/ipv4-address.ts diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts b/protocol/typescript/src/solarxr_protocol/datatypes/log-data.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/log-data.ts index cc9f2277..162e57e2 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/log-data.ts @@ -1,116 +1,116 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * General purpose logging datatype - */ -export class LogData { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):LogData { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsLogData(bb:flatbuffers.ByteBuffer, obj?:LogData):LogData { - return (obj || new LogData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsLogData(bb:flatbuffers.ByteBuffer, obj?:LogData):LogData { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new LogData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -message():string|null -message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -message(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; -} - -data(index: number):number|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; -} - -dataLength():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -dataArray():Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; -} - -static startLogData(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, messageOffset, 0); -} - -static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, dataOffset, 0); -} - -static createDataVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { - builder.startVector(1, data.length, 1); - for (let i = data.length - 1; i >= 0; i--) { - builder.addInt8(data[i]!); - } - return builder.endVector(); -} - -static startDataVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(1, numElems, 1); -} - -static endLogData(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createLogData(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset, dataOffset:flatbuffers.Offset):flatbuffers.Offset { - LogData.startLogData(builder); - LogData.addMessage(builder, messageOffset); - LogData.addData(builder, dataOffset); - return LogData.endLogData(builder); -} - -unpack(): LogDataT { - return new LogDataT( - this.message(), - this.bb!.createScalarList(this.data.bind(this), this.dataLength()) - ); -} - - -unpackTo(_o: LogDataT): void { - _o.message = this.message(); - _o.data = this.bb!.createScalarList(this.data.bind(this), this.dataLength()); -} -} - -export class LogDataT { -constructor( - public message: string|Uint8Array|null = null, - public data: (number)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const message = (this.message !== null ? builder.createString(this.message!) : 0); - const data = LogData.createDataVector(builder, this.data); - - return LogData.createLogData(builder, - message, - data - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * General purpose logging datatype + */ +export class LogData { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):LogData { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsLogData(bb:flatbuffers.ByteBuffer, obj?:LogData):LogData { + return (obj || new LogData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsLogData(bb:flatbuffers.ByteBuffer, obj?:LogData):LogData { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new LogData()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +message():string|null +message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +message(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; +} + +data(index: number):number|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb!.__vector(this.bb_pos + offset) + index) : 0; +} + +dataLength():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +dataArray():Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? new Uint8Array(this.bb!.bytes().buffer, this.bb!.bytes().byteOffset + this.bb!.__vector(this.bb_pos + offset), this.bb!.__vector_len(this.bb_pos + offset)) : null; +} + +static startLogData(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, messageOffset, 0); +} + +static addData(builder:flatbuffers.Builder, dataOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, dataOffset, 0); +} + +static createDataVector(builder:flatbuffers.Builder, data:number[]|Uint8Array):flatbuffers.Offset { + builder.startVector(1, data.length, 1); + for (let i = data.length - 1; i >= 0; i--) { + builder.addInt8(data[i]!); + } + return builder.endVector(); +} + +static startDataVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(1, numElems, 1); +} + +static endLogData(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createLogData(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset, dataOffset:flatbuffers.Offset):flatbuffers.Offset { + LogData.startLogData(builder); + LogData.addMessage(builder, messageOffset); + LogData.addData(builder, dataOffset); + return LogData.endLogData(builder); +} + +unpack(): LogDataT { + return new LogDataT( + this.message(), + this.bb!.createScalarList(this.data.bind(this), this.dataLength()) + ); +} + + +unpackTo(_o: LogDataT): void { + _o.message = this.message(); + _o.data = this.bb!.createScalarList(this.data.bind(this), this.dataLength()); +} +} + +export class LogDataT { +constructor( + public message: string|Uint8Array|null = null, + public data: (number)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const message = (this.message !== null ? builder.createString(this.message!) : 0); + const data = LogData.createDataVector(builder, this.data); + + return LogData.createLogData(builder, + message, + data + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/math/quat.ts b/protocol/typescript/src/solarxr_protocol/datatypes/math/quat.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/math/quat.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/math/quat.ts index b2f2639d..9534f8b0 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/math/quat.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/math/quat.ts @@ -1,81 +1,81 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class Quat { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):Quat { - this.bb_pos = i; - this.bb = bb; - return this; -} - -x():number { - return this.bb!.readFloat32(this.bb_pos); -} - -y():number { - return this.bb!.readFloat32(this.bb_pos + 4); -} - -z():number { - return this.bb!.readFloat32(this.bb_pos + 8); -} - -w():number { - return this.bb!.readFloat32(this.bb_pos + 12); -} - -static sizeOf():number { - return 16; -} - -static createQuat(builder:flatbuffers.Builder, x: number, y: number, z: number, w: number):flatbuffers.Offset { - builder.prep(4, 16); - builder.writeFloat32(w); - builder.writeFloat32(z); - builder.writeFloat32(y); - builder.writeFloat32(x); - return builder.offset(); -} - - -unpack(): QuatT { - return new QuatT( - this.x(), - this.y(), - this.z(), - this.w() - ); -} - - -unpackTo(_o: QuatT): void { - _o.x = this.x(); - _o.y = this.y(); - _o.z = this.z(); - _o.w = this.w(); -} -} - -export class QuatT { -constructor( - public x: number = 0.0, - public y: number = 0.0, - public z: number = 0.0, - public w: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return Quat.createQuat(builder, - this.x, - this.y, - this.z, - this.w - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class Quat { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Quat { + this.bb_pos = i; + this.bb = bb; + return this; +} + +x():number { + return this.bb!.readFloat32(this.bb_pos); +} + +y():number { + return this.bb!.readFloat32(this.bb_pos + 4); +} + +z():number { + return this.bb!.readFloat32(this.bb_pos + 8); +} + +w():number { + return this.bb!.readFloat32(this.bb_pos + 12); +} + +static sizeOf():number { + return 16; +} + +static createQuat(builder:flatbuffers.Builder, x: number, y: number, z: number, w: number):flatbuffers.Offset { + builder.prep(4, 16); + builder.writeFloat32(w); + builder.writeFloat32(z); + builder.writeFloat32(y); + builder.writeFloat32(x); + return builder.offset(); +} + + +unpack(): QuatT { + return new QuatT( + this.x(), + this.y(), + this.z(), + this.w() + ); +} + + +unpackTo(_o: QuatT): void { + _o.x = this.x(); + _o.y = this.y(); + _o.z = this.z(); + _o.w = this.w(); +} +} + +export class QuatT { +constructor( + public x: number = 0.0, + public y: number = 0.0, + public z: number = 0.0, + public w: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return Quat.createQuat(builder, + this.x, + this.y, + this.z, + this.w + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/math/vec3f.ts b/protocol/typescript/src/solarxr_protocol/datatypes/math/vec3f.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/math/vec3f.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/math/vec3f.ts index f7226279..ea625d18 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/math/vec3f.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/math/vec3f.ts @@ -1,72 +1,72 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class Vec3f { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):Vec3f { - this.bb_pos = i; - this.bb = bb; - return this; -} - -x():number { - return this.bb!.readFloat32(this.bb_pos); -} - -y():number { - return this.bb!.readFloat32(this.bb_pos + 4); -} - -z():number { - return this.bb!.readFloat32(this.bb_pos + 8); -} - -static sizeOf():number { - return 12; -} - -static createVec3f(builder:flatbuffers.Builder, x: number, y: number, z: number):flatbuffers.Offset { - builder.prep(4, 12); - builder.writeFloat32(z); - builder.writeFloat32(y); - builder.writeFloat32(x); - return builder.offset(); -} - - -unpack(): Vec3fT { - return new Vec3fT( - this.x(), - this.y(), - this.z() - ); -} - - -unpackTo(_o: Vec3fT): void { - _o.x = this.x(); - _o.y = this.y(); - _o.z = this.z(); -} -} - -export class Vec3fT { -constructor( - public x: number = 0.0, - public y: number = 0.0, - public z: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return Vec3f.createVec3f(builder, - this.x, - this.y, - this.z - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class Vec3f { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Vec3f { + this.bb_pos = i; + this.bb = bb; + return this; +} + +x():number { + return this.bb!.readFloat32(this.bb_pos); +} + +y():number { + return this.bb!.readFloat32(this.bb_pos + 4); +} + +z():number { + return this.bb!.readFloat32(this.bb_pos + 8); +} + +static sizeOf():number { + return 12; +} + +static createVec3f(builder:flatbuffers.Builder, x: number, y: number, z: number):flatbuffers.Offset { + builder.prep(4, 12); + builder.writeFloat32(z); + builder.writeFloat32(y); + builder.writeFloat32(x); + return builder.offset(); +} + + +unpack(): Vec3fT { + return new Vec3fT( + this.x(), + this.y(), + this.z() + ); +} + + +unpackTo(_o: Vec3fT): void { + _o.x = this.x(); + _o.y = this.y(); + _o.z = this.z(); +} +} + +export class Vec3fT { +constructor( + public x: number = 0.0, + public y: number = 0.0, + public z: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return Vec3f.createVec3f(builder, + this.x, + this.y, + this.z + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/string.ts b/protocol/typescript/src/solarxr_protocol/datatypes/string.ts new file mode 100644 index 00000000..ead40f8a --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/datatypes/string.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class String { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):String { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsString(bb:flatbuffers.ByteBuffer, obj?:String):String { + return (obj || new String()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsString(bb:flatbuffers.ByteBuffer, obj?:String):String { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new String()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +s():string|null +s(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +s(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 startString(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addS(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, sOffset, 0); +} + +static endString(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createString(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset):flatbuffers.Offset { + String.startString(builder); + String.addS(builder, sOffset); + return String.endString(builder); +} + +unpack(): StringT { + return new StringT( + this.s() + ); +} + + +unpackTo(_o: StringT): void { + _o.s = this.s(); +} +} + +export class StringT { +constructor( + public s: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const s = (this.s !== null ? builder.createString(this.s!) : 0); + + return String.createString(builder, + s + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/temperature.ts b/protocol/typescript/src/solarxr_protocol/datatypes/temperature.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/temperature.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/temperature.ts index 8515d998..ebf2d0fb 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/temperature.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/temperature.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Temperature in degrees celsius - */ -export class Temperature { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):Temperature { - this.bb_pos = i; - this.bb = bb; - return this; -} - -temp():number { - return this.bb!.readFloat32(this.bb_pos); -} - -static sizeOf():number { - return 4; -} - -static createTemperature(builder:flatbuffers.Builder, temp: number):flatbuffers.Offset { - builder.prep(4, 4); - builder.writeFloat32(temp); - return builder.offset(); -} - - -unpack(): TemperatureT { - return new TemperatureT( - this.temp() - ); -} - - -unpackTo(_o: TemperatureT): void { - _o.temp = this.temp(); -} -} - -export class TemperatureT { -constructor( - public temp: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return Temperature.createTemperature(builder, - this.temp - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Temperature in degrees celsius + */ +export class Temperature { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Temperature { + this.bb_pos = i; + this.bb = bb; + return this; +} + +temp():number { + return this.bb!.readFloat32(this.bb_pos); +} + +static sizeOf():number { + return 4; +} + +static createTemperature(builder:flatbuffers.Builder, temp: number):flatbuffers.Offset { + builder.prep(4, 4); + builder.writeFloat32(temp); + return builder.offset(); +} + + +unpack(): TemperatureT { + return new TemperatureT( + this.temp() + ); +} + + +unpackTo(_o: TemperatureT): void { + _o.temp = this.temp(); +} +} + +export class TemperatureT { +constructor( + public temp: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return Temperature.createTemperature(builder, + this.temp + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-id.ts b/protocol/typescript/src/solarxr_protocol/datatypes/tracker-id.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/tracker-id.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/tracker-id.ts index 151df80e..13dfa539 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-id.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/tracker-id.ts @@ -1,94 +1,94 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { DeviceId, DeviceIdT } from '../../solarxr-protocol/datatypes/device-id'; - - -export class TrackerId { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):TrackerId { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTrackerId(bb:flatbuffers.ByteBuffer, obj?:TrackerId):TrackerId { - return (obj || new TrackerId()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTrackerId(bb:flatbuffers.ByteBuffer, obj?:TrackerId):TrackerId { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TrackerId()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * The device the tracker is associated with. If there is no hardware device it is - * associated with, this should be `null`. - */ -deviceId(obj?:DeviceId):DeviceId|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new DeviceId()).__init(this.bb_pos + offset, this.bb!) : null; -} - -/** - * There are possibly multiple trackers per device. This identifies which one. - */ -trackerNum():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0; -} - -static startTrackerId(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addDeviceId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset) { - builder.addFieldStruct(0, deviceIdOffset, 0); -} - -static addTrackerNum(builder:flatbuffers.Builder, trackerNum:number) { - builder.addFieldInt8(1, trackerNum, 0); -} - -static endTrackerId(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTrackerId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset, trackerNum:number):flatbuffers.Offset { - TrackerId.startTrackerId(builder); - TrackerId.addDeviceId(builder, deviceIdOffset); - TrackerId.addTrackerNum(builder, trackerNum); - return TrackerId.endTrackerId(builder); -} - -unpack(): TrackerIdT { - return new TrackerIdT( - (this.deviceId() !== null ? this.deviceId()!.unpack() : null), - this.trackerNum() - ); -} - - -unpackTo(_o: TrackerIdT): void { - _o.deviceId = (this.deviceId() !== null ? this.deviceId()!.unpack() : null); - _o.trackerNum = this.trackerNum(); -} -} - -export class TrackerIdT { -constructor( - public deviceId: DeviceIdT|null = null, - public trackerNum: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TrackerId.createTrackerId(builder, - (this.deviceId !== null ? this.deviceId!.pack(builder) : 0), - this.trackerNum - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DeviceId, DeviceIdT } from '../../solarxr_protocol/datatypes/device-id'; + + +export class TrackerId { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TrackerId { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTrackerId(bb:flatbuffers.ByteBuffer, obj?:TrackerId):TrackerId { + return (obj || new TrackerId()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTrackerId(bb:flatbuffers.ByteBuffer, obj?:TrackerId):TrackerId { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TrackerId()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * The device the tracker is associated with. If there is no hardware device it is + * associated with, this should be `null`. + */ +deviceId(obj?:DeviceId):DeviceId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new DeviceId()).__init(this.bb_pos + offset, this.bb!) : null; +} + +/** + * There are possibly multiple trackers per device. This identifies which one. + */ +trackerNum():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : 0; +} + +static startTrackerId(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addDeviceId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset) { + builder.addFieldStruct(0, deviceIdOffset, 0); +} + +static addTrackerNum(builder:flatbuffers.Builder, trackerNum:number) { + builder.addFieldInt8(1, trackerNum, 0); +} + +static endTrackerId(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTrackerId(builder:flatbuffers.Builder, deviceIdOffset:flatbuffers.Offset, trackerNum:number):flatbuffers.Offset { + TrackerId.startTrackerId(builder); + TrackerId.addDeviceId(builder, deviceIdOffset); + TrackerId.addTrackerNum(builder, trackerNum); + return TrackerId.endTrackerId(builder); +} + +unpack(): TrackerIdT { + return new TrackerIdT( + (this.deviceId() !== null ? this.deviceId()!.unpack() : null), + this.trackerNum() + ); +} + + +unpackTo(_o: TrackerIdT): void { + _o.deviceId = (this.deviceId() !== null ? this.deviceId()!.unpack() : null); + _o.trackerNum = this.trackerNum(); +} +} + +export class TrackerIdT { +constructor( + public deviceId: DeviceIdT|null = null, + public trackerNum: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TrackerId.createTrackerId(builder, + (this.deviceId !== null ? this.deviceId!.pack(builder) : 0), + this.trackerNum + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts b/protocol/typescript/src/solarxr_protocol/datatypes/tracker-role.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/tracker-role.ts index 904e2772..eae043f8 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/tracker-role.ts @@ -1,33 +1,33 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -/** - * Possible tracker roles - * They're not perfect match for SteamVR tracker roles, - * because we support more possible roles. Host can - * chose how to map it to their supported role. - */ -export enum TrackerRole{ - NONE = 0, - WAIST = 1, - LEFT_FOOT = 2, - RIGHT_FOOT = 3, - CHEST = 4, - LEFT_KNEE = 5, - RIGHT_KNEE = 6, - LEFT_ELBOW = 7, - RIGHT_ELBOW = 8, - LEFT_SHOULDER = 9, - RIGHT_SHOULDER = 10, - LEFT_HAND = 11, - RIGHT_HAND = 12, - LEFT_CONTROLLER = 13, - RIGHT_CONTROLLER = 14, - HEAD = 15, - NECK = 16, - CAMERA = 17, - KEYBOARD = 18, - HMD = 19, - BEACON = 20, - GENERIC_CONTROLLER = 21 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +/** + * Possible tracker roles + * They're not perfect match for SteamVR tracker roles, + * because we support more possible roles. Host can + * chose how to map it to their supported role. + */ +export enum TrackerRole{ + NONE = 0, + WAIST = 1, + LEFT_FOOT = 2, + RIGHT_FOOT = 3, + CHEST = 4, + LEFT_KNEE = 5, + RIGHT_KNEE = 6, + LEFT_ELBOW = 7, + RIGHT_ELBOW = 8, + LEFT_SHOULDER = 9, + RIGHT_SHOULDER = 10, + LEFT_HAND = 11, + RIGHT_HAND = 12, + LEFT_CONTROLLER = 13, + RIGHT_CONTROLLER = 14, + HEAD = 15, + NECK = 16, + CAMERA = 17, + KEYBOARD = 18, + HMD = 19, + BEACON = 20, + GENERIC_CONTROLLER = 21 +} + diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts b/protocol/typescript/src/solarxr_protocol/datatypes/tracker-status.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/tracker-status.ts index 6d15e9d1..043dd1cf 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/tracker-status.ts @@ -1,11 +1,11 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum TrackerStatus{ - NONE = 0, - DISCONNECTED = 1, - OK = 2, - BUSY = 3, - ERROR = 4, - OCCLUDED = 5 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +export enum TrackerStatus{ + NONE = 0, + DISCONNECTED = 1, + OK = 2, + BUSY = 3, + ERROR = 4, + OCCLUDED = 5 +} + diff --git a/protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts b/protocol/typescript/src/solarxr_protocol/datatypes/transaction-id.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts rename to protocol/typescript/src/solarxr_protocol/datatypes/transaction-id.ts index d510590a..bd26d403 100644 --- a/protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts +++ b/protocol/typescript/src/solarxr_protocol/datatypes/transaction-id.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class TransactionId { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):TransactionId { - this.bb_pos = i; - this.bb = bb; - return this; -} - -/** - * This is expected to overflow, networking logic should handle this case. - */ -id():number { - return this.bb!.readUint32(this.bb_pos); -} - -static sizeOf():number { - return 4; -} - -static createTransactionId(builder:flatbuffers.Builder, id: number):flatbuffers.Offset { - builder.prep(4, 4); - builder.writeInt32(id); - return builder.offset(); -} - - -unpack(): TransactionIdT { - return new TransactionIdT( - this.id() - ); -} - - -unpackTo(_o: TransactionIdT): void { - _o.id = this.id(); -} -} - -export class TransactionIdT { -constructor( - public id: number = 0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return TransactionId.createTransactionId(builder, - this.id - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class TransactionId { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TransactionId { + this.bb_pos = i; + this.bb = bb; + return this; +} + +/** + * This is expected to overflow, networking logic should handle this case. + */ +id():number { + return this.bb!.readUint32(this.bb_pos); +} + +static sizeOf():number { + return 4; +} + +static createTransactionId(builder:flatbuffers.Builder, id: number):flatbuffers.Offset { + builder.prep(4, 4); + builder.writeInt32(id); + return builder.offset(); +} + + +unpack(): TransactionIdT { + return new TransactionIdT( + this.id() + ); +} + + +unpackTo(_o: TransactionIdT): void { + _o.id = this.id(); +} +} + +export class TransactionIdT { +constructor( + public id: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TransactionId.createTransactionId(builder, + this.id + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/message-bundle.ts b/protocol/typescript/src/solarxr_protocol/message-bundle.ts similarity index 70% rename from protocol/typescript/src/solarxr-protocol/message-bundle.ts rename to protocol/typescript/src/solarxr_protocol/message-bundle.ts index 452ac5e0..a8da4762 100644 --- a/protocol/typescript/src/solarxr-protocol/message-bundle.ts +++ b/protocol/typescript/src/solarxr_protocol/message-bundle.ts @@ -1,129 +1,162 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { DataFeedMessageHeader, DataFeedMessageHeaderT } from '../solarxr-protocol/data-feed/data-feed-message-header'; -import { RpcMessageHeader, RpcMessageHeaderT } from '../solarxr-protocol/rpc/rpc-message-header'; - - -/** - * MessageBundle contains all of the messages for the data feed system and the - * rpc system that will be sent in one buffer. - */ -export class MessageBundle { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):MessageBundle { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsMessageBundle(bb:flatbuffers.ByteBuffer, obj?:MessageBundle):MessageBundle { - return (obj || new MessageBundle()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsMessageBundle(bb:flatbuffers.ByteBuffer, obj?:MessageBundle):MessageBundle { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new MessageBundle()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -dataFeedMsgs(index: number, obj?:DataFeedMessageHeader):DataFeedMessageHeader|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new DataFeedMessageHeader()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -dataFeedMsgsLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -rpcMsgs(index: number, obj?:RpcMessageHeader):RpcMessageHeader|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new RpcMessageHeader()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -rpcMsgsLength():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startMessageBundle(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addDataFeedMsgs(builder:flatbuffers.Builder, dataFeedMsgsOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, dataFeedMsgsOffset, 0); -} - -static createDataFeedMsgsVector(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 startDataFeedMsgsVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static addRpcMsgs(builder:flatbuffers.Builder, rpcMsgsOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, rpcMsgsOffset, 0); -} - -static createRpcMsgsVector(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 startRpcMsgsVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endMessageBundle(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createMessageBundle(builder:flatbuffers.Builder, dataFeedMsgsOffset:flatbuffers.Offset, rpcMsgsOffset:flatbuffers.Offset):flatbuffers.Offset { - MessageBundle.startMessageBundle(builder); - MessageBundle.addDataFeedMsgs(builder, dataFeedMsgsOffset); - MessageBundle.addRpcMsgs(builder, rpcMsgsOffset); - return MessageBundle.endMessageBundle(builder); -} - -unpack(): MessageBundleT { - return new MessageBundleT( - this.bb!.createObjList(this.dataFeedMsgs.bind(this), this.dataFeedMsgsLength()), - this.bb!.createObjList(this.rpcMsgs.bind(this), this.rpcMsgsLength()) - ); -} - - -unpackTo(_o: MessageBundleT): void { - _o.dataFeedMsgs = this.bb!.createObjList(this.dataFeedMsgs.bind(this), this.dataFeedMsgsLength()); - _o.rpcMsgs = this.bb!.createObjList(this.rpcMsgs.bind(this), this.rpcMsgsLength()); -} -} - -export class MessageBundleT { -constructor( - public dataFeedMsgs: (DataFeedMessageHeaderT)[] = [], - public rpcMsgs: (RpcMessageHeaderT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const dataFeedMsgs = MessageBundle.createDataFeedMsgsVector(builder, builder.createObjectOffsetList(this.dataFeedMsgs)); - const rpcMsgs = MessageBundle.createRpcMsgsVector(builder, builder.createObjectOffsetList(this.rpcMsgs)); - - return MessageBundle.createMessageBundle(builder, - dataFeedMsgs, - rpcMsgs - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { DataFeedMessageHeader, DataFeedMessageHeaderT } from '../solarxr_protocol/data_feed/data-feed-message-header'; +import { PubSubHeader, PubSubHeaderT } from '../solarxr_protocol/pub_sub/pub-sub-header'; +import { RpcMessageHeader, RpcMessageHeaderT } from '../solarxr_protocol/rpc/rpc-message-header'; + + +/** + * MessageBundle contains all of the messages for the data feed system and the + * rpc system that will be sent in one buffer. + */ +export class MessageBundle { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):MessageBundle { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsMessageBundle(bb:flatbuffers.ByteBuffer, obj?:MessageBundle):MessageBundle { + return (obj || new MessageBundle()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsMessageBundle(bb:flatbuffers.ByteBuffer, obj?:MessageBundle):MessageBundle { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new MessageBundle()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +dataFeedMsgs(index: number, obj?:DataFeedMessageHeader):DataFeedMessageHeader|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new DataFeedMessageHeader()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +dataFeedMsgsLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +rpcMsgs(index: number, obj?:RpcMessageHeader):RpcMessageHeader|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new RpcMessageHeader()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +rpcMsgsLength():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +pubSubMsgs(index: number, obj?:PubSubHeader):PubSubHeader|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new PubSubHeader()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +pubSubMsgsLength():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startMessageBundle(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addDataFeedMsgs(builder:flatbuffers.Builder, dataFeedMsgsOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, dataFeedMsgsOffset, 0); +} + +static createDataFeedMsgsVector(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 startDataFeedMsgsVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static addRpcMsgs(builder:flatbuffers.Builder, rpcMsgsOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, rpcMsgsOffset, 0); +} + +static createRpcMsgsVector(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 startRpcMsgsVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static addPubSubMsgs(builder:flatbuffers.Builder, pubSubMsgsOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, pubSubMsgsOffset, 0); +} + +static createPubSubMsgsVector(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 startPubSubMsgsVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endMessageBundle(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createMessageBundle(builder:flatbuffers.Builder, dataFeedMsgsOffset:flatbuffers.Offset, rpcMsgsOffset:flatbuffers.Offset, pubSubMsgsOffset:flatbuffers.Offset):flatbuffers.Offset { + MessageBundle.startMessageBundle(builder); + MessageBundle.addDataFeedMsgs(builder, dataFeedMsgsOffset); + MessageBundle.addRpcMsgs(builder, rpcMsgsOffset); + MessageBundle.addPubSubMsgs(builder, pubSubMsgsOffset); + return MessageBundle.endMessageBundle(builder); +} + +unpack(): MessageBundleT { + return new MessageBundleT( + this.bb!.createObjList(this.dataFeedMsgs.bind(this), this.dataFeedMsgsLength()), + this.bb!.createObjList(this.rpcMsgs.bind(this), this.rpcMsgsLength()), + this.bb!.createObjList(this.pubSubMsgs.bind(this), this.pubSubMsgsLength()) + ); +} + + +unpackTo(_o: MessageBundleT): void { + _o.dataFeedMsgs = this.bb!.createObjList(this.dataFeedMsgs.bind(this), this.dataFeedMsgsLength()); + _o.rpcMsgs = this.bb!.createObjList(this.rpcMsgs.bind(this), this.rpcMsgsLength()); + _o.pubSubMsgs = this.bb!.createObjList(this.pubSubMsgs.bind(this), this.pubSubMsgsLength()); +} +} + +export class MessageBundleT { +constructor( + public dataFeedMsgs: (DataFeedMessageHeaderT)[] = [], + public rpcMsgs: (RpcMessageHeaderT)[] = [], + public pubSubMsgs: (PubSubHeaderT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const dataFeedMsgs = MessageBundle.createDataFeedMsgsVector(builder, builder.createObjectOffsetList(this.dataFeedMsgs)); + const rpcMsgs = MessageBundle.createRpcMsgsVector(builder, builder.createObjectOffsetList(this.rpcMsgs)); + const pubSubMsgs = MessageBundle.createPubSubMsgsVector(builder, builder.createObjectOffsetList(this.pubSubMsgs)); + + return MessageBundle.createMessageBundle(builder, + dataFeedMsgs, + rpcMsgs, + pubSubMsgs + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/key-values.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/key-values.ts new file mode 100644 index 00000000..9504da80 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/key-values.ts @@ -0,0 +1,127 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class KeyValues { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):KeyValues { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsKeyValues(bb:flatbuffers.ByteBuffer, obj?:KeyValues):KeyValues { + return (obj || new KeyValues()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsKeyValues(bb:flatbuffers.ByteBuffer, obj?:KeyValues):KeyValues { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new KeyValues()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +keys(index: number):string +keys(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array +keys(index: number,optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +} + +keysLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +values(index: number):string +values(index: number,optionalEncoding:flatbuffers.Encoding):string|Uint8Array +values(index: number,optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__string(this.bb!.__vector(this.bb_pos + offset) + index * 4, optionalEncoding) : null; +} + +valuesLength():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startKeyValues(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addKeys(builder:flatbuffers.Builder, keysOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, keysOffset, 0); +} + +static createKeysVector(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 startKeysVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static addValues(builder:flatbuffers.Builder, valuesOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, valuesOffset, 0); +} + +static createValuesVector(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 startValuesVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endKeyValues(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createKeyValues(builder:flatbuffers.Builder, keysOffset:flatbuffers.Offset, valuesOffset:flatbuffers.Offset):flatbuffers.Offset { + KeyValues.startKeyValues(builder); + KeyValues.addKeys(builder, keysOffset); + KeyValues.addValues(builder, valuesOffset); + return KeyValues.endKeyValues(builder); +} + +unpack(): KeyValuesT { + return new KeyValuesT( + this.bb!.createScalarList(this.keys.bind(this), this.keysLength()), + this.bb!.createScalarList(this.values.bind(this), this.valuesLength()) + ); +} + + +unpackTo(_o: KeyValuesT): void { + _o.keys = this.bb!.createScalarList(this.keys.bind(this), this.keysLength()); + _o.values = this.bb!.createScalarList(this.values.bind(this), this.valuesLength()); +} +} + +export class KeyValuesT { +constructor( + public keys: (string)[] = [], + public values: (string)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const keys = KeyValues.createKeysVector(builder, builder.createObjectOffsetList(this.keys)); + const values = KeyValues.createValuesVector(builder, builder.createObjectOffsetList(this.values)); + + return KeyValues.createKeyValues(builder, + keys, + values + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/message.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/message.ts new file mode 100644 index 00000000..3f1139de --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/message.ts @@ -0,0 +1,143 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Bytes, BytesT } from '../../solarxr_protocol/datatypes/bytes'; +import { String, StringT } from '../../solarxr_protocol/datatypes/string'; +import { KeyValues, KeyValuesT } from '../../solarxr_protocol/pub_sub/key-values'; +import { Payload, unionToPayload, unionListToPayload } from '../../solarxr_protocol/pub_sub/payload'; +import { Topic, unionToTopic, unionListToTopic } from '../../solarxr_protocol/pub_sub/topic'; +import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; + + +/** + * Data that is sent from publishers to subscribers + */ +export class Message { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):Message { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsMessage(bb:flatbuffers.ByteBuffer, obj?:Message):Message { + return (obj || new Message()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsMessage(bb:flatbuffers.ByteBuffer, obj?:Message):Message { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new Message()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +topicType():Topic { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : Topic.NONE; +} + +topic(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +payloadType():Payload { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : Payload.NONE; +} + +payload(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +static startMessage(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addTopicType(builder:flatbuffers.Builder, topicType:Topic) { + builder.addFieldInt8(0, topicType, Topic.NONE); +} + +static addTopic(builder:flatbuffers.Builder, topicOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, topicOffset, 0); +} + +static addPayloadType(builder:flatbuffers.Builder, payloadType:Payload) { + builder.addFieldInt8(2, payloadType, Payload.NONE); +} + +static addPayload(builder:flatbuffers.Builder, payloadOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, payloadOffset, 0); +} + +static endMessage(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createMessage(builder:flatbuffers.Builder, topicType:Topic, topicOffset:flatbuffers.Offset, payloadType:Payload, payloadOffset:flatbuffers.Offset):flatbuffers.Offset { + Message.startMessage(builder); + Message.addTopicType(builder, topicType); + Message.addTopic(builder, topicOffset); + Message.addPayloadType(builder, payloadType); + Message.addPayload(builder, payloadOffset); + return Message.endMessage(builder); +} + +unpack(): MessageT { + return new MessageT( + this.topicType(), + (() => { + let temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(), + this.payloadType(), + (() => { + let temp = unionToPayload(this.payloadType(), this.payload.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: MessageT): void { + _o.topicType = this.topicType(); + _o.topic = (() => { + let temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); + _o.payloadType = this.payloadType(); + _o.payload = (() => { + let temp = unionToPayload(this.payloadType(), this.payload.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class MessageT { +constructor( + public topicType: Topic = Topic.NONE, + public topic: TopicHandleT|TopicIdT|null = null, + public payloadType: Payload = Payload.NONE, + public payload: BytesT|KeyValuesT|StringT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const topic = builder.createObjectOffset(this.topic); + const payload = builder.createObjectOffset(this.payload); + + return Message.createMessage(builder, + this.topicType, + topic, + this.payloadType, + payload + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts new file mode 100644 index 00000000..ad4d2d1a --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts @@ -0,0 +1,41 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import { Bytes, BytesT } from '../../solarxr_protocol/datatypes/bytes'; +import { String, StringT } from '../../solarxr_protocol/datatypes/string'; +import { KeyValues, KeyValuesT } from '../../solarxr_protocol/pub_sub/key-values'; + + +export enum Payload{ + NONE = 0, + solarxr_protocol_datatypes_String = 1, + solarxr_protocol_datatypes_Bytes = 2, + KeyValues = 3 +} + +export function unionToPayload( + type: Payload, + accessor: (obj:Bytes|KeyValues|String) => Bytes|KeyValues|String|null +): Bytes|KeyValues|String|null { + switch(Payload[type]) { + case 'NONE': return null; + case 'solarxr_protocol_datatypes_String': return accessor(new String())! as String; + case 'solarxr_protocol_datatypes_Bytes': return accessor(new Bytes())! as Bytes; + case 'KeyValues': return accessor(new KeyValues())! as KeyValues; + default: return null; + } +} + +export function unionListToPayload( + type: Payload, + accessor: (index: number, obj:Bytes|KeyValues|String) => Bytes|KeyValues|String|null, + index: number +): Bytes|KeyValues|String|null { + switch(Payload[type]) { + case 'NONE': return null; + case 'solarxr_protocol_datatypes_String': return accessor(index, new String())! as String; + case 'solarxr_protocol_datatypes_Bytes': return accessor(index, new Bytes())! as Bytes; + case 'KeyValues': return accessor(index, new KeyValues())! as KeyValues; + default: return null; + } +} + diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts new file mode 100644 index 00000000..fa2a4e96 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts @@ -0,0 +1,101 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Message, MessageT } from '../../solarxr_protocol/pub_sub/message'; +import { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from '../../solarxr_protocol/pub_sub/pub-sub-union'; +import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr_protocol/pub_sub/subscription-request'; +import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr_protocol/pub_sub/topic-handle-request'; +import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr_protocol/pub_sub/topic-handle-response'; + + +export class PubSubHeader { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):PubSubHeader { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsPubSubHeader(bb:flatbuffers.ByteBuffer, obj?:PubSubHeader):PubSubHeader { + return (obj || new PubSubHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsPubSubHeader(bb:flatbuffers.ByteBuffer, obj?:PubSubHeader):PubSubHeader { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new PubSubHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +uType():PubSubUnion { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : PubSubUnion.NONE; +} + +u(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +static startPubSubHeader(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addUType(builder:flatbuffers.Builder, uType:PubSubUnion) { + builder.addFieldInt8(0, uType, PubSubUnion.NONE); +} + +static addU(builder:flatbuffers.Builder, uOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, uOffset, 0); +} + +static endPubSubHeader(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createPubSubHeader(builder:flatbuffers.Builder, uType:PubSubUnion, uOffset:flatbuffers.Offset):flatbuffers.Offset { + PubSubHeader.startPubSubHeader(builder); + PubSubHeader.addUType(builder, uType); + PubSubHeader.addU(builder, uOffset); + return PubSubHeader.endPubSubHeader(builder); +} + +unpack(): PubSubHeaderT { + return new PubSubHeaderT( + this.uType(), + (() => { + let temp = unionToPubSubUnion(this.uType(), this.u.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: PubSubHeaderT): void { + _o.uType = this.uType(); + _o.u = (() => { + let temp = unionToPubSubUnion(this.uType(), this.u.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class PubSubHeaderT { +constructor( + public uType: PubSubUnion = PubSubUnion.NONE, + public u: MessageT|SubscriptionRequestT|TopicHandleRequestT|TopicHandleResponseT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const u = builder.createObjectOffset(this.u); + + return PubSubHeader.createPubSubHeader(builder, + this.uType, + u + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts new file mode 100644 index 00000000..b6ef5392 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts @@ -0,0 +1,45 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import { Message, MessageT } from '../../solarxr_protocol/pub_sub/message'; +import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr_protocol/pub_sub/subscription-request'; +import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr_protocol/pub_sub/topic-handle-request'; +import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr_protocol/pub_sub/topic-handle-response'; + + +export enum PubSubUnion{ + NONE = 0, + Message = 1, + SubscriptionRequest = 2, + TopicHandleRequest = 3, + TopicHandleResponse = 4 +} + +export function unionToPubSubUnion( + type: PubSubUnion, + accessor: (obj:Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse) => Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null +): Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null { + switch(PubSubUnion[type]) { + case 'NONE': return null; + case 'Message': return accessor(new Message())! as Message; + case 'SubscriptionRequest': return accessor(new SubscriptionRequest())! as SubscriptionRequest; + case 'TopicHandleRequest': return accessor(new TopicHandleRequest())! as TopicHandleRequest; + case 'TopicHandleResponse': return accessor(new TopicHandleResponse())! as TopicHandleResponse; + default: return null; + } +} + +export function unionListToPubSubUnion( + type: PubSubUnion, + accessor: (index: number, obj:Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse) => Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null, + index: number +): Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null { + switch(PubSubUnion[type]) { + case 'NONE': return null; + case 'Message': return accessor(index, new Message())! as Message; + case 'SubscriptionRequest': return accessor(index, new SubscriptionRequest())! as SubscriptionRequest; + case 'TopicHandleRequest': return accessor(index, new TopicHandleRequest())! as TopicHandleRequest; + case 'TopicHandleResponse': return accessor(index, new TopicHandleResponse())! as TopicHandleResponse; + default: return null; + } +} + diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts new file mode 100644 index 00000000..8899c08f --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts @@ -0,0 +1,102 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { Topic, unionToTopic, unionListToTopic } from '../../solarxr_protocol/pub_sub/topic'; +import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; + + +/** + * Requests a subscription to `topic` + */ +export class SubscriptionRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SubscriptionRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSubscriptionRequest(bb:flatbuffers.ByteBuffer, obj?:SubscriptionRequest):SubscriptionRequest { + return (obj || new SubscriptionRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSubscriptionRequest(bb:flatbuffers.ByteBuffer, obj?:SubscriptionRequest):SubscriptionRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SubscriptionRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +topicType():Topic { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : Topic.NONE; +} + +topic(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +static startSubscriptionRequest(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addTopicType(builder:flatbuffers.Builder, topicType:Topic) { + builder.addFieldInt8(0, topicType, Topic.NONE); +} + +static addTopic(builder:flatbuffers.Builder, topicOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, topicOffset, 0); +} + +static endSubscriptionRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSubscriptionRequest(builder:flatbuffers.Builder, topicType:Topic, topicOffset:flatbuffers.Offset):flatbuffers.Offset { + SubscriptionRequest.startSubscriptionRequest(builder); + SubscriptionRequest.addTopicType(builder, topicType); + SubscriptionRequest.addTopic(builder, topicOffset); + return SubscriptionRequest.endSubscriptionRequest(builder); +} + +unpack(): SubscriptionRequestT { + return new SubscriptionRequestT( + this.topicType(), + (() => { + let temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: SubscriptionRequestT): void { + _o.topicType = this.topicType(); + _o.topic = (() => { + let temp = unionToTopic(this.topicType(), this.topic.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class SubscriptionRequestT { +constructor( + public topicType: Topic = Topic.NONE, + public topic: TopicHandleT|TopicIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const topic = builder.createObjectOffset(this.topic); + + return SubscriptionRequest.createSubscriptionRequest(builder, + this.topicType, + topic + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts new file mode 100644 index 00000000..f91f5e34 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts @@ -0,0 +1,79 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; + + +/** + * Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing + * bandwidth, since `FeatureId` can be large. + */ +export class TopicHandleRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TopicHandleRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTopicHandleRequest(bb:flatbuffers.ByteBuffer, obj?:TopicHandleRequest):TopicHandleRequest { + return (obj || new TopicHandleRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTopicHandleRequest(bb:flatbuffers.ByteBuffer, obj?:TopicHandleRequest):TopicHandleRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TopicHandleRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +id(obj?:TopicId):TopicId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TopicId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startTopicHandleRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, idOffset, 0); +} + +static endTopicHandleRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTopicHandleRequest(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset):flatbuffers.Offset { + TopicHandleRequest.startTopicHandleRequest(builder); + TopicHandleRequest.addId(builder, idOffset); + return TopicHandleRequest.endTopicHandleRequest(builder); +} + +unpack(): TopicHandleRequestT { + return new TopicHandleRequestT( + (this.id() !== null ? this.id()!.unpack() : null) + ); +} + + +unpackTo(_o: TopicHandleRequestT): void { + _o.id = (this.id() !== null ? this.id()!.unpack() : null); +} +} + +export class TopicHandleRequestT { +constructor( + public id: TopicIdT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const id = (this.id !== null ? this.id!.pack(builder) : 0); + + return TopicHandleRequest.createTopicHandleRequest(builder, + id + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts new file mode 100644 index 00000000..9c9297a5 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts @@ -0,0 +1,78 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; + + +/** + * Response for `TopicHandleRequest` + */ +export class TopicHandleResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TopicHandleResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTopicHandleResponse(bb:flatbuffers.ByteBuffer, obj?:TopicHandleResponse):TopicHandleResponse { + return (obj || new TopicHandleResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTopicHandleResponse(bb:flatbuffers.ByteBuffer, obj?:TopicHandleResponse):TopicHandleResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TopicHandleResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +handle(obj?:TopicHandle):TopicHandle|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TopicHandle()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startTopicHandleResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addHandle(builder:flatbuffers.Builder, handleOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, handleOffset, 0); +} + +static endTopicHandleResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTopicHandleResponse(builder:flatbuffers.Builder, handleOffset:flatbuffers.Offset):flatbuffers.Offset { + TopicHandleResponse.startTopicHandleResponse(builder); + TopicHandleResponse.addHandle(builder, handleOffset); + return TopicHandleResponse.endTopicHandleResponse(builder); +} + +unpack(): TopicHandleResponseT { + return new TopicHandleResponseT( + (this.handle() !== null ? this.handle()!.unpack() : null) + ); +} + + +unpackTo(_o: TopicHandleResponseT): void { + _o.handle = (this.handle() !== null ? this.handle()!.unpack() : null); +} +} + +export class TopicHandleResponseT { +constructor( + public handle: TopicHandleT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const handle = (this.handle !== null ? this.handle!.pack(builder) : 0); + + return TopicHandleResponse.createTopicHandleResponse(builder, + handle + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle.ts new file mode 100644 index 00000000..aafbb61b --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle.ts @@ -0,0 +1,76 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * A handle for the topic, allows referencing a topic without sending a huge + * `TopicId`. + */ +export class TopicHandle { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TopicHandle { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTopicHandle(bb:flatbuffers.ByteBuffer, obj?:TopicHandle):TopicHandle { + return (obj || new TopicHandle()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTopicHandle(bb:flatbuffers.ByteBuffer, obj?:TopicHandle):TopicHandle { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TopicHandle()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +id():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint16(this.bb_pos + offset) : 0; +} + +static startTopicHandle(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addId(builder:flatbuffers.Builder, id:number) { + builder.addFieldInt16(0, id, 0); +} + +static endTopicHandle(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTopicHandle(builder:flatbuffers.Builder, id:number):flatbuffers.Offset { + TopicHandle.startTopicHandle(builder); + TopicHandle.addId(builder, id); + return TopicHandle.endTopicHandle(builder); +} + +unpack(): TopicHandleT { + return new TopicHandleT( + this.id() + ); +} + + +unpackTo(_o: TopicHandleT): void { + _o.id = this.id(); +} +} + +export class TopicHandleT { +constructor( + public id: number = 0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return TopicHandle.createTopicHandle(builder, + this.id + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-id.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-id.ts new file mode 100644 index 00000000..ada63621 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/topic-id.ts @@ -0,0 +1,129 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * A `TopicId` identifies an application-specific category of data. Because it + * is application-specific, it is up to the application within the specified + * organization to define its semantics/meaning. + * + * For example, "bob" may have an "overlay" app with a "settings" topic for controlling + * the overlay visibility and other settings, as well as a "video feed" topic for + * allowing other applications to display video data in a wrist mounted window in VR. + */ +export class TopicId { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TopicId { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTopicId(bb:flatbuffers.ByteBuffer, obj?:TopicId):TopicId { + return (obj || new TopicId()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTopicId(bb:flatbuffers.ByteBuffer, obj?:TopicId):TopicId { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TopicId()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * The organization/developer that defines the meaning of this feature. Avoids name + * clashes. Should be something unique - same idea as java package identifier. + */ +organization():string|null +organization(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +organization(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; +} + +/** + * The name of the application/device. Should be unique within the organization. + */ +appName():string|null +appName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +appName(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; +} + +/** + * The name of the topic. Should be unique within the application. + */ +topic():string|null +topic(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +topic(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startTopicId(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addOrganization(builder:flatbuffers.Builder, organizationOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, organizationOffset, 0); +} + +static addAppName(builder:flatbuffers.Builder, appNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, appNameOffset, 0); +} + +static addTopic(builder:flatbuffers.Builder, topicOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, topicOffset, 0); +} + +static endTopicId(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createTopicId(builder:flatbuffers.Builder, organizationOffset:flatbuffers.Offset, appNameOffset:flatbuffers.Offset, topicOffset:flatbuffers.Offset):flatbuffers.Offset { + TopicId.startTopicId(builder); + TopicId.addOrganization(builder, organizationOffset); + TopicId.addAppName(builder, appNameOffset); + TopicId.addTopic(builder, topicOffset); + return TopicId.endTopicId(builder); +} + +unpack(): TopicIdT { + return new TopicIdT( + this.organization(), + this.appName(), + this.topic() + ); +} + + +unpackTo(_o: TopicIdT): void { + _o.organization = this.organization(); + _o.appName = this.appName(); + _o.topic = this.topic(); +} +} + +export class TopicIdT { +constructor( + public organization: string|Uint8Array|null = null, + public appName: string|Uint8Array|null = null, + public topic: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const organization = (this.organization !== null ? builder.createString(this.organization!) : 0); + const appName = (this.appName !== null ? builder.createString(this.appName!) : 0); + const topic = (this.topic !== null ? builder.createString(this.topic!) : 0); + + return TopicId.createTopicId(builder, + organization, + appName, + topic + ); +} +} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts b/protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts new file mode 100644 index 00000000..7866dfe3 --- /dev/null +++ b/protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; + + +export enum Topic{ + NONE = 0, + TopicHandle = 1, + TopicId = 2 +} + +export function unionToTopic( + type: Topic, + accessor: (obj:TopicHandle|TopicId) => TopicHandle|TopicId|null +): TopicHandle|TopicId|null { + switch(Topic[type]) { + case 'NONE': return null; + case 'TopicHandle': return accessor(new TopicHandle())! as TopicHandle; + case 'TopicId': return accessor(new TopicId())! as TopicId; + default: return null; + } +} + +export function unionListToTopic( + type: Topic, + accessor: (index: number, obj:TopicHandle|TopicId) => TopicHandle|TopicId|null, + index: number +): TopicHandle|TopicId|null { + switch(Topic[type]) { + case 'NONE': return null; + case 'TopicHandle': return accessor(index, new TopicHandle())! as TopicHandle; + case 'TopicId': return accessor(index, new TopicId())! as TopicId; + default: return null; + } +} + diff --git a/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/assign-tracker-request.ts similarity index 92% rename from protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/assign-tracker-request.ts index 05ddbd46..655a2a0d 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/assign-tracker-request.ts @@ -1,115 +1,115 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { BodyPart } from '../../solarxr-protocol/datatypes/body-part'; -import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id'; -import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat'; - - -export class AssignTrackerRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):AssignTrackerRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAssignTrackerRequest(bb:flatbuffers.ByteBuffer, obj?:AssignTrackerRequest):AssignTrackerRequest { - return (obj || new AssignTrackerRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAssignTrackerRequest(bb:flatbuffers.ByteBuffer, obj?:AssignTrackerRequest):AssignTrackerRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AssignTrackerRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -trackerId(obj?:TrackerId):TrackerId|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new TrackerId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -bodyPosition():BodyPart { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : BodyPart.NONE; -} - -mountingRotation(obj?:Quat):Quat|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; -} - -displayName():string|null -displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -displayName(optionalEncoding?:any):string|Uint8Array|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; -} - -static startAssignTrackerRequest(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, trackerIdOffset, 0); -} - -static addBodyPosition(builder:flatbuffers.Builder, bodyPosition:BodyPart) { - builder.addFieldInt8(1, bodyPosition, BodyPart.NONE); -} - -static addMountingRotation(builder:flatbuffers.Builder, mountingRotationOffset:flatbuffers.Offset) { - builder.addFieldStruct(2, mountingRotationOffset, 0); -} - -static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, displayNameOffset, 0); -} - -static endAssignTrackerRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): AssignTrackerRequestT { - return new AssignTrackerRequestT( - (this.trackerId() !== null ? this.trackerId()!.unpack() : null), - this.bodyPosition(), - (this.mountingRotation() !== null ? this.mountingRotation()!.unpack() : null), - this.displayName() - ); -} - - -unpackTo(_o: AssignTrackerRequestT): void { - _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); - _o.bodyPosition = this.bodyPosition(); - _o.mountingRotation = (this.mountingRotation() !== null ? this.mountingRotation()!.unpack() : null); - _o.displayName = this.displayName(); -} -} - -export class AssignTrackerRequestT { -constructor( - public trackerId: TrackerIdT|null = null, - public bodyPosition: BodyPart = BodyPart.NONE, - public mountingRotation: QuatT|null = null, - public displayName: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); - const displayName = (this.displayName !== null ? builder.createString(this.displayName!) : 0); - - AssignTrackerRequest.startAssignTrackerRequest(builder); - AssignTrackerRequest.addTrackerId(builder, trackerId); - AssignTrackerRequest.addBodyPosition(builder, this.bodyPosition); - AssignTrackerRequest.addMountingRotation(builder, (this.mountingRotation !== null ? this.mountingRotation!.pack(builder) : 0)); - AssignTrackerRequest.addDisplayName(builder, displayName); - - return AssignTrackerRequest.endAssignTrackerRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { BodyPart } from '../../solarxr_protocol/datatypes/body-part'; +import { TrackerId, TrackerIdT } from '../../solarxr_protocol/datatypes/tracker-id'; +import { Quat, QuatT } from '../../solarxr_protocol/datatypes/math/quat'; + + +export class AssignTrackerRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):AssignTrackerRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAssignTrackerRequest(bb:flatbuffers.ByteBuffer, obj?:AssignTrackerRequest):AssignTrackerRequest { + return (obj || new AssignTrackerRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAssignTrackerRequest(bb:flatbuffers.ByteBuffer, obj?:AssignTrackerRequest):AssignTrackerRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AssignTrackerRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +trackerId(obj?:TrackerId):TrackerId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TrackerId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +bodyPosition():BodyPart { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : BodyPart.NONE; +} + +mountingRotation(obj?:Quat):Quat|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new Quat()).__init(this.bb_pos + offset, this.bb!) : null; +} + +displayName():string|null +displayName(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +displayName(optionalEncoding?:any):string|Uint8Array|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; +} + +static startAssignTrackerRequest(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addTrackerId(builder:flatbuffers.Builder, trackerIdOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, trackerIdOffset, 0); +} + +static addBodyPosition(builder:flatbuffers.Builder, bodyPosition:BodyPart) { + builder.addFieldInt8(1, bodyPosition, BodyPart.NONE); +} + +static addMountingRotation(builder:flatbuffers.Builder, mountingRotationOffset:flatbuffers.Offset) { + builder.addFieldStruct(2, mountingRotationOffset, 0); +} + +static addDisplayName(builder:flatbuffers.Builder, displayNameOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, displayNameOffset, 0); +} + +static endAssignTrackerRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): AssignTrackerRequestT { + return new AssignTrackerRequestT( + (this.trackerId() !== null ? this.trackerId()!.unpack() : null), + this.bodyPosition(), + (this.mountingRotation() !== null ? this.mountingRotation()!.unpack() : null), + this.displayName() + ); +} + + +unpackTo(_o: AssignTrackerRequestT): void { + _o.trackerId = (this.trackerId() !== null ? this.trackerId()!.unpack() : null); + _o.bodyPosition = this.bodyPosition(); + _o.mountingRotation = (this.mountingRotation() !== null ? this.mountingRotation()!.unpack() : null); + _o.displayName = this.displayName(); +} +} + +export class AssignTrackerRequestT { +constructor( + public trackerId: TrackerIdT|null = null, + public bodyPosition: BodyPart = BodyPart.NONE, + public mountingRotation: QuatT|null = null, + public displayName: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const trackerId = (this.trackerId !== null ? this.trackerId!.pack(builder) : 0); + const displayName = (this.displayName !== null ? builder.createString(this.displayName!) : 0); + + AssignTrackerRequest.startAssignTrackerRequest(builder); + AssignTrackerRequest.addTrackerId(builder, trackerId); + AssignTrackerRequest.addBodyPosition(builder, this.bodyPosition); + AssignTrackerRequest.addMountingRotation(builder, (this.mountingRotation !== null ? this.mountingRotation!.pack(builder) : 0)); + AssignTrackerRequest.addDisplayName(builder, displayName); + + return AssignTrackerRequest.endAssignTrackerRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-epoch-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-epoch-response.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/rpc/auto-bone-epoch-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/auto-bone-epoch-response.ts index 0f76ca5b..748a9bc4 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-epoch-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-epoch-response.ts @@ -1,134 +1,134 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SkeletonPart, SkeletonPartT } from '../../solarxr-protocol/rpc/skeleton-part'; - - -export class AutoBoneEpochResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneEpochResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneEpochResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneEpochResponse):AutoBoneEpochResponse { - return (obj || new AutoBoneEpochResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneEpochResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneEpochResponse):AutoBoneEpochResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneEpochResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -currentEpoch():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -totalEpochs():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -epochError():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -adjustedSkeletonParts(index: number, obj?:SkeletonPart):SkeletonPart|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? (obj || new SkeletonPart()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -adjustedSkeletonPartsLength():number { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startAutoBoneEpochResponse(builder:flatbuffers.Builder) { - builder.startObject(4); -} - -static addCurrentEpoch(builder:flatbuffers.Builder, currentEpoch:number) { - builder.addFieldInt32(0, currentEpoch, 0); -} - -static addTotalEpochs(builder:flatbuffers.Builder, totalEpochs:number) { - builder.addFieldInt32(1, totalEpochs, 0); -} - -static addEpochError(builder:flatbuffers.Builder, epochError:number) { - builder.addFieldFloat32(2, epochError, 0.0); -} - -static addAdjustedSkeletonParts(builder:flatbuffers.Builder, adjustedSkeletonPartsOffset:flatbuffers.Offset) { - builder.addFieldOffset(3, adjustedSkeletonPartsOffset, 0); -} - -static createAdjustedSkeletonPartsVector(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 startAdjustedSkeletonPartsVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endAutoBoneEpochResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneEpochResponse(builder:flatbuffers.Builder, currentEpoch:number, totalEpochs:number, epochError:number, adjustedSkeletonPartsOffset:flatbuffers.Offset):flatbuffers.Offset { - AutoBoneEpochResponse.startAutoBoneEpochResponse(builder); - AutoBoneEpochResponse.addCurrentEpoch(builder, currentEpoch); - AutoBoneEpochResponse.addTotalEpochs(builder, totalEpochs); - AutoBoneEpochResponse.addEpochError(builder, epochError); - AutoBoneEpochResponse.addAdjustedSkeletonParts(builder, adjustedSkeletonPartsOffset); - return AutoBoneEpochResponse.endAutoBoneEpochResponse(builder); -} - -unpack(): AutoBoneEpochResponseT { - return new AutoBoneEpochResponseT( - this.currentEpoch(), - this.totalEpochs(), - this.epochError(), - this.bb!.createObjList(this.adjustedSkeletonParts.bind(this), this.adjustedSkeletonPartsLength()) - ); -} - - -unpackTo(_o: AutoBoneEpochResponseT): void { - _o.currentEpoch = this.currentEpoch(); - _o.totalEpochs = this.totalEpochs(); - _o.epochError = this.epochError(); - _o.adjustedSkeletonParts = this.bb!.createObjList(this.adjustedSkeletonParts.bind(this), this.adjustedSkeletonPartsLength()); -} -} - -export class AutoBoneEpochResponseT { -constructor( - public currentEpoch: number = 0, - public totalEpochs: number = 0, - public epochError: number = 0.0, - public adjustedSkeletonParts: (SkeletonPartT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const adjustedSkeletonParts = AutoBoneEpochResponse.createAdjustedSkeletonPartsVector(builder, builder.createObjectOffsetList(this.adjustedSkeletonParts)); - - return AutoBoneEpochResponse.createAutoBoneEpochResponse(builder, - this.currentEpoch, - this.totalEpochs, - this.epochError, - adjustedSkeletonParts - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { SkeletonPart, SkeletonPartT } from '../../solarxr_protocol/rpc/skeleton-part'; + + +export class AutoBoneEpochResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneEpochResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneEpochResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneEpochResponse):AutoBoneEpochResponse { + return (obj || new AutoBoneEpochResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneEpochResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneEpochResponse):AutoBoneEpochResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneEpochResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +currentEpoch():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +totalEpochs():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +epochError():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +adjustedSkeletonParts(index: number, obj?:SkeletonPart):SkeletonPart|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? (obj || new SkeletonPart()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +adjustedSkeletonPartsLength():number { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startAutoBoneEpochResponse(builder:flatbuffers.Builder) { + builder.startObject(4); +} + +static addCurrentEpoch(builder:flatbuffers.Builder, currentEpoch:number) { + builder.addFieldInt32(0, currentEpoch, 0); +} + +static addTotalEpochs(builder:flatbuffers.Builder, totalEpochs:number) { + builder.addFieldInt32(1, totalEpochs, 0); +} + +static addEpochError(builder:flatbuffers.Builder, epochError:number) { + builder.addFieldFloat32(2, epochError, 0.0); +} + +static addAdjustedSkeletonParts(builder:flatbuffers.Builder, adjustedSkeletonPartsOffset:flatbuffers.Offset) { + builder.addFieldOffset(3, adjustedSkeletonPartsOffset, 0); +} + +static createAdjustedSkeletonPartsVector(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 startAdjustedSkeletonPartsVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endAutoBoneEpochResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneEpochResponse(builder:flatbuffers.Builder, currentEpoch:number, totalEpochs:number, epochError:number, adjustedSkeletonPartsOffset:flatbuffers.Offset):flatbuffers.Offset { + AutoBoneEpochResponse.startAutoBoneEpochResponse(builder); + AutoBoneEpochResponse.addCurrentEpoch(builder, currentEpoch); + AutoBoneEpochResponse.addTotalEpochs(builder, totalEpochs); + AutoBoneEpochResponse.addEpochError(builder, epochError); + AutoBoneEpochResponse.addAdjustedSkeletonParts(builder, adjustedSkeletonPartsOffset); + return AutoBoneEpochResponse.endAutoBoneEpochResponse(builder); +} + +unpack(): AutoBoneEpochResponseT { + return new AutoBoneEpochResponseT( + this.currentEpoch(), + this.totalEpochs(), + this.epochError(), + this.bb!.createObjList(this.adjustedSkeletonParts.bind(this), this.adjustedSkeletonPartsLength()) + ); +} + + +unpackTo(_o: AutoBoneEpochResponseT): void { + _o.currentEpoch = this.currentEpoch(); + _o.totalEpochs = this.totalEpochs(); + _o.epochError = this.epochError(); + _o.adjustedSkeletonParts = this.bb!.createObjList(this.adjustedSkeletonParts.bind(this), this.adjustedSkeletonPartsLength()); +} +} + +export class AutoBoneEpochResponseT { +constructor( + public currentEpoch: number = 0, + public totalEpochs: number = 0, + public epochError: number = 0.0, + public adjustedSkeletonParts: (SkeletonPartT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const adjustedSkeletonParts = AutoBoneEpochResponse.createAdjustedSkeletonPartsVector(builder, builder.createObjectOffsetList(this.adjustedSkeletonParts)); + + return AutoBoneEpochResponse.createAutoBoneEpochResponse(builder, + this.currentEpoch, + this.totalEpochs, + this.epochError, + adjustedSkeletonParts + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-request.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-request.ts index 1bb17277..4ac189cc 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-request.ts @@ -1,73 +1,73 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { AutoBoneProcessType } from '../../solarxr-protocol/rpc/auto-bone-process-type'; - - -export class AutoBoneProcessRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneProcessRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneProcessRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessRequest):AutoBoneProcessRequest { - return (obj || new AutoBoneProcessRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneProcessRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessRequest):AutoBoneProcessRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneProcessRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -processType():AutoBoneProcessType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : AutoBoneProcessType.NONE; -} - -static startAutoBoneProcessRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addProcessType(builder:flatbuffers.Builder, processType:AutoBoneProcessType) { - builder.addFieldInt8(0, processType, AutoBoneProcessType.NONE); -} - -static endAutoBoneProcessRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneProcessRequest(builder:flatbuffers.Builder, processType:AutoBoneProcessType):flatbuffers.Offset { - AutoBoneProcessRequest.startAutoBoneProcessRequest(builder); - AutoBoneProcessRequest.addProcessType(builder, processType); - return AutoBoneProcessRequest.endAutoBoneProcessRequest(builder); -} - -unpack(): AutoBoneProcessRequestT { - return new AutoBoneProcessRequestT( - this.processType() - ); -} - - -unpackTo(_o: AutoBoneProcessRequestT): void { - _o.processType = this.processType(); -} -} - -export class AutoBoneProcessRequestT { -constructor( - public processType: AutoBoneProcessType = AutoBoneProcessType.NONE -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return AutoBoneProcessRequest.createAutoBoneProcessRequest(builder, - this.processType - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { AutoBoneProcessType } from '../../solarxr_protocol/rpc/auto-bone-process-type'; + + +export class AutoBoneProcessRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneProcessRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneProcessRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessRequest):AutoBoneProcessRequest { + return (obj || new AutoBoneProcessRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneProcessRequest(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessRequest):AutoBoneProcessRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneProcessRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +processType():AutoBoneProcessType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : AutoBoneProcessType.NONE; +} + +static startAutoBoneProcessRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addProcessType(builder:flatbuffers.Builder, processType:AutoBoneProcessType) { + builder.addFieldInt8(0, processType, AutoBoneProcessType.NONE); +} + +static endAutoBoneProcessRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneProcessRequest(builder:flatbuffers.Builder, processType:AutoBoneProcessType):flatbuffers.Offset { + AutoBoneProcessRequest.startAutoBoneProcessRequest(builder); + AutoBoneProcessRequest.addProcessType(builder, processType); + return AutoBoneProcessRequest.endAutoBoneProcessRequest(builder); +} + +unpack(): AutoBoneProcessRequestT { + return new AutoBoneProcessRequestT( + this.processType() + ); +} + + +unpackTo(_o: AutoBoneProcessRequestT): void { + _o.processType = this.processType(); +} +} + +export class AutoBoneProcessRequestT { +constructor( + public processType: AutoBoneProcessType = AutoBoneProcessType.NONE +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return AutoBoneProcessRequest.createAutoBoneProcessRequest(builder, + this.processType + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-status-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-status-response.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-status-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-status-response.ts index 92c091d9..1cbbf4e5 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-status-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-status-response.ts @@ -1,147 +1,147 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { AutoBoneProcessType } from '../../solarxr-protocol/rpc/auto-bone-process-type'; - - -export class AutoBoneProcessStatusResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneProcessStatusResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsAutoBoneProcessStatusResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessStatusResponse):AutoBoneProcessStatusResponse { - return (obj || new AutoBoneProcessStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsAutoBoneProcessStatusResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessStatusResponse):AutoBoneProcessStatusResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new AutoBoneProcessStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -processType():AutoBoneProcessType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : AutoBoneProcessType.NONE; -} - -message():string|null -message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -message(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; -} - -current():number { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -total():number { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; -} - -completed():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -success():boolean { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startAutoBoneProcessStatusResponse(builder:flatbuffers.Builder) { - builder.startObject(6); -} - -static addProcessType(builder:flatbuffers.Builder, processType:AutoBoneProcessType) { - builder.addFieldInt8(0, processType, AutoBoneProcessType.NONE); -} - -static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, messageOffset, 0); -} - -static addCurrent(builder:flatbuffers.Builder, current:number) { - builder.addFieldInt32(2, current, 0); -} - -static addTotal(builder:flatbuffers.Builder, total:number) { - builder.addFieldInt32(3, total, 0); -} - -static addCompleted(builder:flatbuffers.Builder, completed:boolean) { - builder.addFieldInt8(4, +completed, +false); -} - -static addSuccess(builder:flatbuffers.Builder, success:boolean) { - builder.addFieldInt8(5, +success, +false); -} - -static endAutoBoneProcessStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createAutoBoneProcessStatusResponse(builder:flatbuffers.Builder, processType:AutoBoneProcessType, messageOffset:flatbuffers.Offset, current:number, total:number, completed:boolean, success:boolean):flatbuffers.Offset { - AutoBoneProcessStatusResponse.startAutoBoneProcessStatusResponse(builder); - AutoBoneProcessStatusResponse.addProcessType(builder, processType); - AutoBoneProcessStatusResponse.addMessage(builder, messageOffset); - AutoBoneProcessStatusResponse.addCurrent(builder, current); - AutoBoneProcessStatusResponse.addTotal(builder, total); - AutoBoneProcessStatusResponse.addCompleted(builder, completed); - AutoBoneProcessStatusResponse.addSuccess(builder, success); - return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); -} - -unpack(): AutoBoneProcessStatusResponseT { - return new AutoBoneProcessStatusResponseT( - this.processType(), - this.message(), - this.current(), - this.total(), - this.completed(), - this.success() - ); -} - - -unpackTo(_o: AutoBoneProcessStatusResponseT): void { - _o.processType = this.processType(); - _o.message = this.message(); - _o.current = this.current(); - _o.total = this.total(); - _o.completed = this.completed(); - _o.success = this.success(); -} -} - -export class AutoBoneProcessStatusResponseT { -constructor( - public processType: AutoBoneProcessType = AutoBoneProcessType.NONE, - public message: string|Uint8Array|null = null, - public current: number = 0, - public total: number = 0, - public completed: boolean = false, - public success: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const message = (this.message !== null ? builder.createString(this.message!) : 0); - - return AutoBoneProcessStatusResponse.createAutoBoneProcessStatusResponse(builder, - this.processType, - message, - this.current, - this.total, - this.completed, - this.success - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { AutoBoneProcessType } from '../../solarxr_protocol/rpc/auto-bone-process-type'; + + +export class AutoBoneProcessStatusResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):AutoBoneProcessStatusResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsAutoBoneProcessStatusResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessStatusResponse):AutoBoneProcessStatusResponse { + return (obj || new AutoBoneProcessStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsAutoBoneProcessStatusResponse(bb:flatbuffers.ByteBuffer, obj?:AutoBoneProcessStatusResponse):AutoBoneProcessStatusResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new AutoBoneProcessStatusResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +processType():AutoBoneProcessType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : AutoBoneProcessType.NONE; +} + +message():string|null +message(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +message(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; +} + +current():number { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +total():number { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readUint32(this.bb_pos + offset) : 0; +} + +completed():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +success():boolean { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startAutoBoneProcessStatusResponse(builder:flatbuffers.Builder) { + builder.startObject(6); +} + +static addProcessType(builder:flatbuffers.Builder, processType:AutoBoneProcessType) { + builder.addFieldInt8(0, processType, AutoBoneProcessType.NONE); +} + +static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, messageOffset, 0); +} + +static addCurrent(builder:flatbuffers.Builder, current:number) { + builder.addFieldInt32(2, current, 0); +} + +static addTotal(builder:flatbuffers.Builder, total:number) { + builder.addFieldInt32(3, total, 0); +} + +static addCompleted(builder:flatbuffers.Builder, completed:boolean) { + builder.addFieldInt8(4, +completed, +false); +} + +static addSuccess(builder:flatbuffers.Builder, success:boolean) { + builder.addFieldInt8(5, +success, +false); +} + +static endAutoBoneProcessStatusResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createAutoBoneProcessStatusResponse(builder:flatbuffers.Builder, processType:AutoBoneProcessType, messageOffset:flatbuffers.Offset, current:number, total:number, completed:boolean, success:boolean):flatbuffers.Offset { + AutoBoneProcessStatusResponse.startAutoBoneProcessStatusResponse(builder); + AutoBoneProcessStatusResponse.addProcessType(builder, processType); + AutoBoneProcessStatusResponse.addMessage(builder, messageOffset); + AutoBoneProcessStatusResponse.addCurrent(builder, current); + AutoBoneProcessStatusResponse.addTotal(builder, total); + AutoBoneProcessStatusResponse.addCompleted(builder, completed); + AutoBoneProcessStatusResponse.addSuccess(builder, success); + return AutoBoneProcessStatusResponse.endAutoBoneProcessStatusResponse(builder); +} + +unpack(): AutoBoneProcessStatusResponseT { + return new AutoBoneProcessStatusResponseT( + this.processType(), + this.message(), + this.current(), + this.total(), + this.completed(), + this.success() + ); +} + + +unpackTo(_o: AutoBoneProcessStatusResponseT): void { + _o.processType = this.processType(); + _o.message = this.message(); + _o.current = this.current(); + _o.total = this.total(); + _o.completed = this.completed(); + _o.success = this.success(); +} +} + +export class AutoBoneProcessStatusResponseT { +constructor( + public processType: AutoBoneProcessType = AutoBoneProcessType.NONE, + public message: string|Uint8Array|null = null, + public current: number = 0, + public total: number = 0, + public completed: boolean = false, + public success: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const message = (this.message !== null ? builder.createString(this.message!) : 0); + + return AutoBoneProcessStatusResponse.createAutoBoneProcessStatusResponse(builder, + this.processType, + message, + this.current, + this.total, + this.completed, + this.success + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-type.ts b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-type.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-type.ts rename to protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-type.ts index 66e65e5e..e0c5d79b 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-type.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-type.ts @@ -1,10 +1,10 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum AutoBoneProcessType{ - NONE = 0, - RECORD = 1, - SAVE = 2, - PROCESS = 3, - APPLY = 4 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +export enum AutoBoneProcessType{ + NONE = 0, + RECORD = 1, + SAVE = 2, + PROCESS = 3, + APPLY = 4 +} + diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/change-settings-request.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/change-settings-request.ts index 0dfea9e0..85948f84 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/change-settings-request.ts @@ -1,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings'; -import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting'; -import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings'; - - -export class ChangeSettingsRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ChangeSettingsRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsChangeSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSettingsRequest):ChangeSettingsRequest { - return (obj || new ChangeSettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsChangeSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSettingsRequest):ChangeSettingsRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ChangeSettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -steamVrTrackers(obj?:SteamVRTrackersSetting):SteamVRTrackersSetting|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new SteamVRTrackersSetting()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -filtering(obj?:FilteringSettings):FilteringSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new FilteringSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -modelSettings(obj?:ModelSettings):ModelSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startChangeSettingsRequest(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, steamVrTrackersOffset, 0); -} - -static addFiltering(builder:flatbuffers.Builder, filteringOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, filteringOffset, 0); -} - -static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, modelSettingsOffset, 0); -} - -static endChangeSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): ChangeSettingsRequestT { - return new ChangeSettingsRequestT( - (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null), - (this.filtering() !== null ? this.filtering()!.unpack() : null), - (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null) - ); -} - - -unpackTo(_o: ChangeSettingsRequestT): void { - _o.steamVrTrackers = (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null); - _o.filtering = (this.filtering() !== null ? this.filtering()!.unpack() : null); - _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); -} -} - -export class ChangeSettingsRequestT { -constructor( - public steamVrTrackers: SteamVRTrackersSettingT|null = null, - public filtering: FilteringSettingsT|null = null, - public modelSettings: ModelSettingsT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const steamVrTrackers = (this.steamVrTrackers !== null ? this.steamVrTrackers!.pack(builder) : 0); - const filtering = (this.filtering !== null ? this.filtering!.pack(builder) : 0); - const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); - - ChangeSettingsRequest.startChangeSettingsRequest(builder); - ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); - ChangeSettingsRequest.addFiltering(builder, filtering); - ChangeSettingsRequest.addModelSettings(builder, modelSettings); - - return ChangeSettingsRequest.endChangeSettingsRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { FilteringSettings, FilteringSettingsT } from '../../solarxr_protocol/rpc/filtering-settings'; +import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr_protocol/rpc/steam-v-r-trackers-setting'; +import { ModelSettings, ModelSettingsT } from '../../solarxr_protocol/rpc/settings/model-settings'; + + +export class ChangeSettingsRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ChangeSettingsRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsChangeSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSettingsRequest):ChangeSettingsRequest { + return (obj || new ChangeSettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsChangeSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSettingsRequest):ChangeSettingsRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ChangeSettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +steamVrTrackers(obj?:SteamVRTrackersSetting):SteamVRTrackersSetting|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new SteamVRTrackersSetting()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +filtering(obj?:FilteringSettings):FilteringSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new FilteringSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +modelSettings(obj?:ModelSettings):ModelSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startChangeSettingsRequest(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, steamVrTrackersOffset, 0); +} + +static addFiltering(builder:flatbuffers.Builder, filteringOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, filteringOffset, 0); +} + +static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, modelSettingsOffset, 0); +} + +static endChangeSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): ChangeSettingsRequestT { + return new ChangeSettingsRequestT( + (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null), + (this.filtering() !== null ? this.filtering()!.unpack() : null), + (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null) + ); +} + + +unpackTo(_o: ChangeSettingsRequestT): void { + _o.steamVrTrackers = (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null); + _o.filtering = (this.filtering() !== null ? this.filtering()!.unpack() : null); + _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); +} +} + +export class ChangeSettingsRequestT { +constructor( + public steamVrTrackers: SteamVRTrackersSettingT|null = null, + public filtering: FilteringSettingsT|null = null, + public modelSettings: ModelSettingsT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const steamVrTrackers = (this.steamVrTrackers !== null ? this.steamVrTrackers!.pack(builder) : 0); + const filtering = (this.filtering !== null ? this.filtering!.pack(builder) : 0); + const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); + + ChangeSettingsRequest.startChangeSettingsRequest(builder); + ChangeSettingsRequest.addSteamVrTrackers(builder, steamVrTrackers); + ChangeSettingsRequest.addFiltering(builder, filtering); + ChangeSettingsRequest.addModelSettings(builder, modelSettings); + + return ChangeSettingsRequest.endChangeSettingsRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/change-skeleton-config-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/change-skeleton-config-request.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/rpc/change-skeleton-config-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/change-skeleton-config-request.ts index e90bc7ed..7ecaeaa5 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/change-skeleton-config-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/change-skeleton-config-request.ts @@ -1,87 +1,87 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SkeletonBone } from '../../solarxr-protocol/rpc/skeleton-bone'; - - -export class ChangeSkeletonConfigRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ChangeSkeletonConfigRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsChangeSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSkeletonConfigRequest):ChangeSkeletonConfigRequest { - return (obj || new ChangeSkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsChangeSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSkeletonConfigRequest):ChangeSkeletonConfigRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ChangeSkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -bone():SkeletonBone { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : SkeletonBone.NONE; -} - -value():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -static startChangeSkeletonConfigRequest(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addBone(builder:flatbuffers.Builder, bone:SkeletonBone) { - builder.addFieldInt8(0, bone, SkeletonBone.NONE); -} - -static addValue(builder:flatbuffers.Builder, value:number) { - builder.addFieldFloat32(1, value, 0.0); -} - -static endChangeSkeletonConfigRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createChangeSkeletonConfigRequest(builder:flatbuffers.Builder, bone:SkeletonBone, value:number):flatbuffers.Offset { - ChangeSkeletonConfigRequest.startChangeSkeletonConfigRequest(builder); - ChangeSkeletonConfigRequest.addBone(builder, bone); - ChangeSkeletonConfigRequest.addValue(builder, value); - return ChangeSkeletonConfigRequest.endChangeSkeletonConfigRequest(builder); -} - -unpack(): ChangeSkeletonConfigRequestT { - return new ChangeSkeletonConfigRequestT( - this.bone(), - this.value() - ); -} - - -unpackTo(_o: ChangeSkeletonConfigRequestT): void { - _o.bone = this.bone(); - _o.value = this.value(); -} -} - -export class ChangeSkeletonConfigRequestT { -constructor( - public bone: SkeletonBone = SkeletonBone.NONE, - public value: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ChangeSkeletonConfigRequest.createChangeSkeletonConfigRequest(builder, - this.bone, - this.value - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { SkeletonBone } from '../../solarxr_protocol/rpc/skeleton-bone'; + + +export class ChangeSkeletonConfigRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ChangeSkeletonConfigRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsChangeSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSkeletonConfigRequest):ChangeSkeletonConfigRequest { + return (obj || new ChangeSkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsChangeSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:ChangeSkeletonConfigRequest):ChangeSkeletonConfigRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ChangeSkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +bone():SkeletonBone { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : SkeletonBone.NONE; +} + +value():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startChangeSkeletonConfigRequest(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addBone(builder:flatbuffers.Builder, bone:SkeletonBone) { + builder.addFieldInt8(0, bone, SkeletonBone.NONE); +} + +static addValue(builder:flatbuffers.Builder, value:number) { + builder.addFieldFloat32(1, value, 0.0); +} + +static endChangeSkeletonConfigRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createChangeSkeletonConfigRequest(builder:flatbuffers.Builder, bone:SkeletonBone, value:number):flatbuffers.Offset { + ChangeSkeletonConfigRequest.startChangeSkeletonConfigRequest(builder); + ChangeSkeletonConfigRequest.addBone(builder, bone); + ChangeSkeletonConfigRequest.addValue(builder, value); + return ChangeSkeletonConfigRequest.endChangeSkeletonConfigRequest(builder); +} + +unpack(): ChangeSkeletonConfigRequestT { + return new ChangeSkeletonConfigRequestT( + this.bone(), + this.value() + ); +} + + +unpackTo(_o: ChangeSkeletonConfigRequestT): void { + _o.bone = this.bone(); + _o.value = this.value(); +} +} + +export class ChangeSkeletonConfigRequestT { +constructor( + public bone: SkeletonBone = SkeletonBone.NONE, + public value: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ChangeSkeletonConfigRequest.createChangeSkeletonConfigRequest(builder, + this.bone, + this.value + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/close-serial-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/close-serial-request.ts index 0ef83758..c05b5bf4 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/close-serial-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class CloseSerialRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):CloseSerialRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsCloseSerialRequest(bb:flatbuffers.ByteBuffer, obj?:CloseSerialRequest):CloseSerialRequest { - return (obj || new CloseSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsCloseSerialRequest(bb:flatbuffers.ByteBuffer, obj?:CloseSerialRequest):CloseSerialRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new CloseSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startCloseSerialRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endCloseSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createCloseSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - CloseSerialRequest.startCloseSerialRequest(builder); - return CloseSerialRequest.endCloseSerialRequest(builder); -} - -unpack(): CloseSerialRequestT { - return new CloseSerialRequestT(); -} - - -unpackTo(_o: CloseSerialRequestT): void {} -} - -export class CloseSerialRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return CloseSerialRequest.createCloseSerialRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class CloseSerialRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):CloseSerialRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsCloseSerialRequest(bb:flatbuffers.ByteBuffer, obj?:CloseSerialRequest):CloseSerialRequest { + return (obj || new CloseSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsCloseSerialRequest(bb:flatbuffers.ByteBuffer, obj?:CloseSerialRequest):CloseSerialRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new CloseSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startCloseSerialRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endCloseSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createCloseSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + CloseSerialRequest.startCloseSerialRequest(builder); + return CloseSerialRequest.endCloseSerialRequest(builder); +} + +unpack(): CloseSerialRequestT { + return new CloseSerialRequestT(); +} + + +unpackTo(_o: CloseSerialRequestT): void {} +} + +export class CloseSerialRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return CloseSerialRequest.createCloseSerialRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts b/protocol/typescript/src/solarxr_protocol/rpc/filtering-settings.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts rename to protocol/typescript/src/solarxr_protocol/rpc/filtering-settings.ts index 39547ed8..46d3c513 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/filtering-settings.ts @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { FilteringType } from '../../solarxr-protocol/datatypes/filtering-type'; - - -export class FilteringSettings { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):FilteringSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsFilteringSettings(bb:flatbuffers.ByteBuffer, obj?:FilteringSettings):FilteringSettings { - return (obj || new FilteringSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsFilteringSettings(bb:flatbuffers.ByteBuffer, obj?:FilteringSettings):FilteringSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new FilteringSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -type():FilteringType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : FilteringType.NONE; -} - -/** - * 0 to 1. A higher value results in more smoothing or prediction - */ -amount():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -static startFilteringSettings(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addType(builder:flatbuffers.Builder, type:FilteringType) { - builder.addFieldInt8(0, type, FilteringType.NONE); -} - -static addAmount(builder:flatbuffers.Builder, amount:number) { - builder.addFieldFloat32(1, amount, 0.0); -} - -static endFilteringSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createFilteringSettings(builder:flatbuffers.Builder, type:FilteringType, amount:number):flatbuffers.Offset { - FilteringSettings.startFilteringSettings(builder); - FilteringSettings.addType(builder, type); - FilteringSettings.addAmount(builder, amount); - return FilteringSettings.endFilteringSettings(builder); -} - -unpack(): FilteringSettingsT { - return new FilteringSettingsT( - this.type(), - this.amount() - ); -} - - -unpackTo(_o: FilteringSettingsT): void { - _o.type = this.type(); - _o.amount = this.amount(); -} -} - -export class FilteringSettingsT { -constructor( - public type: FilteringType = FilteringType.NONE, - public amount: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return FilteringSettings.createFilteringSettings(builder, - this.type, - this.amount - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { FilteringType } from '../../solarxr_protocol/datatypes/filtering-type'; + + +export class FilteringSettings { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):FilteringSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsFilteringSettings(bb:flatbuffers.ByteBuffer, obj?:FilteringSettings):FilteringSettings { + return (obj || new FilteringSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsFilteringSettings(bb:flatbuffers.ByteBuffer, obj?:FilteringSettings):FilteringSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new FilteringSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +type():FilteringType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : FilteringType.NONE; +} + +/** + * 0 to 1. A higher value results in more smoothing or prediction + */ +amount():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startFilteringSettings(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addType(builder:flatbuffers.Builder, type:FilteringType) { + builder.addFieldInt8(0, type, FilteringType.NONE); +} + +static addAmount(builder:flatbuffers.Builder, amount:number) { + builder.addFieldFloat32(1, amount, 0.0); +} + +static endFilteringSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createFilteringSettings(builder:flatbuffers.Builder, type:FilteringType, amount:number):flatbuffers.Offset { + FilteringSettings.startFilteringSettings(builder); + FilteringSettings.addType(builder, type); + FilteringSettings.addAmount(builder, amount); + return FilteringSettings.endFilteringSettings(builder); +} + +unpack(): FilteringSettingsT { + return new FilteringSettingsT( + this.type(), + this.amount() + ); +} + + +unpackTo(_o: FilteringSettingsT): void { + _o.type = this.type(); + _o.amount = this.amount(); +} +} + +export class FilteringSettingsT { +constructor( + public type: FilteringType = FilteringType.NONE, + public amount: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return FilteringSettings.createFilteringSettings(builder, + this.type, + this.amount + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/heartbeat-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/heartbeat-request.ts index 5cae5b3f..04dcd838 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/heartbeat-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class HeartbeatRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):HeartbeatRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsHeartbeatRequest(bb:flatbuffers.ByteBuffer, obj?:HeartbeatRequest):HeartbeatRequest { - return (obj || new HeartbeatRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsHeartbeatRequest(bb:flatbuffers.ByteBuffer, obj?:HeartbeatRequest):HeartbeatRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new HeartbeatRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startHeartbeatRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endHeartbeatRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createHeartbeatRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - HeartbeatRequest.startHeartbeatRequest(builder); - return HeartbeatRequest.endHeartbeatRequest(builder); -} - -unpack(): HeartbeatRequestT { - return new HeartbeatRequestT(); -} - - -unpackTo(_o: HeartbeatRequestT): void {} -} - -export class HeartbeatRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return HeartbeatRequest.createHeartbeatRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class HeartbeatRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):HeartbeatRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsHeartbeatRequest(bb:flatbuffers.ByteBuffer, obj?:HeartbeatRequest):HeartbeatRequest { + return (obj || new HeartbeatRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsHeartbeatRequest(bb:flatbuffers.ByteBuffer, obj?:HeartbeatRequest):HeartbeatRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new HeartbeatRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startHeartbeatRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endHeartbeatRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createHeartbeatRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + HeartbeatRequest.startHeartbeatRequest(builder); + return HeartbeatRequest.endHeartbeatRequest(builder); +} + +unpack(): HeartbeatRequestT { + return new HeartbeatRequestT(); +} + + +unpackTo(_o: HeartbeatRequestT): void {} +} + +export class HeartbeatRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HeartbeatRequest.createHeartbeatRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/heartbeat-response.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/heartbeat-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/heartbeat-response.ts index bd44fd64..3fc40088 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/heartbeat-response.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class HeartbeatResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):HeartbeatResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsHeartbeatResponse(bb:flatbuffers.ByteBuffer, obj?:HeartbeatResponse):HeartbeatResponse { - return (obj || new HeartbeatResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsHeartbeatResponse(bb:flatbuffers.ByteBuffer, obj?:HeartbeatResponse):HeartbeatResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new HeartbeatResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startHeartbeatResponse(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endHeartbeatResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createHeartbeatResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - HeartbeatResponse.startHeartbeatResponse(builder); - return HeartbeatResponse.endHeartbeatResponse(builder); -} - -unpack(): HeartbeatResponseT { - return new HeartbeatResponseT(); -} - - -unpackTo(_o: HeartbeatResponseT): void {} -} - -export class HeartbeatResponseT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return HeartbeatResponse.createHeartbeatResponse(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class HeartbeatResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):HeartbeatResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsHeartbeatResponse(bb:flatbuffers.ByteBuffer, obj?:HeartbeatResponse):HeartbeatResponse { + return (obj || new HeartbeatResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsHeartbeatResponse(bb:flatbuffers.ByteBuffer, obj?:HeartbeatResponse):HeartbeatResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new HeartbeatResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startHeartbeatResponse(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endHeartbeatResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createHeartbeatResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + HeartbeatResponse.startHeartbeatResponse(builder); + return HeartbeatResponse.endHeartbeatResponse(builder); +} + +unpack(): HeartbeatResponseT { + return new HeartbeatResponseT(); +} + + +unpackTo(_o: HeartbeatResponseT): void {} +} + +export class HeartbeatResponseT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return HeartbeatResponse.createHeartbeatResponse(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/open-serial-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/open-serial-request.ts index 159cd3e5..2816e024 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/open-serial-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class OpenSerialRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):OpenSerialRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOpenSerialRequest(bb:flatbuffers.ByteBuffer, obj?:OpenSerialRequest):OpenSerialRequest { - return (obj || new OpenSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOpenSerialRequest(bb:flatbuffers.ByteBuffer, obj?:OpenSerialRequest):OpenSerialRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OpenSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startOpenSerialRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endOpenSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOpenSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - OpenSerialRequest.startOpenSerialRequest(builder); - return OpenSerialRequest.endOpenSerialRequest(builder); -} - -unpack(): OpenSerialRequestT { - return new OpenSerialRequestT(); -} - - -unpackTo(_o: OpenSerialRequestT): void {} -} - -export class OpenSerialRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return OpenSerialRequest.createOpenSerialRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class OpenSerialRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):OpenSerialRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOpenSerialRequest(bb:flatbuffers.ByteBuffer, obj?:OpenSerialRequest):OpenSerialRequest { + return (obj || new OpenSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOpenSerialRequest(bb:flatbuffers.ByteBuffer, obj?:OpenSerialRequest):OpenSerialRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OpenSerialRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startOpenSerialRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endOpenSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOpenSerialRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + OpenSerialRequest.startOpenSerialRequest(builder); + return OpenSerialRequest.endOpenSerialRequest(builder); +} + +unpack(): OpenSerialRequestT { + return new OpenSerialRequestT(); +} + + +unpackTo(_o: OpenSerialRequestT): void {} +} + +export class OpenSerialRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return OpenSerialRequest.createOpenSerialRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-change-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-change-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-change-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-change-request.ts index 4ef8c2f7..cd856334 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-change-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-change-request.ts @@ -1,91 +1,91 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Changes the state of the overlay's display mode. - */ -export class OverlayDisplayModeChangeRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):OverlayDisplayModeChangeRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOverlayDisplayModeChangeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeChangeRequest):OverlayDisplayModeChangeRequest { - return (obj || new OverlayDisplayModeChangeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOverlayDisplayModeChangeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeChangeRequest):OverlayDisplayModeChangeRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OverlayDisplayModeChangeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -isVisible():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -isMirrored():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -static startOverlayDisplayModeChangeRequest(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addIsVisible(builder:flatbuffers.Builder, isVisible:boolean) { - builder.addFieldInt8(0, +isVisible, 0); -} - -static addIsMirrored(builder:flatbuffers.Builder, isMirrored:boolean) { - builder.addFieldInt8(1, +isMirrored, 0); -} - -static endOverlayDisplayModeChangeRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOverlayDisplayModeChangeRequest(builder:flatbuffers.Builder, isVisible:boolean|null, isMirrored:boolean|null):flatbuffers.Offset { - OverlayDisplayModeChangeRequest.startOverlayDisplayModeChangeRequest(builder); - if (isVisible !== null) - OverlayDisplayModeChangeRequest.addIsVisible(builder, isVisible); - if (isMirrored !== null) - OverlayDisplayModeChangeRequest.addIsMirrored(builder, isMirrored); - return OverlayDisplayModeChangeRequest.endOverlayDisplayModeChangeRequest(builder); -} - -unpack(): OverlayDisplayModeChangeRequestT { - return new OverlayDisplayModeChangeRequestT( - this.isVisible(), - this.isMirrored() - ); -} - - -unpackTo(_o: OverlayDisplayModeChangeRequestT): void { - _o.isVisible = this.isVisible(); - _o.isMirrored = this.isMirrored(); -} -} - -export class OverlayDisplayModeChangeRequestT { -constructor( - public isVisible: boolean|null = null, - public isMirrored: boolean|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return OverlayDisplayModeChangeRequest.createOverlayDisplayModeChangeRequest(builder, - this.isVisible, - this.isMirrored - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Changes the state of the overlay's display mode. + */ +export class OverlayDisplayModeChangeRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):OverlayDisplayModeChangeRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOverlayDisplayModeChangeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeChangeRequest):OverlayDisplayModeChangeRequest { + return (obj || new OverlayDisplayModeChangeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOverlayDisplayModeChangeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeChangeRequest):OverlayDisplayModeChangeRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OverlayDisplayModeChangeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +isVisible():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +isMirrored():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +static startOverlayDisplayModeChangeRequest(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addIsVisible(builder:flatbuffers.Builder, isVisible:boolean) { + builder.addFieldInt8(0, +isVisible, 0); +} + +static addIsMirrored(builder:flatbuffers.Builder, isMirrored:boolean) { + builder.addFieldInt8(1, +isMirrored, 0); +} + +static endOverlayDisplayModeChangeRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOverlayDisplayModeChangeRequest(builder:flatbuffers.Builder, isVisible:boolean|null, isMirrored:boolean|null):flatbuffers.Offset { + OverlayDisplayModeChangeRequest.startOverlayDisplayModeChangeRequest(builder); + if (isVisible !== null) + OverlayDisplayModeChangeRequest.addIsVisible(builder, isVisible); + if (isMirrored !== null) + OverlayDisplayModeChangeRequest.addIsMirrored(builder, isMirrored); + return OverlayDisplayModeChangeRequest.endOverlayDisplayModeChangeRequest(builder); +} + +unpack(): OverlayDisplayModeChangeRequestT { + return new OverlayDisplayModeChangeRequestT( + this.isVisible(), + this.isMirrored() + ); +} + + +unpackTo(_o: OverlayDisplayModeChangeRequestT): void { + _o.isVisible = this.isVisible(); + _o.isMirrored = this.isMirrored(); +} +} + +export class OverlayDisplayModeChangeRequestT { +constructor( + public isVisible: boolean|null = null, + public isMirrored: boolean|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return OverlayDisplayModeChangeRequest.createOverlayDisplayModeChangeRequest(builder, + this.isVisible, + this.isMirrored + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-request.ts index 9a150ee5..47652595 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-request.ts @@ -1,57 +1,57 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Requests the current state of `OverlayDisplayModeResponse`. - */ -export class OverlayDisplayModeRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):OverlayDisplayModeRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOverlayDisplayModeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeRequest):OverlayDisplayModeRequest { - return (obj || new OverlayDisplayModeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOverlayDisplayModeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeRequest):OverlayDisplayModeRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OverlayDisplayModeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startOverlayDisplayModeRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endOverlayDisplayModeRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOverlayDisplayModeRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - OverlayDisplayModeRequest.startOverlayDisplayModeRequest(builder); - return OverlayDisplayModeRequest.endOverlayDisplayModeRequest(builder); -} - -unpack(): OverlayDisplayModeRequestT { - return new OverlayDisplayModeRequestT(); -} - - -unpackTo(_o: OverlayDisplayModeRequestT): void {} -} - -export class OverlayDisplayModeRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return OverlayDisplayModeRequest.createOverlayDisplayModeRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Requests the current state of `OverlayDisplayModeResponse`. + */ +export class OverlayDisplayModeRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):OverlayDisplayModeRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOverlayDisplayModeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeRequest):OverlayDisplayModeRequest { + return (obj || new OverlayDisplayModeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOverlayDisplayModeRequest(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeRequest):OverlayDisplayModeRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OverlayDisplayModeRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startOverlayDisplayModeRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endOverlayDisplayModeRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOverlayDisplayModeRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + OverlayDisplayModeRequest.startOverlayDisplayModeRequest(builder); + return OverlayDisplayModeRequest.endOverlayDisplayModeRequest(builder); +} + +unpack(): OverlayDisplayModeRequestT { + return new OverlayDisplayModeRequestT(); +} + + +unpackTo(_o: OverlayDisplayModeRequestT): void {} +} + +export class OverlayDisplayModeRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return OverlayDisplayModeRequest.createOverlayDisplayModeRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-response.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-response.ts index 5af89354..5f62a5a6 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-response.ts @@ -1,89 +1,89 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * The current state of the overlay's display mode. - */ -export class OverlayDisplayModeResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):OverlayDisplayModeResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsOverlayDisplayModeResponse(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeResponse):OverlayDisplayModeResponse { - return (obj || new OverlayDisplayModeResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsOverlayDisplayModeResponse(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeResponse):OverlayDisplayModeResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new OverlayDisplayModeResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -isVisible():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -isMirrored():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startOverlayDisplayModeResponse(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addIsVisible(builder:flatbuffers.Builder, isVisible:boolean) { - builder.addFieldInt8(0, +isVisible, +false); -} - -static addIsMirrored(builder:flatbuffers.Builder, isMirrored:boolean) { - builder.addFieldInt8(1, +isMirrored, +false); -} - -static endOverlayDisplayModeResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createOverlayDisplayModeResponse(builder:flatbuffers.Builder, isVisible:boolean, isMirrored:boolean):flatbuffers.Offset { - OverlayDisplayModeResponse.startOverlayDisplayModeResponse(builder); - OverlayDisplayModeResponse.addIsVisible(builder, isVisible); - OverlayDisplayModeResponse.addIsMirrored(builder, isMirrored); - return OverlayDisplayModeResponse.endOverlayDisplayModeResponse(builder); -} - -unpack(): OverlayDisplayModeResponseT { - return new OverlayDisplayModeResponseT( - this.isVisible(), - this.isMirrored() - ); -} - - -unpackTo(_o: OverlayDisplayModeResponseT): void { - _o.isVisible = this.isVisible(); - _o.isMirrored = this.isMirrored(); -} -} - -export class OverlayDisplayModeResponseT { -constructor( - public isVisible: boolean = false, - public isMirrored: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return OverlayDisplayModeResponse.createOverlayDisplayModeResponse(builder, - this.isVisible, - this.isMirrored - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * The current state of the overlay's display mode. + */ +export class OverlayDisplayModeResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):OverlayDisplayModeResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsOverlayDisplayModeResponse(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeResponse):OverlayDisplayModeResponse { + return (obj || new OverlayDisplayModeResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsOverlayDisplayModeResponse(bb:flatbuffers.ByteBuffer, obj?:OverlayDisplayModeResponse):OverlayDisplayModeResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new OverlayDisplayModeResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +isVisible():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +isMirrored():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startOverlayDisplayModeResponse(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addIsVisible(builder:flatbuffers.Builder, isVisible:boolean) { + builder.addFieldInt8(0, +isVisible, +false); +} + +static addIsMirrored(builder:flatbuffers.Builder, isMirrored:boolean) { + builder.addFieldInt8(1, +isMirrored, +false); +} + +static endOverlayDisplayModeResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createOverlayDisplayModeResponse(builder:flatbuffers.Builder, isVisible:boolean, isMirrored:boolean):flatbuffers.Offset { + OverlayDisplayModeResponse.startOverlayDisplayModeResponse(builder); + OverlayDisplayModeResponse.addIsVisible(builder, isVisible); + OverlayDisplayModeResponse.addIsMirrored(builder, isMirrored); + return OverlayDisplayModeResponse.endOverlayDisplayModeResponse(builder); +} + +unpack(): OverlayDisplayModeResponseT { + return new OverlayDisplayModeResponseT( + this.isVisible(), + this.isMirrored() + ); +} + + +unpackTo(_o: OverlayDisplayModeResponseT): void { + _o.isVisible = this.isVisible(); + _o.isMirrored = this.isMirrored(); +} +} + +export class OverlayDisplayModeResponseT { +constructor( + public isVisible: boolean = false, + public isMirrored: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return OverlayDisplayModeResponse.createOverlayDisplayModeResponse(builder, + this.isVisible, + this.isMirrored + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts b/protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts rename to protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-request.ts index 56f3edd9..5153e27a 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-request.ts @@ -1,72 +1,72 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class RecordBVHRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):RecordBVHRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsRecordBVHRequest(bb:flatbuffers.ByteBuffer, obj?:RecordBVHRequest):RecordBVHRequest { - return (obj || new RecordBVHRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsRecordBVHRequest(bb:flatbuffers.ByteBuffer, obj?:RecordBVHRequest):RecordBVHRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new RecordBVHRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -stop():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startRecordBVHRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addStop(builder:flatbuffers.Builder, stop:boolean) { - builder.addFieldInt8(0, +stop, +false); -} - -static endRecordBVHRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createRecordBVHRequest(builder:flatbuffers.Builder, stop:boolean):flatbuffers.Offset { - RecordBVHRequest.startRecordBVHRequest(builder); - RecordBVHRequest.addStop(builder, stop); - return RecordBVHRequest.endRecordBVHRequest(builder); -} - -unpack(): RecordBVHRequestT { - return new RecordBVHRequestT( - this.stop() - ); -} - - -unpackTo(_o: RecordBVHRequestT): void { - _o.stop = this.stop(); -} -} - -export class RecordBVHRequestT { -constructor( - public stop: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return RecordBVHRequest.createRecordBVHRequest(builder, - this.stop - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class RecordBVHRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):RecordBVHRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsRecordBVHRequest(bb:flatbuffers.ByteBuffer, obj?:RecordBVHRequest):RecordBVHRequest { + return (obj || new RecordBVHRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsRecordBVHRequest(bb:flatbuffers.ByteBuffer, obj?:RecordBVHRequest):RecordBVHRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new RecordBVHRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +stop():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startRecordBVHRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addStop(builder:flatbuffers.Builder, stop:boolean) { + builder.addFieldInt8(0, +stop, +false); +} + +static endRecordBVHRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createRecordBVHRequest(builder:flatbuffers.Builder, stop:boolean):flatbuffers.Offset { + RecordBVHRequest.startRecordBVHRequest(builder); + RecordBVHRequest.addStop(builder, stop); + return RecordBVHRequest.endRecordBVHRequest(builder); +} + +unpack(): RecordBVHRequestT { + return new RecordBVHRequestT( + this.stop() + ); +} + + +unpackTo(_o: RecordBVHRequestT): void { + _o.stop = this.stop(); +} +} + +export class RecordBVHRequestT { +constructor( + public stop: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return RecordBVHRequest.createRecordBVHRequest(builder, + this.stop + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts b/protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-status.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts rename to protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-status.ts index 2582ef79..acc08264 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-status.ts @@ -1,72 +1,72 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class RecordBVHStatus { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):RecordBVHStatus { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsRecordBVHStatus(bb:flatbuffers.ByteBuffer, obj?:RecordBVHStatus):RecordBVHStatus { - return (obj || new RecordBVHStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsRecordBVHStatus(bb:flatbuffers.ByteBuffer, obj?:RecordBVHStatus):RecordBVHStatus { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new RecordBVHStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -recording():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startRecordBVHStatus(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addRecording(builder:flatbuffers.Builder, recording:boolean) { - builder.addFieldInt8(0, +recording, +false); -} - -static endRecordBVHStatus(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createRecordBVHStatus(builder:flatbuffers.Builder, recording:boolean):flatbuffers.Offset { - RecordBVHStatus.startRecordBVHStatus(builder); - RecordBVHStatus.addRecording(builder, recording); - return RecordBVHStatus.endRecordBVHStatus(builder); -} - -unpack(): RecordBVHStatusT { - return new RecordBVHStatusT( - this.recording() - ); -} - - -unpackTo(_o: RecordBVHStatusT): void { - _o.recording = this.recording(); -} -} - -export class RecordBVHStatusT { -constructor( - public recording: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return RecordBVHStatus.createRecordBVHStatus(builder, - this.recording - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class RecordBVHStatus { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):RecordBVHStatus { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsRecordBVHStatus(bb:flatbuffers.ByteBuffer, obj?:RecordBVHStatus):RecordBVHStatus { + return (obj || new RecordBVHStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsRecordBVHStatus(bb:flatbuffers.ByteBuffer, obj?:RecordBVHStatus):RecordBVHStatus { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new RecordBVHStatus()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +recording():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startRecordBVHStatus(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addRecording(builder:flatbuffers.Builder, recording:boolean) { + builder.addFieldInt8(0, +recording, +false); +} + +static endRecordBVHStatus(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createRecordBVHStatus(builder:flatbuffers.Builder, recording:boolean):flatbuffers.Offset { + RecordBVHStatus.startRecordBVHStatus(builder); + RecordBVHStatus.addRecording(builder, recording); + return RecordBVHStatus.endRecordBVHStatus(builder); +} + +unpack(): RecordBVHStatusT { + return new RecordBVHStatusT( + this.recording() + ); +} + + +unpackTo(_o: RecordBVHStatusT): void { + _o.recording = this.recording(); +} +} + +export class RecordBVHStatusT { +constructor( + public recording: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return RecordBVHStatus.createRecordBVHStatus(builder, + this.recording + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/reset-request.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/rpc/reset-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/reset-request.ts index a64ec39f..cd36093a 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/reset-request.ts @@ -1,73 +1,73 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { ResetType } from '../../solarxr-protocol/rpc/reset-type'; - - -export class ResetRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ResetRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsResetRequest(bb:flatbuffers.ByteBuffer, obj?:ResetRequest):ResetRequest { - return (obj || new ResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsResetRequest(bb:flatbuffers.ByteBuffer, obj?:ResetRequest):ResetRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -resetType():ResetType { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : ResetType.Quick; -} - -static startResetRequest(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addResetType(builder:flatbuffers.Builder, resetType:ResetType) { - builder.addFieldInt8(0, resetType, ResetType.Quick); -} - -static endResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createResetRequest(builder:flatbuffers.Builder, resetType:ResetType):flatbuffers.Offset { - ResetRequest.startResetRequest(builder); - ResetRequest.addResetType(builder, resetType); - return ResetRequest.endResetRequest(builder); -} - -unpack(): ResetRequestT { - return new ResetRequestT( - this.resetType() - ); -} - - -unpackTo(_o: ResetRequestT): void { - _o.resetType = this.resetType(); -} -} - -export class ResetRequestT { -constructor( - public resetType: ResetType = ResetType.Quick -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ResetRequest.createResetRequest(builder, - this.resetType - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { ResetType } from '../../solarxr_protocol/rpc/reset-type'; + + +export class ResetRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ResetRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsResetRequest(bb:flatbuffers.ByteBuffer, obj?:ResetRequest):ResetRequest { + return (obj || new ResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsResetRequest(bb:flatbuffers.ByteBuffer, obj?:ResetRequest):ResetRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ResetRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +resetType():ResetType { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : ResetType.Quick; +} + +static startResetRequest(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addResetType(builder:flatbuffers.Builder, resetType:ResetType) { + builder.addFieldInt8(0, resetType, ResetType.Quick); +} + +static endResetRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createResetRequest(builder:flatbuffers.Builder, resetType:ResetType):flatbuffers.Offset { + ResetRequest.startResetRequest(builder); + ResetRequest.addResetType(builder, resetType); + return ResetRequest.endResetRequest(builder); +} + +unpack(): ResetRequestT { + return new ResetRequestT( + this.resetType() + ); +} + + +unpackTo(_o: ResetRequestT): void { + _o.resetType = this.resetType(); +} +} + +export class ResetRequestT { +constructor( + public resetType: ResetType = ResetType.Quick +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ResetRequest.createResetRequest(builder, + this.resetType + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/reset-response.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/reset-response.ts index 1d0f766d..7051f542 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/reset-response.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class ResetResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ResetResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsResetResponse(bb:flatbuffers.ByteBuffer, obj?:ResetResponse):ResetResponse { - return (obj || new ResetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsResetResponse(bb:flatbuffers.ByteBuffer, obj?:ResetResponse):ResetResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ResetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startResetResponse(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endResetResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createResetResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - ResetResponse.startResetResponse(builder); - return ResetResponse.endResetResponse(builder); -} - -unpack(): ResetResponseT { - return new ResetResponseT(); -} - - -unpackTo(_o: ResetResponseT): void {} -} - -export class ResetResponseT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ResetResponse.createResetResponse(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class ResetResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ResetResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsResetResponse(bb:flatbuffers.ByteBuffer, obj?:ResetResponse):ResetResponse { + return (obj || new ResetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsResetResponse(bb:flatbuffers.ByteBuffer, obj?:ResetResponse):ResetResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ResetResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startResetResponse(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endResetResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createResetResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + ResetResponse.startResetResponse(builder); + return ResetResponse.endResetResponse(builder); +} + +unpack(): ResetResponseT { + return new ResetResponseT(); +} + + +unpackTo(_o: ResetResponseT): void {} +} + +export class ResetResponseT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ResetResponse.createResetResponse(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts b/protocol/typescript/src/solarxr_protocol/rpc/reset-type.ts similarity index 94% rename from protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts rename to protocol/typescript/src/solarxr_protocol/rpc/reset-type.ts index df8e5424..e45d16aa 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/reset-type.ts @@ -1,13 +1,13 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum ResetType{ - Quick = 0, - Full = 1, - Recalibrate = 2, - - /** - * Second pose for calibrating mounting rotation - */ - Mounting = 3 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +export enum ResetType{ + Quick = 0, + Full = 1, + Recalibrate = 2, + + /** + * Second pose for calibrating mounting rotation + */ + Mounting = 3 +} + diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts b/protocol/typescript/src/solarxr_protocol/rpc/rpc-message-header.ts similarity index 78% rename from protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts rename to protocol/typescript/src/solarxr_protocol/rpc/rpc-message-header.ts index 8057ed5e..a569533f 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/rpc-message-header.ts @@ -1,142 +1,142 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TransactionId, TransactionIdT } from '../../solarxr-protocol/datatypes/transaction-id'; -import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request'; -import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response'; -import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request'; -import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response'; -import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request'; -import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request'; -import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request'; -import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request'; -import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response'; -import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request'; -import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request'; -import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request'; -import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response'; -import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest'; -import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus'; -import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request'; -import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr-protocol/rpc/rpc-message'; -import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request'; -import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request'; -import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request'; -import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response'; -import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request'; -import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request'; -import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response'; -import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request'; -import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response'; -import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request'; - - -export class RpcMessageHeader { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):RpcMessageHeader { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsRpcMessageHeader(bb:flatbuffers.ByteBuffer, obj?:RpcMessageHeader):RpcMessageHeader { - return (obj || new RpcMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsRpcMessageHeader(bb:flatbuffers.ByteBuffer, obj?:RpcMessageHeader):RpcMessageHeader { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new RpcMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -/** - * For a request, this identifies the request. For a response, this corresponds - * to the request that it is responding to. - */ -txId(obj?:TransactionId):TransactionId|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new TransactionId()).__init(this.bb_pos + offset, this.bb!) : null; -} - -messageType():RpcMessage { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : RpcMessage.NONE; -} - -message(obj:any):any|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; -} - -static startRpcMessageHeader(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -static addTxId(builder:flatbuffers.Builder, txIdOffset:flatbuffers.Offset) { - builder.addFieldStruct(0, txIdOffset, 0); -} - -static addMessageType(builder:flatbuffers.Builder, messageType:RpcMessage) { - builder.addFieldInt8(1, messageType, RpcMessage.NONE); -} - -static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, messageOffset, 0); -} - -static endRpcMessageHeader(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createRpcMessageHeader(builder:flatbuffers.Builder, txIdOffset:flatbuffers.Offset, messageType:RpcMessage, messageOffset:flatbuffers.Offset):flatbuffers.Offset { - RpcMessageHeader.startRpcMessageHeader(builder); - RpcMessageHeader.addTxId(builder, txIdOffset); - RpcMessageHeader.addMessageType(builder, messageType); - RpcMessageHeader.addMessage(builder, messageOffset); - return RpcMessageHeader.endRpcMessageHeader(builder); -} - -unpack(): RpcMessageHeaderT { - return new RpcMessageHeaderT( - (this.txId() !== null ? this.txId()!.unpack() : null), - this.messageType(), - (() => { - let temp = unionToRpcMessage(this.messageType(), this.message.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })() - ); -} - - -unpackTo(_o: RpcMessageHeaderT): void { - _o.txId = (this.txId() !== null ? this.txId()!.unpack() : null); - _o.messageType = this.messageType(); - _o.message = (() => { - let temp = unionToRpcMessage(this.messageType(), this.message.bind(this)); - if(temp === null) { return null; } - return temp.unpack() - })(); -} -} - -export class RpcMessageHeaderT { -constructor( - public txId: TransactionIdT|null = null, - public messageType: RpcMessage = RpcMessage.NONE, - public message: AssignTrackerRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const message = builder.createObjectOffset(this.message); - - return RpcMessageHeader.createRpcMessageHeader(builder, - (this.txId !== null ? this.txId!.pack(builder) : 0), - this.messageType, - message - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TransactionId, TransactionIdT } from '../../solarxr_protocol/datatypes/transaction-id'; +import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr_protocol/rpc/assign-tracker-request'; +import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr_protocol/rpc/auto-bone-epoch-response'; +import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr_protocol/rpc/auto-bone-process-request'; +import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr_protocol/rpc/auto-bone-process-status-response'; +import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr_protocol/rpc/change-settings-request'; +import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr_protocol/rpc/change-skeleton-config-request'; +import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr_protocol/rpc/close-serial-request'; +import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr_protocol/rpc/heartbeat-request'; +import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr_protocol/rpc/heartbeat-response'; +import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr_protocol/rpc/open-serial-request'; +import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-change-request'; +import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-request'; +import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr_protocol/rpc/overlay-display-mode-response'; +import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr_protocol/rpc/record-b-v-h-request'; +import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr_protocol/rpc/record-b-v-h-status'; +import { ResetRequest, ResetRequestT } from '../../solarxr_protocol/rpc/reset-request'; +import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr_protocol/rpc/rpc-message'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr_protocol/rpc/serial-tracker-factory-reset-request'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr_protocol/rpc/serial-tracker-get-info-request'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr_protocol/rpc/serial-tracker-reboot-request'; +import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr_protocol/rpc/serial-update-response'; +import { SetWifiRequest, SetWifiRequestT } from '../../solarxr_protocol/rpc/set-wifi-request'; +import { SettingsRequest, SettingsRequestT } from '../../solarxr_protocol/rpc/settings-request'; +import { SettingsResponse, SettingsResponseT } from '../../solarxr_protocol/rpc/settings-response'; +import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr_protocol/rpc/skeleton-config-request'; +import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr_protocol/rpc/skeleton-config-response'; +import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr_protocol/rpc/skeleton-reset-all-request'; + + +export class RpcMessageHeader { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):RpcMessageHeader { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsRpcMessageHeader(bb:flatbuffers.ByteBuffer, obj?:RpcMessageHeader):RpcMessageHeader { + return (obj || new RpcMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsRpcMessageHeader(bb:flatbuffers.ByteBuffer, obj?:RpcMessageHeader):RpcMessageHeader { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new RpcMessageHeader()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +/** + * For a request, this identifies the request. For a response, this corresponds + * to the request that it is responding to. + */ +txId(obj?:TransactionId):TransactionId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TransactionId()).__init(this.bb_pos + offset, this.bb!) : null; +} + +messageType():RpcMessage { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : RpcMessage.NONE; +} + +message(obj:any):any|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.__union(obj, this.bb_pos + offset) : null; +} + +static startRpcMessageHeader(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addTxId(builder:flatbuffers.Builder, txIdOffset:flatbuffers.Offset) { + builder.addFieldStruct(0, txIdOffset, 0); +} + +static addMessageType(builder:flatbuffers.Builder, messageType:RpcMessage) { + builder.addFieldInt8(1, messageType, RpcMessage.NONE); +} + +static addMessage(builder:flatbuffers.Builder, messageOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, messageOffset, 0); +} + +static endRpcMessageHeader(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createRpcMessageHeader(builder:flatbuffers.Builder, txIdOffset:flatbuffers.Offset, messageType:RpcMessage, messageOffset:flatbuffers.Offset):flatbuffers.Offset { + RpcMessageHeader.startRpcMessageHeader(builder); + RpcMessageHeader.addTxId(builder, txIdOffset); + RpcMessageHeader.addMessageType(builder, messageType); + RpcMessageHeader.addMessage(builder, messageOffset); + return RpcMessageHeader.endRpcMessageHeader(builder); +} + +unpack(): RpcMessageHeaderT { + return new RpcMessageHeaderT( + (this.txId() !== null ? this.txId()!.unpack() : null), + this.messageType(), + (() => { + let temp = unionToRpcMessage(this.messageType(), this.message.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })() + ); +} + + +unpackTo(_o: RpcMessageHeaderT): void { + _o.txId = (this.txId() !== null ? this.txId()!.unpack() : null); + _o.messageType = this.messageType(); + _o.message = (() => { + let temp = unionToRpcMessage(this.messageType(), this.message.bind(this)); + if(temp === null) { return null; } + return temp.unpack() + })(); +} +} + +export class RpcMessageHeaderT { +constructor( + public txId: TransactionIdT|null = null, + public messageType: RpcMessage = RpcMessage.NONE, + public message: AssignTrackerRequestT|AutoBoneEpochResponseT|AutoBoneProcessRequestT|AutoBoneProcessStatusResponseT|ChangeSettingsRequestT|ChangeSkeletonConfigRequestT|CloseSerialRequestT|HeartbeatRequestT|HeartbeatResponseT|OpenSerialRequestT|OverlayDisplayModeChangeRequestT|OverlayDisplayModeRequestT|OverlayDisplayModeResponseT|RecordBVHRequestT|RecordBVHStatusT|ResetRequestT|SerialTrackerFactoryResetRequestT|SerialTrackerGetInfoRequestT|SerialTrackerRebootRequestT|SerialUpdateResponseT|SetWifiRequestT|SettingsRequestT|SettingsResponseT|SkeletonConfigRequestT|SkeletonConfigResponseT|SkeletonResetAllRequestT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const message = builder.createObjectOffset(this.message); + + return RpcMessageHeader.createRpcMessageHeader(builder, + (this.txId !== null ? this.txId!.pack(builder) : 0), + this.messageType, + message + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts b/protocol/typescript/src/solarxr_protocol/rpc/rpc-message.ts similarity index 89% rename from protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts rename to protocol/typescript/src/solarxr_protocol/rpc/rpc-message.ts index cf4842b7..a01c35da 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/rpc-message.ts @@ -1,133 +1,133 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request'; -import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response'; -import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request'; -import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response'; -import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request'; -import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request'; -import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request'; -import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request'; -import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response'; -import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request'; -import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request'; -import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request'; -import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response'; -import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest'; -import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus'; -import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request'; -import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request'; -import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request'; -import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request'; -import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response'; -import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request'; -import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request'; -import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response'; -import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request'; -import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response'; -import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request'; - - -export enum RpcMessage{ - NONE = 0, - HeartbeatRequest = 1, - HeartbeatResponse = 2, - ResetRequest = 3, - AssignTrackerRequest = 4, - SettingsRequest = 5, - SettingsResponse = 6, - ChangeSettingsRequest = 7, - RecordBVHRequest = 8, - RecordBVHStatus = 9, - SkeletonConfigRequest = 10, - ChangeSkeletonConfigRequest = 11, - SkeletonResetAllRequest = 12, - SkeletonConfigResponse = 13, - OpenSerialRequest = 14, - CloseSerialRequest = 15, - SetWifiRequest = 16, - SerialUpdateResponse = 17, - AutoBoneProcessRequest = 18, - AutoBoneProcessStatusResponse = 19, - AutoBoneEpochResponse = 20, - OverlayDisplayModeRequest = 21, - OverlayDisplayModeChangeRequest = 22, - OverlayDisplayModeResponse = 23, - SerialTrackerRebootRequest = 24, - SerialTrackerGetInfoRequest = 25, - SerialTrackerFactoryResetRequest = 26 -} - -export function unionToRpcMessage( - type: RpcMessage, - accessor: (obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null -): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { - switch(RpcMessage[type]) { - case 'NONE': return null; - case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; - case 'HeartbeatResponse': return accessor(new HeartbeatResponse())! as HeartbeatResponse; - case 'ResetRequest': return accessor(new ResetRequest())! as ResetRequest; - case 'AssignTrackerRequest': return accessor(new AssignTrackerRequest())! as AssignTrackerRequest; - case 'SettingsRequest': return accessor(new SettingsRequest())! as SettingsRequest; - case 'SettingsResponse': return accessor(new SettingsResponse())! as SettingsResponse; - case 'ChangeSettingsRequest': return accessor(new ChangeSettingsRequest())! as ChangeSettingsRequest; - case 'RecordBVHRequest': return accessor(new RecordBVHRequest())! as RecordBVHRequest; - case 'RecordBVHStatus': return accessor(new RecordBVHStatus())! as RecordBVHStatus; - case 'SkeletonConfigRequest': return accessor(new SkeletonConfigRequest())! as SkeletonConfigRequest; - case 'ChangeSkeletonConfigRequest': return accessor(new ChangeSkeletonConfigRequest())! as ChangeSkeletonConfigRequest; - case 'SkeletonResetAllRequest': return accessor(new SkeletonResetAllRequest())! as SkeletonResetAllRequest; - case 'SkeletonConfigResponse': return accessor(new SkeletonConfigResponse())! as SkeletonConfigResponse; - case 'OpenSerialRequest': return accessor(new OpenSerialRequest())! as OpenSerialRequest; - case 'CloseSerialRequest': return accessor(new CloseSerialRequest())! as CloseSerialRequest; - case 'SetWifiRequest': return accessor(new SetWifiRequest())! as SetWifiRequest; - case 'SerialUpdateResponse': return accessor(new SerialUpdateResponse())! as SerialUpdateResponse; - case 'AutoBoneProcessRequest': return accessor(new AutoBoneProcessRequest())! as AutoBoneProcessRequest; - case 'AutoBoneProcessStatusResponse': return accessor(new AutoBoneProcessStatusResponse())! as AutoBoneProcessStatusResponse; - case 'AutoBoneEpochResponse': return accessor(new AutoBoneEpochResponse())! as AutoBoneEpochResponse; - case 'OverlayDisplayModeRequest': return accessor(new OverlayDisplayModeRequest())! as OverlayDisplayModeRequest; - case 'OverlayDisplayModeChangeRequest': return accessor(new OverlayDisplayModeChangeRequest())! as OverlayDisplayModeChangeRequest; - case 'OverlayDisplayModeResponse': return accessor(new OverlayDisplayModeResponse())! as OverlayDisplayModeResponse; - case 'SerialTrackerRebootRequest': return accessor(new SerialTrackerRebootRequest())! as SerialTrackerRebootRequest; - case 'SerialTrackerGetInfoRequest': return accessor(new SerialTrackerGetInfoRequest())! as SerialTrackerGetInfoRequest; - case 'SerialTrackerFactoryResetRequest': return accessor(new SerialTrackerFactoryResetRequest())! as SerialTrackerFactoryResetRequest; - default: return null; - } -} - -export function unionListToRpcMessage( - type: RpcMessage, - accessor: (index: number, obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null, - index: number -): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { - switch(RpcMessage[type]) { - case 'NONE': return null; - case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; - case 'HeartbeatResponse': return accessor(index, new HeartbeatResponse())! as HeartbeatResponse; - case 'ResetRequest': return accessor(index, new ResetRequest())! as ResetRequest; - case 'AssignTrackerRequest': return accessor(index, new AssignTrackerRequest())! as AssignTrackerRequest; - case 'SettingsRequest': return accessor(index, new SettingsRequest())! as SettingsRequest; - case 'SettingsResponse': return accessor(index, new SettingsResponse())! as SettingsResponse; - case 'ChangeSettingsRequest': return accessor(index, new ChangeSettingsRequest())! as ChangeSettingsRequest; - case 'RecordBVHRequest': return accessor(index, new RecordBVHRequest())! as RecordBVHRequest; - case 'RecordBVHStatus': return accessor(index, new RecordBVHStatus())! as RecordBVHStatus; - case 'SkeletonConfigRequest': return accessor(index, new SkeletonConfigRequest())! as SkeletonConfigRequest; - case 'ChangeSkeletonConfigRequest': return accessor(index, new ChangeSkeletonConfigRequest())! as ChangeSkeletonConfigRequest; - case 'SkeletonResetAllRequest': return accessor(index, new SkeletonResetAllRequest())! as SkeletonResetAllRequest; - case 'SkeletonConfigResponse': return accessor(index, new SkeletonConfigResponse())! as SkeletonConfigResponse; - case 'OpenSerialRequest': return accessor(index, new OpenSerialRequest())! as OpenSerialRequest; - case 'CloseSerialRequest': return accessor(index, new CloseSerialRequest())! as CloseSerialRequest; - case 'SetWifiRequest': return accessor(index, new SetWifiRequest())! as SetWifiRequest; - case 'SerialUpdateResponse': return accessor(index, new SerialUpdateResponse())! as SerialUpdateResponse; - case 'AutoBoneProcessRequest': return accessor(index, new AutoBoneProcessRequest())! as AutoBoneProcessRequest; - case 'AutoBoneProcessStatusResponse': return accessor(index, new AutoBoneProcessStatusResponse())! as AutoBoneProcessStatusResponse; - case 'AutoBoneEpochResponse': return accessor(index, new AutoBoneEpochResponse())! as AutoBoneEpochResponse; - case 'OverlayDisplayModeRequest': return accessor(index, new OverlayDisplayModeRequest())! as OverlayDisplayModeRequest; - case 'OverlayDisplayModeChangeRequest': return accessor(index, new OverlayDisplayModeChangeRequest())! as OverlayDisplayModeChangeRequest; - case 'OverlayDisplayModeResponse': return accessor(index, new OverlayDisplayModeResponse())! as OverlayDisplayModeResponse; - case 'SerialTrackerRebootRequest': return accessor(index, new SerialTrackerRebootRequest())! as SerialTrackerRebootRequest; - case 'SerialTrackerGetInfoRequest': return accessor(index, new SerialTrackerGetInfoRequest())! as SerialTrackerGetInfoRequest; - case 'SerialTrackerFactoryResetRequest': return accessor(index, new SerialTrackerFactoryResetRequest())! as SerialTrackerFactoryResetRequest; - default: return null; - } -} - +// automatically generated by the FlatBuffers compiler, do not modify + +import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr_protocol/rpc/assign-tracker-request'; +import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr_protocol/rpc/auto-bone-epoch-response'; +import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr_protocol/rpc/auto-bone-process-request'; +import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr_protocol/rpc/auto-bone-process-status-response'; +import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr_protocol/rpc/change-settings-request'; +import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr_protocol/rpc/change-skeleton-config-request'; +import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr_protocol/rpc/close-serial-request'; +import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr_protocol/rpc/heartbeat-request'; +import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr_protocol/rpc/heartbeat-response'; +import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr_protocol/rpc/open-serial-request'; +import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-change-request'; +import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-request'; +import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr_protocol/rpc/overlay-display-mode-response'; +import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr_protocol/rpc/record-b-v-h-request'; +import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr_protocol/rpc/record-b-v-h-status'; +import { ResetRequest, ResetRequestT } from '../../solarxr_protocol/rpc/reset-request'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr_protocol/rpc/serial-tracker-factory-reset-request'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr_protocol/rpc/serial-tracker-get-info-request'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr_protocol/rpc/serial-tracker-reboot-request'; +import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr_protocol/rpc/serial-update-response'; +import { SetWifiRequest, SetWifiRequestT } from '../../solarxr_protocol/rpc/set-wifi-request'; +import { SettingsRequest, SettingsRequestT } from '../../solarxr_protocol/rpc/settings-request'; +import { SettingsResponse, SettingsResponseT } from '../../solarxr_protocol/rpc/settings-response'; +import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr_protocol/rpc/skeleton-config-request'; +import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr_protocol/rpc/skeleton-config-response'; +import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr_protocol/rpc/skeleton-reset-all-request'; + + +export enum RpcMessage{ + NONE = 0, + HeartbeatRequest = 1, + HeartbeatResponse = 2, + ResetRequest = 3, + AssignTrackerRequest = 4, + SettingsRequest = 5, + SettingsResponse = 6, + ChangeSettingsRequest = 7, + RecordBVHRequest = 8, + RecordBVHStatus = 9, + SkeletonConfigRequest = 10, + ChangeSkeletonConfigRequest = 11, + SkeletonResetAllRequest = 12, + SkeletonConfigResponse = 13, + OpenSerialRequest = 14, + CloseSerialRequest = 15, + SetWifiRequest = 16, + SerialUpdateResponse = 17, + AutoBoneProcessRequest = 18, + AutoBoneProcessStatusResponse = 19, + AutoBoneEpochResponse = 20, + OverlayDisplayModeRequest = 21, + OverlayDisplayModeChangeRequest = 22, + OverlayDisplayModeResponse = 23, + SerialTrackerRebootRequest = 24, + SerialTrackerGetInfoRequest = 25, + SerialTrackerFactoryResetRequest = 26 +} + +export function unionToRpcMessage( + type: RpcMessage, + accessor: (obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null +): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { + switch(RpcMessage[type]) { + case 'NONE': return null; + case 'HeartbeatRequest': return accessor(new HeartbeatRequest())! as HeartbeatRequest; + case 'HeartbeatResponse': return accessor(new HeartbeatResponse())! as HeartbeatResponse; + case 'ResetRequest': return accessor(new ResetRequest())! as ResetRequest; + case 'AssignTrackerRequest': return accessor(new AssignTrackerRequest())! as AssignTrackerRequest; + case 'SettingsRequest': return accessor(new SettingsRequest())! as SettingsRequest; + case 'SettingsResponse': return accessor(new SettingsResponse())! as SettingsResponse; + case 'ChangeSettingsRequest': return accessor(new ChangeSettingsRequest())! as ChangeSettingsRequest; + case 'RecordBVHRequest': return accessor(new RecordBVHRequest())! as RecordBVHRequest; + case 'RecordBVHStatus': return accessor(new RecordBVHStatus())! as RecordBVHStatus; + case 'SkeletonConfigRequest': return accessor(new SkeletonConfigRequest())! as SkeletonConfigRequest; + case 'ChangeSkeletonConfigRequest': return accessor(new ChangeSkeletonConfigRequest())! as ChangeSkeletonConfigRequest; + case 'SkeletonResetAllRequest': return accessor(new SkeletonResetAllRequest())! as SkeletonResetAllRequest; + case 'SkeletonConfigResponse': return accessor(new SkeletonConfigResponse())! as SkeletonConfigResponse; + case 'OpenSerialRequest': return accessor(new OpenSerialRequest())! as OpenSerialRequest; + case 'CloseSerialRequest': return accessor(new CloseSerialRequest())! as CloseSerialRequest; + case 'SetWifiRequest': return accessor(new SetWifiRequest())! as SetWifiRequest; + case 'SerialUpdateResponse': return accessor(new SerialUpdateResponse())! as SerialUpdateResponse; + case 'AutoBoneProcessRequest': return accessor(new AutoBoneProcessRequest())! as AutoBoneProcessRequest; + case 'AutoBoneProcessStatusResponse': return accessor(new AutoBoneProcessStatusResponse())! as AutoBoneProcessStatusResponse; + case 'AutoBoneEpochResponse': return accessor(new AutoBoneEpochResponse())! as AutoBoneEpochResponse; + case 'OverlayDisplayModeRequest': return accessor(new OverlayDisplayModeRequest())! as OverlayDisplayModeRequest; + case 'OverlayDisplayModeChangeRequest': return accessor(new OverlayDisplayModeChangeRequest())! as OverlayDisplayModeChangeRequest; + case 'OverlayDisplayModeResponse': return accessor(new OverlayDisplayModeResponse())! as OverlayDisplayModeResponse; + case 'SerialTrackerRebootRequest': return accessor(new SerialTrackerRebootRequest())! as SerialTrackerRebootRequest; + case 'SerialTrackerGetInfoRequest': return accessor(new SerialTrackerGetInfoRequest())! as SerialTrackerGetInfoRequest; + case 'SerialTrackerFactoryResetRequest': return accessor(new SerialTrackerFactoryResetRequest())! as SerialTrackerFactoryResetRequest; + default: return null; + } +} + +export function unionListToRpcMessage( + type: RpcMessage, + accessor: (index: number, obj:AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest) => AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null, + index: number +): AssignTrackerRequest|AutoBoneEpochResponse|AutoBoneProcessRequest|AutoBoneProcessStatusResponse|ChangeSettingsRequest|ChangeSkeletonConfigRequest|CloseSerialRequest|HeartbeatRequest|HeartbeatResponse|OpenSerialRequest|OverlayDisplayModeChangeRequest|OverlayDisplayModeRequest|OverlayDisplayModeResponse|RecordBVHRequest|RecordBVHStatus|ResetRequest|SerialTrackerFactoryResetRequest|SerialTrackerGetInfoRequest|SerialTrackerRebootRequest|SerialUpdateResponse|SetWifiRequest|SettingsRequest|SettingsResponse|SkeletonConfigRequest|SkeletonConfigResponse|SkeletonResetAllRequest|null { + switch(RpcMessage[type]) { + case 'NONE': return null; + case 'HeartbeatRequest': return accessor(index, new HeartbeatRequest())! as HeartbeatRequest; + case 'HeartbeatResponse': return accessor(index, new HeartbeatResponse())! as HeartbeatResponse; + case 'ResetRequest': return accessor(index, new ResetRequest())! as ResetRequest; + case 'AssignTrackerRequest': return accessor(index, new AssignTrackerRequest())! as AssignTrackerRequest; + case 'SettingsRequest': return accessor(index, new SettingsRequest())! as SettingsRequest; + case 'SettingsResponse': return accessor(index, new SettingsResponse())! as SettingsResponse; + case 'ChangeSettingsRequest': return accessor(index, new ChangeSettingsRequest())! as ChangeSettingsRequest; + case 'RecordBVHRequest': return accessor(index, new RecordBVHRequest())! as RecordBVHRequest; + case 'RecordBVHStatus': return accessor(index, new RecordBVHStatus())! as RecordBVHStatus; + case 'SkeletonConfigRequest': return accessor(index, new SkeletonConfigRequest())! as SkeletonConfigRequest; + case 'ChangeSkeletonConfigRequest': return accessor(index, new ChangeSkeletonConfigRequest())! as ChangeSkeletonConfigRequest; + case 'SkeletonResetAllRequest': return accessor(index, new SkeletonResetAllRequest())! as SkeletonResetAllRequest; + case 'SkeletonConfigResponse': return accessor(index, new SkeletonConfigResponse())! as SkeletonConfigResponse; + case 'OpenSerialRequest': return accessor(index, new OpenSerialRequest())! as OpenSerialRequest; + case 'CloseSerialRequest': return accessor(index, new CloseSerialRequest())! as CloseSerialRequest; + case 'SetWifiRequest': return accessor(index, new SetWifiRequest())! as SetWifiRequest; + case 'SerialUpdateResponse': return accessor(index, new SerialUpdateResponse())! as SerialUpdateResponse; + case 'AutoBoneProcessRequest': return accessor(index, new AutoBoneProcessRequest())! as AutoBoneProcessRequest; + case 'AutoBoneProcessStatusResponse': return accessor(index, new AutoBoneProcessStatusResponse())! as AutoBoneProcessStatusResponse; + case 'AutoBoneEpochResponse': return accessor(index, new AutoBoneEpochResponse())! as AutoBoneEpochResponse; + case 'OverlayDisplayModeRequest': return accessor(index, new OverlayDisplayModeRequest())! as OverlayDisplayModeRequest; + case 'OverlayDisplayModeChangeRequest': return accessor(index, new OverlayDisplayModeChangeRequest())! as OverlayDisplayModeChangeRequest; + case 'OverlayDisplayModeResponse': return accessor(index, new OverlayDisplayModeResponse())! as OverlayDisplayModeResponse; + case 'SerialTrackerRebootRequest': return accessor(index, new SerialTrackerRebootRequest())! as SerialTrackerRebootRequest; + case 'SerialTrackerGetInfoRequest': return accessor(index, new SerialTrackerGetInfoRequest())! as SerialTrackerGetInfoRequest; + case 'SerialTrackerFactoryResetRequest': return accessor(index, new SerialTrackerFactoryResetRequest())! as SerialTrackerFactoryResetRequest; + default: return null; + } +} + diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-factory-reset-request.ts similarity index 100% rename from protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-factory-reset-request.ts diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-get-info-request.ts similarity index 100% rename from protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-get-info-request.ts diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-reboot-request.ts similarity index 100% rename from protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-reboot-request.ts diff --git a/protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/serial-update-response.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/serial-update-response.ts index 4df0425c..bdf454ac 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/serial-update-response.ts @@ -1,90 +1,90 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SerialUpdateResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SerialUpdateResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSerialUpdateResponse(bb:flatbuffers.ByteBuffer, obj?:SerialUpdateResponse):SerialUpdateResponse { - return (obj || new SerialUpdateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSerialUpdateResponse(bb:flatbuffers.ByteBuffer, obj?:SerialUpdateResponse):SerialUpdateResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SerialUpdateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -log():string|null -log(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -log(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; -} - -closed():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startSerialUpdateResponse(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addLog(builder:flatbuffers.Builder, logOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, logOffset, 0); -} - -static addClosed(builder:flatbuffers.Builder, closed:boolean) { - builder.addFieldInt8(1, +closed, +false); -} - -static endSerialUpdateResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSerialUpdateResponse(builder:flatbuffers.Builder, logOffset:flatbuffers.Offset, closed:boolean):flatbuffers.Offset { - SerialUpdateResponse.startSerialUpdateResponse(builder); - SerialUpdateResponse.addLog(builder, logOffset); - SerialUpdateResponse.addClosed(builder, closed); - return SerialUpdateResponse.endSerialUpdateResponse(builder); -} - -unpack(): SerialUpdateResponseT { - return new SerialUpdateResponseT( - this.log(), - this.closed() - ); -} - - -unpackTo(_o: SerialUpdateResponseT): void { - _o.log = this.log(); - _o.closed = this.closed(); -} -} - -export class SerialUpdateResponseT { -constructor( - public log: string|Uint8Array|null = null, - public closed: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const log = (this.log !== null ? builder.createString(this.log!) : 0); - - return SerialUpdateResponse.createSerialUpdateResponse(builder, - log, - this.closed - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SerialUpdateResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SerialUpdateResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSerialUpdateResponse(bb:flatbuffers.ByteBuffer, obj?:SerialUpdateResponse):SerialUpdateResponse { + return (obj || new SerialUpdateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSerialUpdateResponse(bb:flatbuffers.ByteBuffer, obj?:SerialUpdateResponse):SerialUpdateResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SerialUpdateResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +log():string|null +log(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +log(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; +} + +closed():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startSerialUpdateResponse(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addLog(builder:flatbuffers.Builder, logOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, logOffset, 0); +} + +static addClosed(builder:flatbuffers.Builder, closed:boolean) { + builder.addFieldInt8(1, +closed, +false); +} + +static endSerialUpdateResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSerialUpdateResponse(builder:flatbuffers.Builder, logOffset:flatbuffers.Offset, closed:boolean):flatbuffers.Offset { + SerialUpdateResponse.startSerialUpdateResponse(builder); + SerialUpdateResponse.addLog(builder, logOffset); + SerialUpdateResponse.addClosed(builder, closed); + return SerialUpdateResponse.endSerialUpdateResponse(builder); +} + +unpack(): SerialUpdateResponseT { + return new SerialUpdateResponseT( + this.log(), + this.closed() + ); +} + + +unpackTo(_o: SerialUpdateResponseT): void { + _o.log = this.log(); + _o.closed = this.closed(); +} +} + +export class SerialUpdateResponseT { +constructor( + public log: string|Uint8Array|null = null, + public closed: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const log = (this.log !== null ? builder.createString(this.log!) : 0); + + return SerialUpdateResponse.createSerialUpdateResponse(builder, + log, + this.closed + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/set-wifi-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/set-wifi-request.ts index 806d9f21..9f161fad 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/set-wifi-request.ts @@ -1,93 +1,93 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SetWifiRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SetWifiRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSetWifiRequest(bb:flatbuffers.ByteBuffer, obj?:SetWifiRequest):SetWifiRequest { - return (obj || new SetWifiRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSetWifiRequest(bb:flatbuffers.ByteBuffer, obj?:SetWifiRequest):SetWifiRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SetWifiRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -ssid():string|null -ssid(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -ssid(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; -} - -password():string|null -password(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null -password(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; -} - -static startSetWifiRequest(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addSsid(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, ssidOffset, 0); -} - -static addPassword(builder:flatbuffers.Builder, passwordOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, passwordOffset, 0); -} - -static endSetWifiRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSetWifiRequest(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset, passwordOffset:flatbuffers.Offset):flatbuffers.Offset { - SetWifiRequest.startSetWifiRequest(builder); - SetWifiRequest.addSsid(builder, ssidOffset); - SetWifiRequest.addPassword(builder, passwordOffset); - return SetWifiRequest.endSetWifiRequest(builder); -} - -unpack(): SetWifiRequestT { - return new SetWifiRequestT( - this.ssid(), - this.password() - ); -} - - -unpackTo(_o: SetWifiRequestT): void { - _o.ssid = this.ssid(); - _o.password = this.password(); -} -} - -export class SetWifiRequestT { -constructor( - public ssid: string|Uint8Array|null = null, - public password: string|Uint8Array|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const ssid = (this.ssid !== null ? builder.createString(this.ssid!) : 0); - const password = (this.password !== null ? builder.createString(this.password!) : 0); - - return SetWifiRequest.createSetWifiRequest(builder, - ssid, - password - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SetWifiRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SetWifiRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSetWifiRequest(bb:flatbuffers.ByteBuffer, obj?:SetWifiRequest):SetWifiRequest { + return (obj || new SetWifiRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSetWifiRequest(bb:flatbuffers.ByteBuffer, obj?:SetWifiRequest):SetWifiRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SetWifiRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +ssid():string|null +ssid(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +ssid(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; +} + +password():string|null +password(optionalEncoding:flatbuffers.Encoding):string|Uint8Array|null +password(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; +} + +static startSetWifiRequest(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addSsid(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, ssidOffset, 0); +} + +static addPassword(builder:flatbuffers.Builder, passwordOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, passwordOffset, 0); +} + +static endSetWifiRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSetWifiRequest(builder:flatbuffers.Builder, ssidOffset:flatbuffers.Offset, passwordOffset:flatbuffers.Offset):flatbuffers.Offset { + SetWifiRequest.startSetWifiRequest(builder); + SetWifiRequest.addSsid(builder, ssidOffset); + SetWifiRequest.addPassword(builder, passwordOffset); + return SetWifiRequest.endSetWifiRequest(builder); +} + +unpack(): SetWifiRequestT { + return new SetWifiRequestT( + this.ssid(), + this.password() + ); +} + + +unpackTo(_o: SetWifiRequestT): void { + _o.ssid = this.ssid(); + _o.password = this.password(); +} +} + +export class SetWifiRequestT { +constructor( + public ssid: string|Uint8Array|null = null, + public password: string|Uint8Array|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const ssid = (this.ssid !== null ? builder.createString(this.ssid!) : 0); + const password = (this.password !== null ? builder.createString(this.password!) : 0); + + return SetWifiRequest.createSetWifiRequest(builder, + ssid, + password + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/settings-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/settings-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/settings-request.ts index f55951e2..3d61843e 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/settings-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SettingsRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SettingsRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:SettingsRequest):SettingsRequest { - return (obj || new SettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:SettingsRequest):SettingsRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startSettingsRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - SettingsRequest.startSettingsRequest(builder); - return SettingsRequest.endSettingsRequest(builder); -} - -unpack(): SettingsRequestT { - return new SettingsRequestT(); -} - - -unpackTo(_o: SettingsRequestT): void {} -} - -export class SettingsRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SettingsRequest.createSettingsRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SettingsRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SettingsRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:SettingsRequest):SettingsRequest { + return (obj || new SettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSettingsRequest(bb:flatbuffers.ByteBuffer, obj?:SettingsRequest):SettingsRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SettingsRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSettingsRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSettingsRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SettingsRequest.startSettingsRequest(builder); + return SettingsRequest.endSettingsRequest(builder); +} + +unpack(): SettingsRequestT { + return new SettingsRequestT(); +} + + +unpackTo(_o: SettingsRequestT): void {} +} + +export class SettingsRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SettingsRequest.createSettingsRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/settings-response.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/settings-response.ts index 649beda2..bb5429a8 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/settings-response.ts @@ -1,101 +1,101 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings'; -import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting'; -import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings'; - - -export class SettingsResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SettingsResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSettingsResponse(bb:flatbuffers.ByteBuffer, obj?:SettingsResponse):SettingsResponse { - return (obj || new SettingsResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSettingsResponse(bb:flatbuffers.ByteBuffer, obj?:SettingsResponse):SettingsResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SettingsResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -steamVrTrackers(obj?:SteamVRTrackersSetting):SteamVRTrackersSetting|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new SteamVRTrackersSetting()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -filtering(obj?:FilteringSettings):FilteringSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new FilteringSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -modelSettings(obj?:ModelSettings):ModelSettings|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startSettingsResponse(builder:flatbuffers.Builder) { - builder.startObject(3); -} - -static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, steamVrTrackersOffset, 0); -} - -static addFiltering(builder:flatbuffers.Builder, filteringOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, filteringOffset, 0); -} - -static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { - builder.addFieldOffset(2, modelSettingsOffset, 0); -} - -static endSettingsResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): SettingsResponseT { - return new SettingsResponseT( - (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null), - (this.filtering() !== null ? this.filtering()!.unpack() : null), - (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null) - ); -} - - -unpackTo(_o: SettingsResponseT): void { - _o.steamVrTrackers = (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null); - _o.filtering = (this.filtering() !== null ? this.filtering()!.unpack() : null); - _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); -} -} - -export class SettingsResponseT { -constructor( - public steamVrTrackers: SteamVRTrackersSettingT|null = null, - public filtering: FilteringSettingsT|null = null, - public modelSettings: ModelSettingsT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const steamVrTrackers = (this.steamVrTrackers !== null ? this.steamVrTrackers!.pack(builder) : 0); - const filtering = (this.filtering !== null ? this.filtering!.pack(builder) : 0); - const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); - - SettingsResponse.startSettingsResponse(builder); - SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); - SettingsResponse.addFiltering(builder, filtering); - SettingsResponse.addModelSettings(builder, modelSettings); - - return SettingsResponse.endSettingsResponse(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { FilteringSettings, FilteringSettingsT } from '../../solarxr_protocol/rpc/filtering-settings'; +import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr_protocol/rpc/steam-v-r-trackers-setting'; +import { ModelSettings, ModelSettingsT } from '../../solarxr_protocol/rpc/settings/model-settings'; + + +export class SettingsResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SettingsResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSettingsResponse(bb:flatbuffers.ByteBuffer, obj?:SettingsResponse):SettingsResponse { + return (obj || new SettingsResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSettingsResponse(bb:flatbuffers.ByteBuffer, obj?:SettingsResponse):SettingsResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SettingsResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +steamVrTrackers(obj?:SteamVRTrackersSetting):SteamVRTrackersSetting|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new SteamVRTrackersSetting()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +filtering(obj?:FilteringSettings):FilteringSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new FilteringSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +modelSettings(obj?:ModelSettings):ModelSettings|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? (obj || new ModelSettings()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startSettingsResponse(builder:flatbuffers.Builder) { + builder.startObject(3); +} + +static addSteamVrTrackers(builder:flatbuffers.Builder, steamVrTrackersOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, steamVrTrackersOffset, 0); +} + +static addFiltering(builder:flatbuffers.Builder, filteringOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, filteringOffset, 0); +} + +static addModelSettings(builder:flatbuffers.Builder, modelSettingsOffset:flatbuffers.Offset) { + builder.addFieldOffset(2, modelSettingsOffset, 0); +} + +static endSettingsResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): SettingsResponseT { + return new SettingsResponseT( + (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null), + (this.filtering() !== null ? this.filtering()!.unpack() : null), + (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null) + ); +} + + +unpackTo(_o: SettingsResponseT): void { + _o.steamVrTrackers = (this.steamVrTrackers() !== null ? this.steamVrTrackers()!.unpack() : null); + _o.filtering = (this.filtering() !== null ? this.filtering()!.unpack() : null); + _o.modelSettings = (this.modelSettings() !== null ? this.modelSettings()!.unpack() : null); +} +} + +export class SettingsResponseT { +constructor( + public steamVrTrackers: SteamVRTrackersSettingT|null = null, + public filtering: FilteringSettingsT|null = null, + public modelSettings: ModelSettingsT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const steamVrTrackers = (this.steamVrTrackers !== null ? this.steamVrTrackers!.pack(builder) : 0); + const filtering = (this.filtering !== null ? this.filtering!.pack(builder) : 0); + const modelSettings = (this.modelSettings !== null ? this.modelSettings!.pack(builder) : 0); + + SettingsResponse.startSettingsResponse(builder); + SettingsResponse.addSteamVrTrackers(builder, steamVrTrackers); + SettingsResponse.addFiltering(builder, filtering); + SettingsResponse.addModelSettings(builder, modelSettings); + + return SettingsResponse.endSettingsResponse(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts b/protocol/typescript/src/solarxr_protocol/rpc/settings/model-ratios.ts similarity index 97% rename from protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts rename to protocol/typescript/src/solarxr_protocol/rpc/settings/model-ratios.ts index 8bc51943..4874e5e2 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/settings/model-ratios.ts @@ -1,158 +1,158 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Settings for the skeletal model that are ratios. - * These values range from 0 to 1. - */ -export class ModelRatios { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ModelRatios { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsModelRatios(bb:flatbuffers.ByteBuffer, obj?:ModelRatios):ModelRatios { - return (obj || new ModelRatios()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsModelRatios(bb:flatbuffers.ByteBuffer, obj?:ModelRatios):ModelRatios { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ModelRatios()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -imputeWaistFromChestHip():number|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -imputeWaistFromChestLegs():number|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -imputeHipFromChestLegs():number|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -imputeHipFromWaistLegs():number|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -/** - * Hip's yaw and roll is set to the average of legs when 1.0 - */ -interpHipLegs():number|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -/** - * Knee trackers' yaw and roll is set to the ankle's when 1.0 - */ -interpKneeTrackerAnkle():number|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; -} - -static startModelRatios(builder:flatbuffers.Builder) { - builder.startObject(6); -} - -static addImputeWaistFromChestHip(builder:flatbuffers.Builder, imputeWaistFromChestHip:number) { - builder.addFieldFloat32(0, imputeWaistFromChestHip, 0); -} - -static addImputeWaistFromChestLegs(builder:flatbuffers.Builder, imputeWaistFromChestLegs:number) { - builder.addFieldFloat32(1, imputeWaistFromChestLegs, 0); -} - -static addImputeHipFromChestLegs(builder:flatbuffers.Builder, imputeHipFromChestLegs:number) { - builder.addFieldFloat32(2, imputeHipFromChestLegs, 0); -} - -static addImputeHipFromWaistLegs(builder:flatbuffers.Builder, imputeHipFromWaistLegs:number) { - builder.addFieldFloat32(3, imputeHipFromWaistLegs, 0); -} - -static addInterpHipLegs(builder:flatbuffers.Builder, interpHipLegs:number) { - builder.addFieldFloat32(4, interpHipLegs, 0); -} - -static addInterpKneeTrackerAnkle(builder:flatbuffers.Builder, interpKneeTrackerAnkle:number) { - builder.addFieldFloat32(5, interpKneeTrackerAnkle, 0); -} - -static endModelRatios(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createModelRatios(builder:flatbuffers.Builder, imputeWaistFromChestHip:number|null, imputeWaistFromChestLegs:number|null, imputeHipFromChestLegs:number|null, imputeHipFromWaistLegs:number|null, interpHipLegs:number|null, interpKneeTrackerAnkle:number|null):flatbuffers.Offset { - ModelRatios.startModelRatios(builder); - if (imputeWaistFromChestHip !== null) - ModelRatios.addImputeWaistFromChestHip(builder, imputeWaistFromChestHip); - if (imputeWaistFromChestLegs !== null) - ModelRatios.addImputeWaistFromChestLegs(builder, imputeWaistFromChestLegs); - if (imputeHipFromChestLegs !== null) - ModelRatios.addImputeHipFromChestLegs(builder, imputeHipFromChestLegs); - if (imputeHipFromWaistLegs !== null) - ModelRatios.addImputeHipFromWaistLegs(builder, imputeHipFromWaistLegs); - if (interpHipLegs !== null) - ModelRatios.addInterpHipLegs(builder, interpHipLegs); - if (interpKneeTrackerAnkle !== null) - ModelRatios.addInterpKneeTrackerAnkle(builder, interpKneeTrackerAnkle); - return ModelRatios.endModelRatios(builder); -} - -unpack(): ModelRatiosT { - return new ModelRatiosT( - this.imputeWaistFromChestHip(), - this.imputeWaistFromChestLegs(), - this.imputeHipFromChestLegs(), - this.imputeHipFromWaistLegs(), - this.interpHipLegs(), - this.interpKneeTrackerAnkle() - ); -} - - -unpackTo(_o: ModelRatiosT): void { - _o.imputeWaistFromChestHip = this.imputeWaistFromChestHip(); - _o.imputeWaistFromChestLegs = this.imputeWaistFromChestLegs(); - _o.imputeHipFromChestLegs = this.imputeHipFromChestLegs(); - _o.imputeHipFromWaistLegs = this.imputeHipFromWaistLegs(); - _o.interpHipLegs = this.interpHipLegs(); - _o.interpKneeTrackerAnkle = this.interpKneeTrackerAnkle(); -} -} - -export class ModelRatiosT { -constructor( - public imputeWaistFromChestHip: number|null = null, - public imputeWaistFromChestLegs: number|null = null, - public imputeHipFromChestLegs: number|null = null, - public imputeHipFromWaistLegs: number|null = null, - public interpHipLegs: number|null = null, - public interpKneeTrackerAnkle: number|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ModelRatios.createModelRatios(builder, - this.imputeWaistFromChestHip, - this.imputeWaistFromChestLegs, - this.imputeHipFromChestLegs, - this.imputeHipFromWaistLegs, - this.interpHipLegs, - this.interpKneeTrackerAnkle - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Settings for the skeletal model that are ratios. + * These values range from 0 to 1. + */ +export class ModelRatios { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ModelRatios { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsModelRatios(bb:flatbuffers.ByteBuffer, obj?:ModelRatios):ModelRatios { + return (obj || new ModelRatios()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsModelRatios(bb:flatbuffers.ByteBuffer, obj?:ModelRatios):ModelRatios { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ModelRatios()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +imputeWaistFromChestHip():number|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +imputeWaistFromChestLegs():number|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +imputeHipFromChestLegs():number|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +imputeHipFromWaistLegs():number|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +/** + * Hip's yaw and roll is set to the average of legs when 1.0 + */ +interpHipLegs():number|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +/** + * Knee trackers' yaw and roll is set to the ankle's when 1.0 + */ +interpKneeTrackerAnkle():number|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : null; +} + +static startModelRatios(builder:flatbuffers.Builder) { + builder.startObject(6); +} + +static addImputeWaistFromChestHip(builder:flatbuffers.Builder, imputeWaistFromChestHip:number) { + builder.addFieldFloat32(0, imputeWaistFromChestHip, 0); +} + +static addImputeWaistFromChestLegs(builder:flatbuffers.Builder, imputeWaistFromChestLegs:number) { + builder.addFieldFloat32(1, imputeWaistFromChestLegs, 0); +} + +static addImputeHipFromChestLegs(builder:flatbuffers.Builder, imputeHipFromChestLegs:number) { + builder.addFieldFloat32(2, imputeHipFromChestLegs, 0); +} + +static addImputeHipFromWaistLegs(builder:flatbuffers.Builder, imputeHipFromWaistLegs:number) { + builder.addFieldFloat32(3, imputeHipFromWaistLegs, 0); +} + +static addInterpHipLegs(builder:flatbuffers.Builder, interpHipLegs:number) { + builder.addFieldFloat32(4, interpHipLegs, 0); +} + +static addInterpKneeTrackerAnkle(builder:flatbuffers.Builder, interpKneeTrackerAnkle:number) { + builder.addFieldFloat32(5, interpKneeTrackerAnkle, 0); +} + +static endModelRatios(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createModelRatios(builder:flatbuffers.Builder, imputeWaistFromChestHip:number|null, imputeWaistFromChestLegs:number|null, imputeHipFromChestLegs:number|null, imputeHipFromWaistLegs:number|null, interpHipLegs:number|null, interpKneeTrackerAnkle:number|null):flatbuffers.Offset { + ModelRatios.startModelRatios(builder); + if (imputeWaistFromChestHip !== null) + ModelRatios.addImputeWaistFromChestHip(builder, imputeWaistFromChestHip); + if (imputeWaistFromChestLegs !== null) + ModelRatios.addImputeWaistFromChestLegs(builder, imputeWaistFromChestLegs); + if (imputeHipFromChestLegs !== null) + ModelRatios.addImputeHipFromChestLegs(builder, imputeHipFromChestLegs); + if (imputeHipFromWaistLegs !== null) + ModelRatios.addImputeHipFromWaistLegs(builder, imputeHipFromWaistLegs); + if (interpHipLegs !== null) + ModelRatios.addInterpHipLegs(builder, interpHipLegs); + if (interpKneeTrackerAnkle !== null) + ModelRatios.addInterpKneeTrackerAnkle(builder, interpKneeTrackerAnkle); + return ModelRatios.endModelRatios(builder); +} + +unpack(): ModelRatiosT { + return new ModelRatiosT( + this.imputeWaistFromChestHip(), + this.imputeWaistFromChestLegs(), + this.imputeHipFromChestLegs(), + this.imputeHipFromWaistLegs(), + this.interpHipLegs(), + this.interpKneeTrackerAnkle() + ); +} + + +unpackTo(_o: ModelRatiosT): void { + _o.imputeWaistFromChestHip = this.imputeWaistFromChestHip(); + _o.imputeWaistFromChestLegs = this.imputeWaistFromChestLegs(); + _o.imputeHipFromChestLegs = this.imputeHipFromChestLegs(); + _o.imputeHipFromWaistLegs = this.imputeHipFromWaistLegs(); + _o.interpHipLegs = this.interpHipLegs(); + _o.interpKneeTrackerAnkle = this.interpKneeTrackerAnkle(); +} +} + +export class ModelRatiosT { +constructor( + public imputeWaistFromChestHip: number|null = null, + public imputeWaistFromChestLegs: number|null = null, + public imputeHipFromChestLegs: number|null = null, + public imputeHipFromWaistLegs: number|null = null, + public interpHipLegs: number|null = null, + public interpKneeTrackerAnkle: number|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ModelRatios.createModelRatios(builder, + this.imputeWaistFromChestHip, + this.imputeWaistFromChestLegs, + this.imputeHipFromChestLegs, + this.imputeHipFromWaistLegs, + this.interpHipLegs, + this.interpKneeTrackerAnkle + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts b/protocol/typescript/src/solarxr_protocol/rpc/settings/model-settings.ts similarity index 92% rename from protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts rename to protocol/typescript/src/solarxr_protocol/rpc/settings/model-settings.ts index 6b8de6b6..fbbd761d 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/settings/model-settings.ts @@ -1,89 +1,89 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { ModelRatios, ModelRatiosT } from '../../../solarxr-protocol/rpc/settings/model-ratios'; -import { ModelToggles, ModelTogglesT } from '../../../solarxr-protocol/rpc/settings/model-toggles'; - - -/** - * Settings for the skeletal model. - */ -export class ModelSettings { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ModelSettings { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsModelSettings(bb:flatbuffers.ByteBuffer, obj?:ModelSettings):ModelSettings { - return (obj || new ModelSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsModelSettings(bb:flatbuffers.ByteBuffer, obj?:ModelSettings):ModelSettings { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ModelSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -toggles(obj?:ModelToggles):ModelToggles|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new ModelToggles()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -ratios(obj?:ModelRatios):ModelRatios|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? (obj || new ModelRatios()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startModelSettings(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addToggles(builder:flatbuffers.Builder, togglesOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, togglesOffset, 0); -} - -static addRatios(builder:flatbuffers.Builder, ratiosOffset:flatbuffers.Offset) { - builder.addFieldOffset(1, ratiosOffset, 0); -} - -static endModelSettings(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - - -unpack(): ModelSettingsT { - return new ModelSettingsT( - (this.toggles() !== null ? this.toggles()!.unpack() : null), - (this.ratios() !== null ? this.ratios()!.unpack() : null) - ); -} - - -unpackTo(_o: ModelSettingsT): void { - _o.toggles = (this.toggles() !== null ? this.toggles()!.unpack() : null); - _o.ratios = (this.ratios() !== null ? this.ratios()!.unpack() : null); -} -} - -export class ModelSettingsT { -constructor( - public toggles: ModelTogglesT|null = null, - public ratios: ModelRatiosT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const toggles = (this.toggles !== null ? this.toggles!.pack(builder) : 0); - const ratios = (this.ratios !== null ? this.ratios!.pack(builder) : 0); - - ModelSettings.startModelSettings(builder); - ModelSettings.addToggles(builder, toggles); - ModelSettings.addRatios(builder, ratios); - - return ModelSettings.endModelSettings(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { ModelRatios, ModelRatiosT } from '../../../solarxr_protocol/rpc/settings/model-ratios'; +import { ModelToggles, ModelTogglesT } from '../../../solarxr_protocol/rpc/settings/model-toggles'; + + +/** + * Settings for the skeletal model. + */ +export class ModelSettings { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ModelSettings { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsModelSettings(bb:flatbuffers.ByteBuffer, obj?:ModelSettings):ModelSettings { + return (obj || new ModelSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsModelSettings(bb:flatbuffers.ByteBuffer, obj?:ModelSettings):ModelSettings { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ModelSettings()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +toggles(obj?:ModelToggles):ModelToggles|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new ModelToggles()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +ratios(obj?:ModelRatios):ModelRatios|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new ModelRatios()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startModelSettings(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addToggles(builder:flatbuffers.Builder, togglesOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, togglesOffset, 0); +} + +static addRatios(builder:flatbuffers.Builder, ratiosOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, ratiosOffset, 0); +} + +static endModelSettings(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): ModelSettingsT { + return new ModelSettingsT( + (this.toggles() !== null ? this.toggles()!.unpack() : null), + (this.ratios() !== null ? this.ratios()!.unpack() : null) + ); +} + + +unpackTo(_o: ModelSettingsT): void { + _o.toggles = (this.toggles() !== null ? this.toggles()!.unpack() : null); + _o.ratios = (this.ratios() !== null ? this.ratios()!.unpack() : null); +} +} + +export class ModelSettingsT { +constructor( + public toggles: ModelTogglesT|null = null, + public ratios: ModelRatiosT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const toggles = (this.toggles !== null ? this.toggles!.pack(builder) : 0); + const ratios = (this.ratios !== null ? this.ratios!.pack(builder) : 0); + + ModelSettings.startModelSettings(builder); + ModelSettings.addToggles(builder, toggles); + ModelSettings.addRatios(builder, ratios); + + return ModelSettings.endModelSettings(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts b/protocol/typescript/src/solarxr_protocol/rpc/settings/model-toggles.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts rename to protocol/typescript/src/solarxr_protocol/rpc/settings/model-toggles.ts index 01acaa45..4e86ee5d 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/settings/model-toggles.ts @@ -1,151 +1,151 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -/** - * Settings for the skeletal model that are toggles. - */ -export class ModelToggles { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):ModelToggles { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsModelToggles(bb:flatbuffers.ByteBuffer, obj?:ModelToggles):ModelToggles { - return (obj || new ModelToggles()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsModelToggles(bb:flatbuffers.ByteBuffer, obj?:ModelToggles):ModelToggles { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new ModelToggles()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -extendedSpine():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -extendedPelvis():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -extendedKnee():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -forceArmsFromHmd():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -floorClip():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -skatingCorrection():boolean|null { - const offset = this.bb!.__offset(this.bb_pos, 14); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; -} - -static startModelToggles(builder:flatbuffers.Builder) { - builder.startObject(6); -} - -static addExtendedSpine(builder:flatbuffers.Builder, extendedSpine:boolean) { - builder.addFieldInt8(0, +extendedSpine, 0); -} - -static addExtendedPelvis(builder:flatbuffers.Builder, extendedPelvis:boolean) { - builder.addFieldInt8(1, +extendedPelvis, 0); -} - -static addExtendedKnee(builder:flatbuffers.Builder, extendedKnee:boolean) { - builder.addFieldInt8(2, +extendedKnee, 0); -} - -static addForceArmsFromHmd(builder:flatbuffers.Builder, forceArmsFromHmd:boolean) { - builder.addFieldInt8(3, +forceArmsFromHmd, 0); -} - -static addFloorClip(builder:flatbuffers.Builder, floorClip:boolean) { - builder.addFieldInt8(4, +floorClip, 0); -} - -static addSkatingCorrection(builder:flatbuffers.Builder, skatingCorrection:boolean) { - builder.addFieldInt8(5, +skatingCorrection, 0); -} - -static endModelToggles(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createModelToggles(builder:flatbuffers.Builder, extendedSpine:boolean|null, extendedPelvis:boolean|null, extendedKnee:boolean|null, forceArmsFromHmd:boolean|null, floorClip:boolean|null, skatingCorrection:boolean|null):flatbuffers.Offset { - ModelToggles.startModelToggles(builder); - if (extendedSpine !== null) - ModelToggles.addExtendedSpine(builder, extendedSpine); - if (extendedPelvis !== null) - ModelToggles.addExtendedPelvis(builder, extendedPelvis); - if (extendedKnee !== null) - ModelToggles.addExtendedKnee(builder, extendedKnee); - if (forceArmsFromHmd !== null) - ModelToggles.addForceArmsFromHmd(builder, forceArmsFromHmd); - if (floorClip !== null) - ModelToggles.addFloorClip(builder, floorClip); - if (skatingCorrection !== null) - ModelToggles.addSkatingCorrection(builder, skatingCorrection); - return ModelToggles.endModelToggles(builder); -} - -unpack(): ModelTogglesT { - return new ModelTogglesT( - this.extendedSpine(), - this.extendedPelvis(), - this.extendedKnee(), - this.forceArmsFromHmd(), - this.floorClip(), - this.skatingCorrection() - ); -} - - -unpackTo(_o: ModelTogglesT): void { - _o.extendedSpine = this.extendedSpine(); - _o.extendedPelvis = this.extendedPelvis(); - _o.extendedKnee = this.extendedKnee(); - _o.forceArmsFromHmd = this.forceArmsFromHmd(); - _o.floorClip = this.floorClip(); - _o.skatingCorrection = this.skatingCorrection(); -} -} - -export class ModelTogglesT { -constructor( - public extendedSpine: boolean|null = null, - public extendedPelvis: boolean|null = null, - public extendedKnee: boolean|null = null, - public forceArmsFromHmd: boolean|null = null, - public floorClip: boolean|null = null, - public skatingCorrection: boolean|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return ModelToggles.createModelToggles(builder, - this.extendedSpine, - this.extendedPelvis, - this.extendedKnee, - this.forceArmsFromHmd, - this.floorClip, - this.skatingCorrection - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +/** + * Settings for the skeletal model that are toggles. + */ +export class ModelToggles { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):ModelToggles { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsModelToggles(bb:flatbuffers.ByteBuffer, obj?:ModelToggles):ModelToggles { + return (obj || new ModelToggles()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsModelToggles(bb:flatbuffers.ByteBuffer, obj?:ModelToggles):ModelToggles { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new ModelToggles()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +extendedSpine():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +extendedPelvis():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +extendedKnee():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +forceArmsFromHmd():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +floorClip():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +skatingCorrection():boolean|null { + const offset = this.bb!.__offset(this.bb_pos, 14); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : null; +} + +static startModelToggles(builder:flatbuffers.Builder) { + builder.startObject(6); +} + +static addExtendedSpine(builder:flatbuffers.Builder, extendedSpine:boolean) { + builder.addFieldInt8(0, +extendedSpine, 0); +} + +static addExtendedPelvis(builder:flatbuffers.Builder, extendedPelvis:boolean) { + builder.addFieldInt8(1, +extendedPelvis, 0); +} + +static addExtendedKnee(builder:flatbuffers.Builder, extendedKnee:boolean) { + builder.addFieldInt8(2, +extendedKnee, 0); +} + +static addForceArmsFromHmd(builder:flatbuffers.Builder, forceArmsFromHmd:boolean) { + builder.addFieldInt8(3, +forceArmsFromHmd, 0); +} + +static addFloorClip(builder:flatbuffers.Builder, floorClip:boolean) { + builder.addFieldInt8(4, +floorClip, 0); +} + +static addSkatingCorrection(builder:flatbuffers.Builder, skatingCorrection:boolean) { + builder.addFieldInt8(5, +skatingCorrection, 0); +} + +static endModelToggles(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createModelToggles(builder:flatbuffers.Builder, extendedSpine:boolean|null, extendedPelvis:boolean|null, extendedKnee:boolean|null, forceArmsFromHmd:boolean|null, floorClip:boolean|null, skatingCorrection:boolean|null):flatbuffers.Offset { + ModelToggles.startModelToggles(builder); + if (extendedSpine !== null) + ModelToggles.addExtendedSpine(builder, extendedSpine); + if (extendedPelvis !== null) + ModelToggles.addExtendedPelvis(builder, extendedPelvis); + if (extendedKnee !== null) + ModelToggles.addExtendedKnee(builder, extendedKnee); + if (forceArmsFromHmd !== null) + ModelToggles.addForceArmsFromHmd(builder, forceArmsFromHmd); + if (floorClip !== null) + ModelToggles.addFloorClip(builder, floorClip); + if (skatingCorrection !== null) + ModelToggles.addSkatingCorrection(builder, skatingCorrection); + return ModelToggles.endModelToggles(builder); +} + +unpack(): ModelTogglesT { + return new ModelTogglesT( + this.extendedSpine(), + this.extendedPelvis(), + this.extendedKnee(), + this.forceArmsFromHmd(), + this.floorClip(), + this.skatingCorrection() + ); +} + + +unpackTo(_o: ModelTogglesT): void { + _o.extendedSpine = this.extendedSpine(); + _o.extendedPelvis = this.extendedPelvis(); + _o.extendedKnee = this.extendedKnee(); + _o.forceArmsFromHmd = this.forceArmsFromHmd(); + _o.floorClip = this.floorClip(); + _o.skatingCorrection = this.skatingCorrection(); +} +} + +export class ModelTogglesT { +constructor( + public extendedSpine: boolean|null = null, + public extendedPelvis: boolean|null = null, + public extendedKnee: boolean|null = null, + public forceArmsFromHmd: boolean|null = null, + public floorClip: boolean|null = null, + public skatingCorrection: boolean|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return ModelToggles.createModelToggles(builder, + this.extendedSpine, + this.extendedPelvis, + this.extendedKnee, + this.forceArmsFromHmd, + this.floorClip, + this.skatingCorrection + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-bone.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts rename to protocol/typescript/src/solarxr_protocol/rpc/skeleton-bone.ts index b4a9e59a..ba77db03 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-bone.ts @@ -1,25 +1,25 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -export enum SkeletonBone{ - NONE = 0, - HEAD = 1, - NECK = 2, - TORSO = 3, - CHEST = 4, - WAIST = 5, - HIP_OFFSET = 6, - HIPS_WIDTH = 7, - LEGS_LENGTH = 8, - KNEE_HEIGHT = 9, - FOOT_LENGTH = 10, - FOOT_SHIFT = 11, - SKELETON_OFFSET = 12, - CONTROLLER_DISTANCE_Z = 13, - CONTROLLER_DISTANCE_Y = 14, - FOREARM_LENGTH = 15, - SHOULDERS_DISTANCE = 16, - SHOULDERS_WIDTH = 17, - UPPER_ARM_LENGTH = 18, - ELBOW_OFFSET = 19 -} - +// automatically generated by the FlatBuffers compiler, do not modify + +export enum SkeletonBone{ + NONE = 0, + HEAD = 1, + NECK = 2, + TORSO = 3, + CHEST = 4, + WAIST = 5, + HIP_OFFSET = 6, + HIPS_WIDTH = 7, + LEGS_LENGTH = 8, + KNEE_HEIGHT = 9, + FOOT_LENGTH = 10, + FOOT_SHIFT = 11, + SKELETON_OFFSET = 12, + CONTROLLER_DISTANCE_Z = 13, + CONTROLLER_DISTANCE_Y = 14, + FOREARM_LENGTH = 15, + SHOULDERS_DISTANCE = 16, + SHOULDERS_WIDTH = 17, + UPPER_ARM_LENGTH = 18, + ELBOW_OFFSET = 19 +} + diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-request.ts index b066e9c9..c7691c00 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SkeletonConfigRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonConfigRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigRequest):SkeletonConfigRequest { - return (obj || new SkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigRequest):SkeletonConfigRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startSkeletonConfigRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endSkeletonConfigRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSkeletonConfigRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - SkeletonConfigRequest.startSkeletonConfigRequest(builder); - return SkeletonConfigRequest.endSkeletonConfigRequest(builder); -} - -unpack(): SkeletonConfigRequestT { - return new SkeletonConfigRequestT(); -} - - -unpackTo(_o: SkeletonConfigRequestT): void {} -} - -export class SkeletonConfigRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SkeletonConfigRequest.createSkeletonConfigRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SkeletonConfigRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonConfigRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigRequest):SkeletonConfigRequest { + return (obj || new SkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSkeletonConfigRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigRequest):SkeletonConfigRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SkeletonConfigRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSkeletonConfigRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSkeletonConfigRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSkeletonConfigRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SkeletonConfigRequest.startSkeletonConfigRequest(builder); + return SkeletonConfigRequest.endSkeletonConfigRequest(builder); +} + +unpack(): SkeletonConfigRequestT { + return new SkeletonConfigRequestT(); +} + + +unpackTo(_o: SkeletonConfigRequestT): void {} +} + +export class SkeletonConfigRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SkeletonConfigRequest.createSkeletonConfigRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-response.ts b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-response.ts similarity index 95% rename from protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-response.ts rename to protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-response.ts index ca827d0b..38db57d1 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-response.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-response.ts @@ -1,92 +1,92 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SkeletonPart, SkeletonPartT } from '../../solarxr-protocol/rpc/skeleton-part'; - - -export class SkeletonConfigResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonConfigResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSkeletonConfigResponse(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigResponse):SkeletonConfigResponse { - return (obj || new SkeletonConfigResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSkeletonConfigResponse(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigResponse):SkeletonConfigResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SkeletonConfigResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -skeletonParts(index: number, obj?:SkeletonPart):SkeletonPart|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new SkeletonPart()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; -} - -skeletonPartsLength():number { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; -} - -static startSkeletonConfigResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addSkeletonParts(builder:flatbuffers.Builder, skeletonPartsOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, skeletonPartsOffset, 0); -} - -static createSkeletonPartsVector(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 startSkeletonPartsVector(builder:flatbuffers.Builder, numElems:number) { - builder.startVector(4, numElems, 4); -} - -static endSkeletonConfigResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSkeletonConfigResponse(builder:flatbuffers.Builder, skeletonPartsOffset:flatbuffers.Offset):flatbuffers.Offset { - SkeletonConfigResponse.startSkeletonConfigResponse(builder); - SkeletonConfigResponse.addSkeletonParts(builder, skeletonPartsOffset); - return SkeletonConfigResponse.endSkeletonConfigResponse(builder); -} - -unpack(): SkeletonConfigResponseT { - return new SkeletonConfigResponseT( - this.bb!.createObjList(this.skeletonParts.bind(this), this.skeletonPartsLength()) - ); -} - - -unpackTo(_o: SkeletonConfigResponseT): void { - _o.skeletonParts = this.bb!.createObjList(this.skeletonParts.bind(this), this.skeletonPartsLength()); -} -} - -export class SkeletonConfigResponseT { -constructor( - public skeletonParts: (SkeletonPartT)[] = [] -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const skeletonParts = SkeletonConfigResponse.createSkeletonPartsVector(builder, builder.createObjectOffsetList(this.skeletonParts)); - - return SkeletonConfigResponse.createSkeletonConfigResponse(builder, - skeletonParts - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { SkeletonPart, SkeletonPartT } from '../../solarxr_protocol/rpc/skeleton-part'; + + +export class SkeletonConfigResponse { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonConfigResponse { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSkeletonConfigResponse(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigResponse):SkeletonConfigResponse { + return (obj || new SkeletonConfigResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSkeletonConfigResponse(bb:flatbuffers.ByteBuffer, obj?:SkeletonConfigResponse):SkeletonConfigResponse { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SkeletonConfigResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +skeletonParts(index: number, obj?:SkeletonPart):SkeletonPart|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new SkeletonPart()).__init(this.bb!.__indirect(this.bb!.__vector(this.bb_pos + offset) + index * 4), this.bb!) : null; +} + +skeletonPartsLength():number { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.__vector_len(this.bb_pos + offset) : 0; +} + +static startSkeletonConfigResponse(builder:flatbuffers.Builder) { + builder.startObject(1); +} + +static addSkeletonParts(builder:flatbuffers.Builder, skeletonPartsOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, skeletonPartsOffset, 0); +} + +static createSkeletonPartsVector(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 startSkeletonPartsVector(builder:flatbuffers.Builder, numElems:number) { + builder.startVector(4, numElems, 4); +} + +static endSkeletonConfigResponse(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSkeletonConfigResponse(builder:flatbuffers.Builder, skeletonPartsOffset:flatbuffers.Offset):flatbuffers.Offset { + SkeletonConfigResponse.startSkeletonConfigResponse(builder); + SkeletonConfigResponse.addSkeletonParts(builder, skeletonPartsOffset); + return SkeletonConfigResponse.endSkeletonConfigResponse(builder); +} + +unpack(): SkeletonConfigResponseT { + return new SkeletonConfigResponseT( + this.bb!.createObjList(this.skeletonParts.bind(this), this.skeletonPartsLength()) + ); +} + + +unpackTo(_o: SkeletonConfigResponseT): void { + _o.skeletonParts = this.bb!.createObjList(this.skeletonParts.bind(this), this.skeletonPartsLength()); +} +} + +export class SkeletonConfigResponseT { +constructor( + public skeletonParts: (SkeletonPartT)[] = [] +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const skeletonParts = SkeletonConfigResponse.createSkeletonPartsVector(builder, builder.createObjectOffsetList(this.skeletonParts)); + + return SkeletonConfigResponse.createSkeletonConfigResponse(builder, + skeletonParts + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-part.ts b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-part.ts similarity index 93% rename from protocol/typescript/src/solarxr-protocol/rpc/skeleton-part.ts rename to protocol/typescript/src/solarxr_protocol/rpc/skeleton-part.ts index ab1a030a..59d3a184 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-part.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-part.ts @@ -1,87 +1,87 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { SkeletonBone } from '../../solarxr-protocol/rpc/skeleton-bone'; - - -export class SkeletonPart { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonPart { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSkeletonPart(bb:flatbuffers.ByteBuffer, obj?:SkeletonPart):SkeletonPart { - return (obj || new SkeletonPart()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSkeletonPart(bb:flatbuffers.ByteBuffer, obj?:SkeletonPart):SkeletonPart { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SkeletonPart()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -bone():SkeletonBone { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? this.bb!.readUint8(this.bb_pos + offset) : SkeletonBone.NONE; -} - -value():number { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; -} - -static startSkeletonPart(builder:flatbuffers.Builder) { - builder.startObject(2); -} - -static addBone(builder:flatbuffers.Builder, bone:SkeletonBone) { - builder.addFieldInt8(0, bone, SkeletonBone.NONE); -} - -static addValue(builder:flatbuffers.Builder, value:number) { - builder.addFieldFloat32(1, value, 0.0); -} - -static endSkeletonPart(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSkeletonPart(builder:flatbuffers.Builder, bone:SkeletonBone, value:number):flatbuffers.Offset { - SkeletonPart.startSkeletonPart(builder); - SkeletonPart.addBone(builder, bone); - SkeletonPart.addValue(builder, value); - return SkeletonPart.endSkeletonPart(builder); -} - -unpack(): SkeletonPartT { - return new SkeletonPartT( - this.bone(), - this.value() - ); -} - - -unpackTo(_o: SkeletonPartT): void { - _o.bone = this.bone(); - _o.value = this.value(); -} -} - -export class SkeletonPartT { -constructor( - public bone: SkeletonBone = SkeletonBone.NONE, - public value: number = 0.0 -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SkeletonPart.createSkeletonPart(builder, - this.bone, - this.value - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { SkeletonBone } from '../../solarxr_protocol/rpc/skeleton-bone'; + + +export class SkeletonPart { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonPart { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSkeletonPart(bb:flatbuffers.ByteBuffer, obj?:SkeletonPart):SkeletonPart { + return (obj || new SkeletonPart()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSkeletonPart(bb:flatbuffers.ByteBuffer, obj?:SkeletonPart):SkeletonPart { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SkeletonPart()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +bone():SkeletonBone { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? this.bb!.readUint8(this.bb_pos + offset) : SkeletonBone.NONE; +} + +value():number { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? this.bb!.readFloat32(this.bb_pos + offset) : 0.0; +} + +static startSkeletonPart(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addBone(builder:flatbuffers.Builder, bone:SkeletonBone) { + builder.addFieldInt8(0, bone, SkeletonBone.NONE); +} + +static addValue(builder:flatbuffers.Builder, value:number) { + builder.addFieldFloat32(1, value, 0.0); +} + +static endSkeletonPart(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSkeletonPart(builder:flatbuffers.Builder, bone:SkeletonBone, value:number):flatbuffers.Offset { + SkeletonPart.startSkeletonPart(builder); + SkeletonPart.addBone(builder, bone); + SkeletonPart.addValue(builder, value); + return SkeletonPart.endSkeletonPart(builder); +} + +unpack(): SkeletonPartT { + return new SkeletonPartT( + this.bone(), + this.value() + ); +} + + +unpackTo(_o: SkeletonPartT): void { + _o.bone = this.bone(); + _o.value = this.value(); +} +} + +export class SkeletonPartT { +constructor( + public bone: SkeletonBone = SkeletonBone.NONE, + public value: number = 0.0 +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SkeletonPart.createSkeletonPart(builder, + this.bone, + this.value + ); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-reset-all-request.ts b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-reset-all-request.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/skeleton-reset-all-request.ts rename to protocol/typescript/src/solarxr_protocol/rpc/skeleton-reset-all-request.ts index e6d83061..c5263e26 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/skeleton-reset-all-request.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/skeleton-reset-all-request.ts @@ -1,54 +1,54 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SkeletonResetAllRequest { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonResetAllRequest { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSkeletonResetAllRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonResetAllRequest):SkeletonResetAllRequest { - return (obj || new SkeletonResetAllRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSkeletonResetAllRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonResetAllRequest):SkeletonResetAllRequest { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SkeletonResetAllRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static startSkeletonResetAllRequest(builder:flatbuffers.Builder) { - builder.startObject(0); -} - -static endSkeletonResetAllRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSkeletonResetAllRequest(builder:flatbuffers.Builder):flatbuffers.Offset { - SkeletonResetAllRequest.startSkeletonResetAllRequest(builder); - return SkeletonResetAllRequest.endSkeletonResetAllRequest(builder); -} - -unpack(): SkeletonResetAllRequestT { - return new SkeletonResetAllRequestT(); -} - - -unpackTo(_o: SkeletonResetAllRequestT): void {} -} - -export class SkeletonResetAllRequestT { -constructor(){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SkeletonResetAllRequest.createSkeletonResetAllRequest(builder); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SkeletonResetAllRequest { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SkeletonResetAllRequest { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSkeletonResetAllRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonResetAllRequest):SkeletonResetAllRequest { + return (obj || new SkeletonResetAllRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSkeletonResetAllRequest(bb:flatbuffers.ByteBuffer, obj?:SkeletonResetAllRequest):SkeletonResetAllRequest { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SkeletonResetAllRequest()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static startSkeletonResetAllRequest(builder:flatbuffers.Builder) { + builder.startObject(0); +} + +static endSkeletonResetAllRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSkeletonResetAllRequest(builder:flatbuffers.Builder):flatbuffers.Offset { + SkeletonResetAllRequest.startSkeletonResetAllRequest(builder); + return SkeletonResetAllRequest.endSkeletonResetAllRequest(builder); +} + +unpack(): SkeletonResetAllRequestT { + return new SkeletonResetAllRequestT(); +} + + +unpackTo(_o: SkeletonResetAllRequestT): void {} +} + +export class SkeletonResetAllRequestT { +constructor(){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SkeletonResetAllRequest.createSkeletonResetAllRequest(builder); +} +} diff --git a/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts b/protocol/typescript/src/solarxr_protocol/rpc/steam-v-r-trackers-setting.ts similarity index 96% rename from protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts rename to protocol/typescript/src/solarxr_protocol/rpc/steam-v-r-trackers-setting.ts index 930dab70..6ae8dab0 100644 --- a/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts +++ b/protocol/typescript/src/solarxr_protocol/rpc/steam-v-r-trackers-setting.ts @@ -1,128 +1,128 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - - - -export class SteamVRTrackersSetting { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):SteamVRTrackersSetting { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsSteamVRTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:SteamVRTrackersSetting):SteamVRTrackersSetting { - return (obj || new SteamVRTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsSteamVRTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:SteamVRTrackersSetting):SteamVRTrackersSetting { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new SteamVRTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -waist():boolean { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -chest():boolean { - const offset = this.bb!.__offset(this.bb_pos, 6); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -legs():boolean { - const offset = this.bb!.__offset(this.bb_pos, 8); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -knees():boolean { - const offset = this.bb!.__offset(this.bb_pos, 10); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -elbows():boolean { - const offset = this.bb!.__offset(this.bb_pos, 12); - return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; -} - -static startSteamVRTrackersSetting(builder:flatbuffers.Builder) { - builder.startObject(5); -} - -static addWaist(builder:flatbuffers.Builder, waist:boolean) { - builder.addFieldInt8(0, +waist, +false); -} - -static addChest(builder:flatbuffers.Builder, chest:boolean) { - builder.addFieldInt8(1, +chest, +false); -} - -static addLegs(builder:flatbuffers.Builder, legs:boolean) { - builder.addFieldInt8(2, +legs, +false); -} - -static addKnees(builder:flatbuffers.Builder, knees:boolean) { - builder.addFieldInt8(3, +knees, +false); -} - -static addElbows(builder:flatbuffers.Builder, elbows:boolean) { - builder.addFieldInt8(4, +elbows, +false); -} - -static endSteamVRTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, chest:boolean, legs:boolean, knees:boolean, elbows:boolean):flatbuffers.Offset { - SteamVRTrackersSetting.startSteamVRTrackersSetting(builder); - SteamVRTrackersSetting.addWaist(builder, waist); - SteamVRTrackersSetting.addChest(builder, chest); - SteamVRTrackersSetting.addLegs(builder, legs); - SteamVRTrackersSetting.addKnees(builder, knees); - SteamVRTrackersSetting.addElbows(builder, elbows); - return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); -} - -unpack(): SteamVRTrackersSettingT { - return new SteamVRTrackersSettingT( - this.waist(), - this.chest(), - this.legs(), - this.knees(), - this.elbows() - ); -} - - -unpackTo(_o: SteamVRTrackersSettingT): void { - _o.waist = this.waist(); - _o.chest = this.chest(); - _o.legs = this.legs(); - _o.knees = this.knees(); - _o.elbows = this.elbows(); -} -} - -export class SteamVRTrackersSettingT { -constructor( - public waist: boolean = false, - public chest: boolean = false, - public legs: boolean = false, - public knees: boolean = false, - public elbows: boolean = false -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - return SteamVRTrackersSetting.createSteamVRTrackersSetting(builder, - this.waist, - this.chest, - this.legs, - this.knees, - this.elbows - ); -} -} +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + + + +export class SteamVRTrackersSetting { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):SteamVRTrackersSetting { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsSteamVRTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:SteamVRTrackersSetting):SteamVRTrackersSetting { + return (obj || new SteamVRTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsSteamVRTrackersSetting(bb:flatbuffers.ByteBuffer, obj?:SteamVRTrackersSetting):SteamVRTrackersSetting { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new SteamVRTrackersSetting()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +waist():boolean { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +chest():boolean { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +legs():boolean { + const offset = this.bb!.__offset(this.bb_pos, 8); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +knees():boolean { + const offset = this.bb!.__offset(this.bb_pos, 10); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +elbows():boolean { + const offset = this.bb!.__offset(this.bb_pos, 12); + return offset ? !!this.bb!.readInt8(this.bb_pos + offset) : false; +} + +static startSteamVRTrackersSetting(builder:flatbuffers.Builder) { + builder.startObject(5); +} + +static addWaist(builder:flatbuffers.Builder, waist:boolean) { + builder.addFieldInt8(0, +waist, +false); +} + +static addChest(builder:flatbuffers.Builder, chest:boolean) { + builder.addFieldInt8(1, +chest, +false); +} + +static addLegs(builder:flatbuffers.Builder, legs:boolean) { + builder.addFieldInt8(2, +legs, +false); +} + +static addKnees(builder:flatbuffers.Builder, knees:boolean) { + builder.addFieldInt8(3, +knees, +false); +} + +static addElbows(builder:flatbuffers.Builder, elbows:boolean) { + builder.addFieldInt8(4, +elbows, +false); +} + +static endSteamVRTrackersSetting(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + +static createSteamVRTrackersSetting(builder:flatbuffers.Builder, waist:boolean, chest:boolean, legs:boolean, knees:boolean, elbows:boolean):flatbuffers.Offset { + SteamVRTrackersSetting.startSteamVRTrackersSetting(builder); + SteamVRTrackersSetting.addWaist(builder, waist); + SteamVRTrackersSetting.addChest(builder, chest); + SteamVRTrackersSetting.addLegs(builder, legs); + SteamVRTrackersSetting.addKnees(builder, knees); + SteamVRTrackersSetting.addElbows(builder, elbows); + return SteamVRTrackersSetting.endSteamVRTrackersSetting(builder); +} + +unpack(): SteamVRTrackersSettingT { + return new SteamVRTrackersSettingT( + this.waist(), + this.chest(), + this.legs(), + this.knees(), + this.elbows() + ); +} + + +unpackTo(_o: SteamVRTrackersSettingT): void { + _o.waist = this.waist(); + _o.chest = this.chest(); + _o.legs = this.legs(); + _o.knees = this.knees(); + _o.elbows = this.elbows(); +} +} + +export class SteamVRTrackersSettingT { +constructor( + public waist: boolean = false, + public chest: boolean = false, + public legs: boolean = false, + public knees: boolean = false, + public elbows: boolean = false +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + return SteamVRTrackersSetting.createSteamVRTrackersSetting(builder, + this.waist, + this.chest, + this.legs, + this.knees, + this.elbows + ); +} +} diff --git a/schema/all.fbs b/schema/all.fbs index 59f184e7..ab39ceb1 100644 --- a/schema/all.fbs +++ b/schema/all.fbs @@ -2,6 +2,7 @@ include "data_feed/data_feed.fbs"; include "rpc.fbs"; +include "pub_sub/pub_sub.fbs"; namespace solarxr_protocol; @@ -33,4 +34,5 @@ namespace solarxr_protocol; table MessageBundle { data_feed_msgs: [solarxr_protocol.data_feed.DataFeedMessageHeader]; rpc_msgs: [solarxr_protocol.rpc.RpcMessageHeader]; + pub_sub_msgs: [solarxr_protocol.pub_sub.PubSubHeader]; } diff --git a/schema/datatypes/datatypes.fbs b/schema/datatypes/datatypes.fbs index 16370636..ba839dc1 100644 --- a/schema/datatypes/datatypes.fbs +++ b/schema/datatypes/datatypes.fbs @@ -136,3 +136,11 @@ struct Temperature { struct Ipv4Address { addr: uint32; } + +table Bytes { + b: [uint8]; +} + +table String { + s: string; +} diff --git a/schema/pub_sub/pub_sub.fbs b/schema/pub_sub/pub_sub.fbs new file mode 100644 index 00000000..d8c46d31 --- /dev/null +++ b/schema/pub_sub/pub_sub.fbs @@ -0,0 +1,59 @@ +/// Pub/Sub protocol. +/// +/// This protocol provides the pub-sub messaging pattern. This pattern is better suited +/// to communication between multiple applications because apps may have various +/// versions, are non-standardized, and may or may not be present. Unlike +/// Request/Response, no transactional state is needed on the server, and the meaning +/// of payloads can be determined in a decentralized manner via the topic system. +/// +/// Solar-XR still provides provides discovery and routing of the message, but the +/// actual message payload is application specific, and Solar-XR makes few if any +/// assumptions on its meaning. +/// +/// Example use case: +/// SlimeVR overlay has a visibility toggle, and the SlimeVR gui wishes to allow users +/// to control this in its GUI. So the GUI sends a key-value pair to the "settings" +/// topic of the SlimeVR overlay. The SlimeVR server will use this topic identifier to +/// forward the message payload to any application that is subscribed to that topic. +/// The server doesn't understand the meaning of the payload - all it sees is the topic +/// id, and the key-value pairs. The state of the overlay visibility isn't even held in +/// the server at all - all of that is maintained by the vr overlay application. + +include "topic.fbs"; +include "datatypes/datatypes.fbs"; + +namespace solarxr_protocol.pub_sub; + +union PubSubUnion { + Message, + SubscriptionRequest, + TopicHandleRequest, + TopicHandleResponse, +} + +table PubSubHeader { + u: PubSubUnion; +} + +union Payload { + solarxr_protocol.datatypes.String, + solarxr_protocol.datatypes.Bytes, + KeyValues, +} + +/// Data that is sent from publishers to subscribers +table Message { + topic: Topic; + payload: Payload; +} + + +/// Requests a subscription to `topic` +table SubscriptionRequest { + topic: Topic; +} + +table KeyValues { + keys: [string]; + values: [string]; +} diff --git a/schema/pub_sub/topic.fbs b/schema/pub_sub/topic.fbs new file mode 100644 index 00000000..ec904c7c --- /dev/null +++ b/schema/pub_sub/topic.fbs @@ -0,0 +1,40 @@ +namespace solarxr_protocol.pub_sub; + +/// A `TopicId` identifies an application-specific category of data. Because it +/// is application-specific, it is up to the application within the specified +/// organization to define its semantics/meaning. +/// +/// For example, "bob" may have an "overlay" app with a "settings" topic for controlling +/// the overlay visibility and other settings, as well as a "video feed" topic for +/// allowing other applications to display video data in a wrist mounted window in VR. +table TopicId { + /// The organization/developer that defines the meaning of this feature. Avoids name + /// clashes. Should be something unique - same idea as java package identifier. + organization: string; + /// The name of the application/device. Should be unique within the organization. + app_name: string; + /// The name of the topic. Should be unique within the application. + topic: string; +} + +/// A handle for the topic, allows referencing a topic without sending a huge +/// `TopicId`. +table TopicHandle { + id: uint16; +} + +union Topic { + TopicHandle, + TopicId, +} + +/// Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing +/// bandwidth, since `FeatureId` can be large. +table TopicHandleRequest { + id: TopicId; +} + +/// Response for `TopicHandleRequest` +table TopicHandleResponse { + handle: TopicHandle; +} From e5c44421f6772efc3ec24823a8940bd35bbefe39 Mon Sep 17 00:00:00 2001 From: lucas lelievre Date: Sun, 6 Nov 2022 04:08:42 +0100 Subject: [PATCH 8/9] Make that shit compile LOL (#48) --- .../generated/all_generated.h | 57 +++--- .../data_feed/DataFeedConfig.java | 8 +- .../data_feed/device_data/DeviceData.java | 8 +- .../data_feed/device_data/DeviceDataMask.java | 4 +- .../data_feed/tracker/TrackerData.java | 4 +- .../{String.java => StringTable.java} | 32 ++-- .../{StringT.java => StringTableT.java} | 4 +- .../hardware_info/HardwareStatus.java | 4 +- .../src/solarxr_protocol/pub_sub/Message.java | 6 +- .../src/solarxr_protocol/pub_sub/Payload.java | 4 +- .../pub_sub/PayloadUnion.java | 4 +- .../rpc/AssignTrackerRequest.java | 4 +- .../rpc/ChangeSettingsRequest.java | 8 +- .../rpc/SettingsResponse.java | 8 +- protocol/rust/src/generated/mod.rs | 4 +- .../data_feed/bone_generated.rs | 12 +- .../data_feed/data_feed_config_generated.rs | 12 +- .../data_feed/data_feed_message_generated.rs | 12 +- .../data_feed_message_header_generated.rs | 12 +- .../data_feed/data_feed_update_generated.rs | 12 +- .../device_data/device_data_generated.rs | 12 +- .../device_data/device_data_mask_generated.rs | 12 +- .../data_feed/poll_data_feed_generated.rs | 12 +- .../data_feed/start_data_feed_generated.rs | 12 +- .../tracker/tracker_data_generated.rs | 12 +- .../tracker/tracker_data_mask_generated.rs | 12 +- .../tracker/tracker_info_generated.rs | 12 +- .../datatypes/body_part_generated.rs | 12 +- .../datatypes/bytes_generated.rs | 12 +- .../datatypes/device_id_generated.rs | 16 +- .../datatypes/filtering_type_generated.rs | 12 +- .../firmware_error_code_generated.rs | 12 +- .../firmware_status_mask_generated.rs | 12 +- .../hardware_address_generated.rs | 16 +- .../hardware_info/hardware_info_generated.rs | 12 +- .../hardware_status_generated.rs | 12 +- .../hardware_info/imu_type_generated.rs | 12 +- .../hardware_info/mcu_type_generated.rs | 12 +- .../datatypes/hz_f32_generated.rs | 16 +- .../datatypes/ipv_4address_generated.rs | 16 +- .../datatypes/log_data_generated.rs | 12 +- .../datatypes/math/quat_generated.rs | 16 +- .../datatypes/math/vec_3f_generated.rs | 16 +- ...generated.rs => string_table_generated.rs} | 54 +++--- .../datatypes/temperature_generated.rs | 16 +- .../datatypes/tracker_id_generated.rs | 12 +- .../datatypes/tracker_role_generated.rs | 12 +- .../datatypes/tracker_status_generated.rs | 12 +- .../datatypes/transaction_id_generated.rs | 16 +- .../message_bundle_generated.rs | 12 +- .../pub_sub/key_values_generated.rs | 12 +- .../pub_sub/message_generated.rs | 24 +-- .../pub_sub/payload_generated.rs | 20 ++- .../pub_sub/pub_sub_header_generated.rs | 12 +- .../pub_sub/pub_sub_union_generated.rs | 12 +- .../pub_sub/subscription_request_generated.rs | 12 +- .../pub_sub/topic_generated.rs | 12 +- .../pub_sub/topic_handle_generated.rs | 12 +- .../pub_sub/topic_handle_request_generated.rs | 12 +- .../topic_handle_response_generated.rs | 12 +- .../pub_sub/topic_id_generated.rs | 12 +- .../rpc/assign_tracker_request_generated.rs | 12 +- .../rpc/auto_bone_epoch_response_generated.rs | 12 +- .../auto_bone_process_request_generated.rs | 12 +- ..._bone_process_status_response_generated.rs | 12 +- .../rpc/auto_bone_process_type_generated.rs | 12 +- .../rpc/change_settings_request_generated.rs | 12 +- ...hange_skeleton_config_request_generated.rs | 12 +- .../rpc/close_serial_request_generated.rs | 12 +- .../rpc/filtering_settings_generated.rs | 12 +- .../rpc/heartbeat_request_generated.rs | 12 +- .../rpc/heartbeat_response_generated.rs | 12 +- .../rpc/open_serial_request_generated.rs | 12 +- ...y_display_mode_change_request_generated.rs | 12 +- .../overlay_display_mode_request_generated.rs | 12 +- ...overlay_display_mode_response_generated.rs | 12 +- .../rpc/record_bvhrequest_generated.rs | 12 +- .../rpc/record_bvhstatus_generated.rs | 12 +- .../rpc/reset_request_generated.rs | 12 +- .../rpc/reset_response_generated.rs | 12 +- .../rpc/reset_type_generated.rs | 12 +- .../rpc/rpc_message_generated.rs | 12 +- .../rpc/rpc_message_header_generated.rs | 12 +- ...tracker_factory_reset_request_generated.rs | 12 +- ...rial_tracker_get_info_request_generated.rs | 12 +- ...serial_tracker_reboot_request_generated.rs | 12 +- .../rpc/serial_update_response_generated.rs | 12 +- .../rpc/set_wifi_request_generated.rs | 12 +- .../rpc/settings/model_ratios_generated.rs | 12 +- .../rpc/settings/model_settings_generated.rs | 12 +- .../rpc/settings/model_toggles_generated.rs | 12 +- .../rpc/settings_request_generated.rs | 12 +- .../rpc/settings_response_generated.rs | 12 +- .../rpc/skeleton_bone_generated.rs | 12 +- .../rpc/skeleton_config_request_generated.rs | 12 +- .../rpc/skeleton_config_response_generated.rs | 12 +- .../rpc/skeleton_part_generated.rs | 12 +- .../skeleton_reset_all_request_generated.rs | 12 +- .../rpc/steam_vrtrackers_setting_generated.rs | 12 +- protocol/typescript/src/all.ts | 166 +++++++++--------- .../data-feed}/bone.ts | 6 +- .../data-feed}/data-feed-config.ts | 4 +- .../data-feed}/data-feed-message-header.ts | 10 +- .../data-feed}/data-feed-message.ts | 8 +- .../data-feed}/data-feed-update.ts | 6 +- .../device-data}/device-data-mask.ts | 2 +- .../data-feed/device-data}/device-data.ts | 8 +- .../data-feed}/poll-data-feed.ts | 2 +- .../data-feed}/start-data-feed.ts | 2 +- .../data-feed}/tracker/tracker-data-mask.ts | 0 .../data-feed}/tracker/tracker-data.ts | 12 +- .../data-feed}/tracker/tracker-info.ts | 8 +- .../datatypes/body-part.ts | 0 .../datatypes/bytes.ts | 0 .../datatypes/device-id.ts | 0 .../datatypes/filtering-type.ts | 0 .../datatypes/firmware-error-code.ts | 0 .../hardware-info}/firmware-status-mask.ts | 0 .../hardware-info}/hardware-address.ts | 0 .../datatypes/hardware-info}/hardware-info.ts | 6 +- .../hardware-info}/hardware-status.ts | 25 ++- .../datatypes/hardware-info}/imu-type.ts | 0 .../datatypes/hardware-info}/mcu-type.ts | 0 .../datatypes/hz-f32.ts | 0 .../datatypes/ipv4address.ts} | 0 .../datatypes/log-data.ts | 0 .../datatypes/math/quat.ts | 0 .../datatypes/math/vec3f.ts | 0 .../datatypes/string-table.ts} | 34 ++-- .../datatypes/temperature.ts | 0 .../datatypes/tracker-id.ts | 2 +- .../datatypes/tracker-role.ts | 0 .../datatypes/tracker-status.ts | 0 .../datatypes/transaction-id.ts | 0 .../message-bundle.ts | 6 +- .../pub-sub}/key-values.ts | 0 .../pub-sub}/message.ts | 16 +- .../pub-sub}/payload.ts | 20 +-- .../pub-sub}/pub-sub-header.ts | 10 +- .../pub-sub}/pub-sub-union.ts | 8 +- .../pub-sub}/subscription-request.ts | 6 +- .../pub-sub}/topic-handle-request.ts | 2 +- .../pub-sub}/topic-handle-response.ts | 2 +- .../pub-sub}/topic-handle.ts | 0 .../pub-sub}/topic-id.ts | 0 .../pub-sub}/topic.ts | 4 +- .../rpc/assign-tracker-request.ts | 6 +- .../rpc/auto-bone-epoch-response.ts | 2 +- .../rpc/auto-bone-process-request.ts | 2 +- .../rpc/auto-bone-process-status-response.ts | 2 +- .../rpc/auto-bone-process-type.ts | 0 .../rpc/change-settings-request.ts | 6 +- .../rpc/change-skeleton-config-request.ts | 2 +- .../rpc/close-serial-request.ts | 0 .../rpc/filtering-settings.ts | 2 +- .../rpc/heartbeat-request.ts | 0 .../rpc/heartbeat-response.ts | 0 .../rpc/open-serial-request.ts | 0 .../overlay-display-mode-change-request.ts | 0 .../rpc/overlay-display-mode-request.ts | 0 .../rpc/overlay-display-mode-response.ts | 0 .../rpc/record-bvhrequest.ts} | 0 .../rpc/record-bvhstatus.ts} | 0 .../rpc/reset-request.ts | 2 +- .../rpc/reset-response.ts | 0 .../rpc/reset-type.ts | 0 .../rpc/rpc-message-header.ts | 56 +++--- .../rpc/rpc-message.ts | 52 +++--- .../serial-tracker-factory-reset-request.ts | 0 .../rpc/serial-tracker-get-info-request.ts | 0 .../rpc/serial-tracker-reboot-request.ts | 0 .../rpc/serial-update-response.ts | 0 .../rpc/set-wifi-request.ts | 0 .../rpc/settings-request.ts | 0 .../rpc/settings-response.ts | 6 +- .../rpc/settings/model-ratios.ts | 0 .../rpc/settings/model-settings.ts | 4 +- .../rpc/settings/model-toggles.ts | 0 .../rpc/skeleton-bone.ts | 0 .../rpc/skeleton-config-request.ts | 0 .../rpc/skeleton-config-response.ts | 2 +- .../rpc/skeleton-part.ts | 2 +- .../rpc/skeleton-reset-all-request.ts | 0 .../rpc/steam-vrtrackers-setting.ts} | 0 schema/datatypes/datatypes.fbs | 2 +- schema/pub_sub/pub_sub.fbs | 2 +- 186 files changed, 1068 insertions(+), 718 deletions(-) rename protocol/java/src/solarxr_protocol/datatypes/{String.java => StringTable.java} (51%) rename protocol/java/src/solarxr_protocol/datatypes/{StringT.java => StringTableT.java} (86%) rename protocol/rust/src/generated/solarxr_protocol/datatypes/{string_generated.rs => string_table_generated.rs} (61%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/bone.ts (94%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/data-feed-config.ts (96%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/data-feed-message-header.ts (87%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/data-feed-message.ts (80%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/data-feed-update.ts (95%) rename protocol/typescript/src/{solarxr_protocol/data_feed/device_data => solarxr-protocol/data-feed/device-data}/device-data-mask.ts (98%) rename protocol/typescript/src/{solarxr_protocol/data_feed/device_data => solarxr-protocol/data-feed/device-data}/device-data.ts (94%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/poll-data-feed.ts (95%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/start-data-feed.ts (96%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/tracker/tracker-data-mask.ts (100%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/tracker/tracker-data.ts (93%) rename protocol/typescript/src/{solarxr_protocol/data_feed => solarxr-protocol/data-feed}/tracker/tracker-info.ts (95%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/body-part.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/bytes.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/device-id.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/filtering-type.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/firmware-error-code.ts (100%) rename protocol/typescript/src/{solarxr_protocol/datatypes/hardware_info => solarxr-protocol/datatypes/hardware-info}/firmware-status-mask.ts (100%) rename protocol/typescript/src/{solarxr_protocol/datatypes/hardware_info => solarxr-protocol/datatypes/hardware-info}/hardware-address.ts (100%) rename protocol/typescript/src/{solarxr_protocol/datatypes/hardware_info => solarxr-protocol/datatypes/hardware-info}/hardware-info.ts (96%) rename protocol/typescript/src/{solarxr_protocol/datatypes/hardware_info => solarxr-protocol/datatypes/hardware-info}/hardware-status.ts (86%) rename protocol/typescript/src/{solarxr_protocol/datatypes/hardware_info => solarxr-protocol/datatypes/hardware-info}/imu-type.ts (100%) rename protocol/typescript/src/{solarxr_protocol/datatypes/hardware_info => solarxr-protocol/datatypes/hardware-info}/mcu-type.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/hz-f32.ts (100%) rename protocol/typescript/src/{solarxr_protocol/datatypes/ipv4-address.ts => solarxr-protocol/datatypes/ipv4address.ts} (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/log-data.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/math/quat.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/math/vec3f.ts (100%) rename protocol/typescript/src/{solarxr_protocol/datatypes/string.ts => solarxr-protocol/datatypes/string-table.ts} (51%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/temperature.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/tracker-id.ts (97%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/tracker-role.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/tracker-status.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/datatypes/transaction-id.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/message-bundle.ts (96%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/key-values.ts (100%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/message.ts (88%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/payload.ts (51%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/pub-sub-header.ts (91%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/pub-sub-union.ts (90%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/subscription-request.ts (94%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/topic-handle-request.ts (97%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/topic-handle-response.ts (96%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/topic-handle.ts (100%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/topic-id.ts (100%) rename protocol/typescript/src/{solarxr_protocol/pub_sub => solarxr-protocol/pub-sub}/topic.ts (86%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/assign-tracker-request.ts (95%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/auto-bone-epoch-response.ts (98%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/auto-bone-process-request.ts (97%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/auto-bone-process-status-response.ts (98%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/auto-bone-process-type.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/change-settings-request.ts (96%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/change-skeleton-config-request.ts (97%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/close-serial-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/filtering-settings.ts (97%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/heartbeat-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/heartbeat-response.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/open-serial-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/overlay-display-mode-change-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/overlay-display-mode-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/overlay-display-mode-response.ts (100%) rename protocol/typescript/src/{solarxr_protocol/rpc/record-b-v-h-request.ts => solarxr-protocol/rpc/record-bvhrequest.ts} (100%) rename protocol/typescript/src/{solarxr_protocol/rpc/record-b-v-h-status.ts => solarxr-protocol/rpc/record-bvhstatus.ts} (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/reset-request.ts (96%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/reset-response.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/reset-type.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/rpc-message-header.ts (80%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/rpc-message.ts (89%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/serial-tracker-factory-reset-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/serial-tracker-get-info-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/serial-tracker-reboot-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/serial-update-response.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/set-wifi-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/settings-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/settings-response.ts (95%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/settings/model-ratios.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/settings/model-settings.ts (95%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/settings/model-toggles.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/skeleton-bone.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/skeleton-config-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/skeleton-config-response.ts (98%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/skeleton-part.ts (97%) rename protocol/typescript/src/{solarxr_protocol => solarxr-protocol}/rpc/skeleton-reset-all-request.ts (100%) rename protocol/typescript/src/{solarxr_protocol/rpc/steam-v-r-trackers-setting.ts => solarxr-protocol/rpc/steam-vrtrackers-setting.ts} (100%) diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 754f5d9a..75dd5fff 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -6,6 +6,13 @@ #include "flatbuffers/flatbuffers.h" +// Ensure the included flatbuffers.h is the same version as when this file was +// generated, otherwise it may not be compatible. +static_assert(FLATBUFFERS_VERSION_MAJOR == 2 && + FLATBUFFERS_VERSION_MINOR == 0 && + FLATBUFFERS_VERSION_REVISION == 6, + "Non-compatible flatbuffers version included"); + namespace solarxr_protocol { namespace datatypes { @@ -28,8 +35,8 @@ struct Ipv4Address; struct Bytes; struct BytesBuilder; -struct String; -struct StringBuilder; +struct StringTable; +struct StringTableBuilder; namespace hardware_info { @@ -1186,7 +1193,7 @@ bool VerifyPubSubUnionVector(flatbuffers::Verifier &verifier, const flatbuffers: enum class Payload : uint8_t { NONE = 0, - solarxr_protocol_datatypes_String = 1, + solarxr_protocol_datatypes_StringTable = 1, solarxr_protocol_datatypes_Bytes = 2, KeyValues = 3, MIN = NONE, @@ -1196,7 +1203,7 @@ enum class Payload : uint8_t { inline const Payload (&EnumValuesPayload())[4] { static const Payload values[] = { Payload::NONE, - Payload::solarxr_protocol_datatypes_String, + Payload::solarxr_protocol_datatypes_StringTable, Payload::solarxr_protocol_datatypes_Bytes, Payload::KeyValues }; @@ -1206,7 +1213,7 @@ inline const Payload (&EnumValuesPayload())[4] { inline const char * const *EnumNamesPayload() { static const char * const names[5] = { "NONE", - "solarxr_protocol_datatypes_String", + "solarxr_protocol_datatypes_StringTable", "solarxr_protocol_datatypes_Bytes", "KeyValues", nullptr @@ -1224,8 +1231,8 @@ template struct PayloadTraits { static const Payload enum_value = Payload::NONE; }; -template<> struct PayloadTraits { - static const Payload enum_value = Payload::solarxr_protocol_datatypes_String; +template<> struct PayloadTraits { + static const Payload enum_value = Payload::solarxr_protocol_datatypes_StringTable; }; template<> struct PayloadTraits { @@ -1598,8 +1605,8 @@ inline flatbuffers::Offset CreateBytesDirect( b__); } -struct String FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef StringBuilder Builder; +struct StringTable FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StringTableBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { VT_S = 4 }; @@ -1614,37 +1621,37 @@ struct String FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { } }; -struct StringBuilder { - typedef String Table; +struct StringTableBuilder { + typedef StringTable Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; void add_s(flatbuffers::Offset s) { - fbb_.AddOffset(String::VT_S, s); + fbb_.AddOffset(StringTable::VT_S, s); } - explicit StringBuilder(flatbuffers::FlatBufferBuilder &_fbb) + explicit StringTableBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateString( +inline flatbuffers::Offset CreateStringTable( flatbuffers::FlatBufferBuilder &_fbb, flatbuffers::Offset s = 0) { - StringBuilder builder_(_fbb); + StringTableBuilder builder_(_fbb); builder_.add_s(s); return builder_.Finish(); } -inline flatbuffers::Offset CreateStringDirect( +inline flatbuffers::Offset CreateStringTableDirect( flatbuffers::FlatBufferBuilder &_fbb, const char *s = nullptr) { auto s__ = s ? _fbb.CreateString(s) : 0; - return solarxr_protocol::datatypes::CreateString( + return solarxr_protocol::datatypes::CreateStringTable( _fbb, s__); } @@ -5278,8 +5285,8 @@ struct Message FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { return GetPointer(VT_PAYLOAD); } template const T *payload_as() const; - const solarxr_protocol::datatypes::String *payload_as_solarxr_protocol_datatypes_String() const { - return payload_type() == solarxr_protocol::pub_sub::Payload::solarxr_protocol_datatypes_String ? static_cast(payload()) : nullptr; + const solarxr_protocol::datatypes::StringTable *payload_as_solarxr_protocol_datatypes_StringTable() const { + return payload_type() == solarxr_protocol::pub_sub::Payload::solarxr_protocol_datatypes_StringTable ? static_cast(payload()) : nullptr; } const solarxr_protocol::datatypes::Bytes *payload_as_solarxr_protocol_datatypes_Bytes() const { return payload_type() == solarxr_protocol::pub_sub::Payload::solarxr_protocol_datatypes_Bytes ? static_cast(payload()) : nullptr; @@ -5307,8 +5314,8 @@ template<> inline const solarxr_protocol::pub_sub::TopicId *Message::topic_as inline const solarxr_protocol::datatypes::String *Message::payload_as() const { - return payload_as_solarxr_protocol_datatypes_String(); +template<> inline const solarxr_protocol::datatypes::StringTable *Message::payload_as() const { + return payload_as_solarxr_protocol_datatypes_StringTable(); } template<> inline const solarxr_protocol::datatypes::Bytes *Message::payload_as() const { @@ -5853,8 +5860,8 @@ inline bool VerifyPayload(flatbuffers::Verifier &verifier, const void *obj, Payl case Payload::NONE: { return true; } - case Payload::solarxr_protocol_datatypes_String: { - auto ptr = reinterpret_cast(obj); + case Payload::solarxr_protocol_datatypes_StringTable: { + auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } case Payload::solarxr_protocol_datatypes_Bytes: { diff --git a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java index 120645df..cd16f347 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java +++ b/protocol/java/src/solarxr_protocol/data_feed/DataFeedConfig.java @@ -76,13 +76,13 @@ public void unpackTo(DataFeedConfigT _o) { } public static int pack(FlatBufferBuilder builder, DataFeedConfigT _o) { if (_o == null) return 0; - int _data_mask = _o.getDataMask() == null ? 0 : solarxr_protocol.data_feed.device_data.DeviceDataMask.pack(builder, _o.getDataMask()); - int _synthetic_trackers_mask = _o.getSyntheticTrackersMask() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getSyntheticTrackersMask()); + int _dataMask = _o.getDataMask() == null ? 0 : solarxr_protocol.data_feed.device_data.DeviceDataMask.pack(builder, _o.getDataMask()); + int _syntheticTrackersMask = _o.getSyntheticTrackersMask() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getSyntheticTrackersMask()); return createDataFeedConfig( builder, _o.getMinimumTimeSinceLast(), - _data_mask, - _synthetic_trackers_mask, + _dataMask, + _syntheticTrackersMask, _o.getBoneMask()); } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java index efaf97e0..d211f051 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java +++ b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceData.java @@ -88,8 +88,8 @@ public void unpackTo(DeviceDataT _o) { public static int pack(FlatBufferBuilder builder, DeviceDataT _o) { if (_o == null) return 0; int _customName = _o.getCustomName() == null ? 0 : builder.createString(_o.getCustomName()); - int _hardware_info = _o.getHardwareInfo() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareInfo.pack(builder, _o.getHardwareInfo()); - int _hardware_status = _o.getHardwareStatus() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareStatus.pack(builder, _o.getHardwareStatus()); + int _hardwareInfo = _o.getHardwareInfo() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareInfo.pack(builder, _o.getHardwareInfo()); + int _hardwareStatus = _o.getHardwareStatus() == null ? 0 : solarxr_protocol.datatypes.hardware_info.HardwareStatus.pack(builder, _o.getHardwareStatus()); int _trackers = 0; if (_o.getTrackers() != null) { int[] __trackers = new int[_o.getTrackers().length]; @@ -100,8 +100,8 @@ public static int pack(FlatBufferBuilder builder, DeviceDataT _o) { startDeviceData(builder); addId(builder, solarxr_protocol.datatypes.DeviceId.pack(builder, _o.getId())); addCustomName(builder, _customName); - addHardwareInfo(builder, _hardware_info); - addHardwareStatus(builder, _hardware_status); + addHardwareInfo(builder, _hardwareInfo); + addHardwareStatus(builder, _hardwareStatus); addTrackers(builder, _trackers); return endDeviceData(builder); } diff --git a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java index c727f337..fedce848 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java +++ b/protocol/java/src/solarxr_protocol/data_feed/device_data/DeviceDataMask.java @@ -69,10 +69,10 @@ public void unpackTo(DeviceDataMaskT _o) { } public static int pack(FlatBufferBuilder builder, DeviceDataMaskT _o) { if (_o == null) return 0; - int _tracker_data = _o.getTrackerData() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getTrackerData()); + int _trackerData = _o.getTrackerData() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerDataMask.pack(builder, _o.getTrackerData()); return createDeviceDataMask( builder, - _tracker_data, + _trackerData, _o.getDeviceData()); } } diff --git a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java index aa6c5727..057de404 100644 --- a/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java +++ b/protocol/java/src/solarxr_protocol/data_feed/tracker/TrackerData.java @@ -95,10 +95,10 @@ public void unpackTo(TrackerDataT _o) { } public static int pack(FlatBufferBuilder builder, TrackerDataT _o) { if (_o == null) return 0; - int _tracker_id = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); int _info = _o.getInfo() == null ? 0 : solarxr_protocol.data_feed.tracker.TrackerInfo.pack(builder, _o.getInfo()); startTrackerData(builder); - addTrackerId(builder, _tracker_id); + addTrackerId(builder, _trackerId); addInfo(builder, _info); addStatus(builder, _o.getStatus()); addRotation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getRotation())); diff --git a/protocol/java/src/solarxr_protocol/datatypes/String.java b/protocol/java/src/solarxr_protocol/datatypes/StringTable.java similarity index 51% rename from protocol/java/src/solarxr_protocol/datatypes/String.java rename to protocol/java/src/solarxr_protocol/datatypes/StringTable.java index 69699fd3..d6c13749 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/String.java +++ b/protocol/java/src/solarxr_protocol/datatypes/StringTable.java @@ -8,27 +8,27 @@ import com.google.flatbuffers.*; @SuppressWarnings("unused") -public final class String extends Table { +public final class StringTable extends Table { public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static String getRootAsString(ByteBuffer _bb) { return getRootAsString(_bb, new String()); } - public static String getRootAsString(ByteBuffer _bb, String obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public static StringTable getRootAsStringTable(ByteBuffer _bb) { return getRootAsStringTable(_bb, new StringTable()); } + public static StringTable getRootAsStringTable(ByteBuffer _bb, StringTable 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 String __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + public StringTable __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } public String s() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } public ByteBuffer sAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } public ByteBuffer sInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } - public static int createString(FlatBufferBuilder builder, + public static int createStringTable(FlatBufferBuilder builder, int sOffset) { builder.startTable(1); - String.addS(builder, sOffset); - return String.endString(builder); + StringTable.addS(builder, sOffset); + return StringTable.endStringTable(builder); } - public static void startString(FlatBufferBuilder builder) { builder.startTable(1); } + public static void startStringTable(FlatBufferBuilder builder) { builder.startTable(1); } public static void addS(FlatBufferBuilder builder, int sOffset) { builder.addOffset(0, sOffset, 0); } - public static int endString(FlatBufferBuilder builder) { + public static int endStringTable(FlatBufferBuilder builder) { int o = builder.endTable(); return o; } @@ -36,22 +36,22 @@ public static int endString(FlatBufferBuilder builder) { 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 String get(int j) { return get(new String(), j); } - public String get(String obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + public StringTable get(int j) { return get(new StringTable(), j); } + public StringTable get(StringTable obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } } - public StringT unpack() { - StringT _o = new StringT(); + public StringTableT unpack() { + StringTableT _o = new StringTableT(); unpackTo(_o); return _o; } - public void unpackTo(StringT _o) { + public void unpackTo(StringTableT _o) { String _oS = s(); _o.setS(_oS); } - public static int pack(FlatBufferBuilder builder, StringT _o) { + public static int pack(FlatBufferBuilder builder, StringTableT _o) { if (_o == null) return 0; int _s = _o.getS() == null ? 0 : builder.createString(_o.getS()); - return createString( + return createStringTable( builder, _s); } diff --git a/protocol/java/src/solarxr_protocol/datatypes/StringT.java b/protocol/java/src/solarxr_protocol/datatypes/StringTableT.java similarity index 86% rename from protocol/java/src/solarxr_protocol/datatypes/StringT.java rename to protocol/java/src/solarxr_protocol/datatypes/StringTableT.java index a46ae1f3..193f556d 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/StringT.java +++ b/protocol/java/src/solarxr_protocol/datatypes/StringTableT.java @@ -7,7 +7,7 @@ import java.util.*; import com.google.flatbuffers.*; -public class StringT { +public class StringTableT { private String s; public String getS() { return s; } @@ -15,7 +15,7 @@ public class StringT { public void setS(String s) { this.s = s; } - public StringT() { + public StringTableT() { this.s = null; } } diff --git a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java index 49d44e23..3302cecc 100644 --- a/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java +++ b/protocol/java/src/solarxr_protocol/datatypes/hardware_info/HardwareStatus.java @@ -107,7 +107,7 @@ public void unpackTo(HardwareStatusT _o) { } public static int pack(FlatBufferBuilder builder, HardwareStatusT _o) { if (_o == null) return 0; - int _log_data = _o.getLogData() == null ? 0 : solarxr_protocol.datatypes.LogData.pack(builder, _o.getLogData()); + int _logData = _o.getLogData() == null ? 0 : solarxr_protocol.datatypes.LogData.pack(builder, _o.getLogData()); return createHardwareStatus( builder, _o.getErrorStatus(), @@ -117,7 +117,7 @@ public static int pack(FlatBufferBuilder builder, HardwareStatusT _o) { _o.getMcuTemp(), _o.getBatteryVoltage(), _o.getBatteryPctEstimate(), - _log_data); + _logData); } } diff --git a/protocol/java/src/solarxr_protocol/pub_sub/Message.java b/protocol/java/src/solarxr_protocol/pub_sub/Message.java index c2e1a51b..6b6a3aac 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/Message.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/Message.java @@ -79,9 +79,9 @@ public void unpackTo(MessageT _o) { _oPayload.setType(_oPayloadType); Table _oPayloadValue; switch (_oPayloadType) { - case solarxr_protocol.pub_sub.Payload.solarxr_protocol_datatypes_String: - _oPayloadValue = payload(new solarxr_protocol.datatypes.String()); - _oPayload.setValue(_oPayloadValue != null ? ((solarxr_protocol.datatypes.String) _oPayloadValue).unpack() : null); + case solarxr_protocol.pub_sub.Payload.solarxr_protocol_datatypes_StringTable: + _oPayloadValue = payload(new solarxr_protocol.datatypes.StringTable()); + _oPayload.setValue(_oPayloadValue != null ? ((solarxr_protocol.datatypes.StringTable) _oPayloadValue).unpack() : null); break; case solarxr_protocol.pub_sub.Payload.solarxr_protocol_datatypes_Bytes: _oPayloadValue = payload(new solarxr_protocol.datatypes.Bytes()); diff --git a/protocol/java/src/solarxr_protocol/pub_sub/Payload.java b/protocol/java/src/solarxr_protocol/pub_sub/Payload.java index 7048d271..a6c5bba7 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/Payload.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/Payload.java @@ -6,11 +6,11 @@ public final class Payload { private Payload() { } public static final byte NONE = 0; - public static final byte solarxr_protocol_datatypes_String = 1; + public static final byte solarxr_protocol_datatypes_StringTable = 1; public static final byte solarxr_protocol_datatypes_Bytes = 2; public static final byte KeyValues = 3; - public static final String[] names = { "NONE", "solarxr_protocol_datatypes_String", "solarxr_protocol_datatypes_Bytes", "KeyValues", }; + public static final String[] names = { "NONE", "solarxr_protocol_datatypes_StringTable", "solarxr_protocol_datatypes_Bytes", "KeyValues", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java index 23b8530a..a54ee59f 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PayloadUnion.java @@ -21,13 +21,13 @@ public PayloadUnion() { this.value = null; } - public solarxr_protocol.datatypes.StringT assolarxr_protocol_datatypes_String() { return (solarxr_protocol.datatypes.StringT) value; } + public solarxr_protocol.datatypes.StringTableT assolarxr_protocol_datatypes_StringTable() { return (solarxr_protocol.datatypes.StringTableT) value; } public solarxr_protocol.datatypes.BytesT assolarxr_protocol_datatypes_Bytes() { return (solarxr_protocol.datatypes.BytesT) value; } public solarxr_protocol.pub_sub.KeyValuesT asKeyValues() { return (solarxr_protocol.pub_sub.KeyValuesT) value; } public static int pack(FlatBufferBuilder builder, PayloadUnion _o) { switch (_o.type) { - case Payload.solarxr_protocol_datatypes_String: return solarxr_protocol.datatypes.String.pack(builder, _o.assolarxr_protocol_datatypes_String()); + case Payload.solarxr_protocol_datatypes_StringTable: return solarxr_protocol.datatypes.StringTable.pack(builder, _o.assolarxr_protocol_datatypes_StringTable()); case Payload.solarxr_protocol_datatypes_Bytes: return solarxr_protocol.datatypes.Bytes.pack(builder, _o.assolarxr_protocol_datatypes_Bytes()); case Payload.KeyValues: return solarxr_protocol.pub_sub.KeyValues.pack(builder, _o.asKeyValues()); default: return 0; diff --git a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java index cf5f3f6a..bffe541b 100644 --- a/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/AssignTrackerRequest.java @@ -57,10 +57,10 @@ public void unpackTo(AssignTrackerRequestT _o) { } public static int pack(FlatBufferBuilder builder, AssignTrackerRequestT _o) { if (_o == null) return 0; - int _tracker_id = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); + int _trackerId = _o.getTrackerId() == null ? 0 : solarxr_protocol.datatypes.TrackerId.pack(builder, _o.getTrackerId()); int _displayName = _o.getDisplayName() == null ? 0 : builder.createString(_o.getDisplayName()); startAssignTrackerRequest(builder); - addTrackerId(builder, _tracker_id); + addTrackerId(builder, _trackerId); addBodyPosition(builder, _o.getBodyPosition()); addMountingRotation(builder, solarxr_protocol.datatypes.math.Quat.pack(builder, _o.getMountingRotation())); addDisplayName(builder, _displayName); diff --git a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java index 110cf8fb..af3f00b1 100644 --- a/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java +++ b/protocol/java/src/solarxr_protocol/rpc/ChangeSettingsRequest.java @@ -63,14 +63,14 @@ public void unpackTo(ChangeSettingsRequestT _o) { } public static int pack(FlatBufferBuilder builder, ChangeSettingsRequestT _o) { if (_o == null) return 0; - int _steam_vr_trackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); + int _steamVrTrackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); int _filtering = _o.getFiltering() == null ? 0 : solarxr_protocol.rpc.FilteringSettings.pack(builder, _o.getFiltering()); - int _model_settings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); + int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); return createChangeSettingsRequest( builder, - _steam_vr_trackers, + _steamVrTrackers, _filtering, - _model_settings); + _modelSettings); } } diff --git a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java index 717bb727..7d2b7085 100644 --- a/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java +++ b/protocol/java/src/solarxr_protocol/rpc/SettingsResponse.java @@ -63,14 +63,14 @@ public void unpackTo(SettingsResponseT _o) { } public static int pack(FlatBufferBuilder builder, SettingsResponseT _o) { if (_o == null) return 0; - int _steam_vr_trackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); + int _steamVrTrackers = _o.getSteamVrTrackers() == null ? 0 : solarxr_protocol.rpc.SteamVRTrackersSetting.pack(builder, _o.getSteamVrTrackers()); int _filtering = _o.getFiltering() == null ? 0 : solarxr_protocol.rpc.FilteringSettings.pack(builder, _o.getFiltering()); - int _model_settings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); + int _modelSettings = _o.getModelSettings() == null ? 0 : solarxr_protocol.rpc.settings.ModelSettings.pack(builder, _o.getModelSettings()); return createSettingsResponse( builder, - _steam_vr_trackers, + _steamVrTrackers, _filtering, - _model_settings); + _modelSettings); } } diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 58806d58..89183b9c 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -84,8 +84,8 @@ pub mod solarxr_protocol { pub use self::ipv_4address_generated::*; mod bytes_generated; pub use self::bytes_generated::*; - mod string_generated; - pub use self::string_generated::*; + mod string_table_generated; + pub use self::string_table_generated::*; } // datatypes pub mod pub_sub { use super::*; diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs index 07f86eec..0ab83984 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/bone_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 BoneOffset {} @@ -138,8 +142,8 @@ impl<'a: 'b, 'b> BoneBuilder<'a, 'b> { } } -impl std::fmt::Debug for Bone<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for Bone<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Bone"); ds.field("body_part", &self.body_part()); ds.field("rotation_g", &self.rotation_g()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs index c69fda19..791c248f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_config_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 DataFeedConfigOffset {} @@ -134,8 +138,8 @@ impl<'a: 'b, 'b> DataFeedConfigBuilder<'a, 'b> { } } -impl std::fmt::Debug for DataFeedConfig<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for DataFeedConfig<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DataFeedConfig"); ds.field("minimum_time_since_last", &self.minimum_time_since_last()); ds.field("data_mask", &self.data_mask()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs index 8f9a0fc8..e83e5401 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -50,8 +54,8 @@ impl DataFeedMessage { } } } -impl std::fmt::Debug for DataFeedMessage { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for DataFeedMessage { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs index 78889b6a..e8ba12c1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_message_header_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 DataFeedMessageHeaderOffset {} @@ -151,8 +155,8 @@ impl<'a: 'b, 'b> DataFeedMessageHeaderBuilder<'a, 'b> { } } -impl std::fmt::Debug for DataFeedMessageHeader<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for DataFeedMessageHeader<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DataFeedMessageHeader"); ds.field("message_type", &self.message_type()); match self.message_type() { diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs index 516ed76c..300392ad 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/data_feed_update_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 DataFeedUpdateOffset {} @@ -125,8 +129,8 @@ impl<'a: 'b, 'b> DataFeedUpdateBuilder<'a, 'b> { } } -impl std::fmt::Debug for DataFeedUpdate<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for DataFeedUpdate<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DataFeedUpdate"); ds.field("devices", &self.devices()); ds.field("synthetic_trackers", &self.synthetic_trackers()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs index 9f93c7b1..2a6fadf4 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 DeviceDataOffset {} @@ -151,8 +155,8 @@ impl<'a: 'b, 'b> DeviceDataBuilder<'a, 'b> { } } -impl std::fmt::Debug for DeviceData<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for DeviceData<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DeviceData"); ds.field("id", &self.id()); ds.field("custom_name", &self.custom_name()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs index 760456cf..8e03051d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/device_data/device_data_mask_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 DeviceDataMaskOffset {} @@ -112,8 +116,8 @@ impl<'a: 'b, 'b> DeviceDataMaskBuilder<'a, 'b> { } } -impl std::fmt::Debug for DeviceDataMask<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for DeviceDataMask<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("DeviceDataMask"); ds.field("tracker_data", &self.tracker_data()); ds.field("device_data", &self.device_data()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs index 58553edb..42fe13d0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/poll_data_feed_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 PollDataFeedOffset {} @@ -93,8 +97,8 @@ impl<'a: 'b, 'b> PollDataFeedBuilder<'a, 'b> { } } -impl std::fmt::Debug for PollDataFeed<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for PollDataFeed<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("PollDataFeed"); ds.field("config", &self.config()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs index 8b735181..758d10c1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/start_data_feed_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 StartDataFeedOffset {} @@ -99,8 +103,8 @@ impl<'a: 'b, 'b> StartDataFeedBuilder<'a, 'b> { } } -impl std::fmt::Debug for StartDataFeed<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for StartDataFeed<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("StartDataFeed"); ds.field("data_feeds", &self.data_feeds()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs index 1bd9c921..241d7b37 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TrackerDataOffset {} @@ -191,8 +195,8 @@ impl<'a: 'b, 'b> TrackerDataBuilder<'a, 'b> { } } -impl std::fmt::Debug for TrackerData<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TrackerData<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TrackerData"); ds.field("tracker_id", &self.tracker_id()); ds.field("info", &self.info()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs index 78f6c014..9f1062df 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_data_mask_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TrackerDataMaskOffset {} @@ -170,8 +174,8 @@ impl<'a: 'b, 'b> TrackerDataMaskBuilder<'a, 'b> { } } -impl std::fmt::Debug for TrackerDataMask<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TrackerDataMask<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TrackerDataMask"); ds.field("info", &self.info()); ds.field("status", &self.status()); diff --git a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs index 9c933994..9e4ef944 100644 --- a/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/data_feed/tracker/tracker_info_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TrackerInfoOffset {} @@ -188,8 +192,8 @@ impl<'a: 'b, 'b> TrackerInfoBuilder<'a, 'b> { } } -impl std::fmt::Debug for TrackerInfo<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TrackerInfo<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TrackerInfo"); ds.field("imu_type", &self.imu_type()); ds.field("body_part", &self.body_part()); diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs index a8d60444..00c9cce6 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/body_part_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -120,8 +124,8 @@ impl BodyPart { } } } -impl std::fmt::Debug for BodyPart { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for BodyPart { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs index 138d6fd1..9c23459c 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/bytes_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 BytesOffset {} @@ -91,8 +95,8 @@ impl<'a: 'b, 'b> BytesBuilder<'a, 'b> { } } -impl std::fmt::Debug for Bytes<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for Bytes<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Bytes"); ds.field("b", &self.b()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs index 9b0216c2..2e4bc37f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/device_id_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; /// A unique ID for the device. IDs are not guaranteed to be the same after @@ -15,8 +19,8 @@ impl Default for DeviceId { Self([0; 1]) } } -impl std::fmt::Debug for DeviceId { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for DeviceId { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("DeviceId") .field("id", &self.id()) .finish() @@ -44,7 +48,7 @@ impl<'b> flatbuffers::Push for DeviceId { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const DeviceId as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const DeviceId as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -55,7 +59,7 @@ impl<'b> flatbuffers::Push for &'b DeviceId { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const DeviceId as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const DeviceId as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs index ba6f4d53..88285f8b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/filtering_type_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -43,8 +47,8 @@ impl FilteringType { } } } -impl std::fmt::Debug for FilteringType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for FilteringType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs index b6b3238d..7b18d78d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/firmware_error_code_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -47,8 +51,8 @@ impl FirmwareErrorCode { } } } -impl std::fmt::Debug for FirmwareErrorCode { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for FirmwareErrorCode { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs index b1605dc8..981e06e2 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/firmware_status_mask_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 FirmwareStatusMaskOffset {} @@ -170,8 +174,8 @@ impl<'a: 'b, 'b> FirmwareStatusMaskBuilder<'a, 'b> { } } -impl std::fmt::Debug for FirmwareStatusMask<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for FirmwareStatusMask<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("FirmwareStatusMask"); ds.field("error_status", &self.error_status()); ds.field("tps", &self.tps()); diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs index 4c9c51e2..f32ff966 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_address_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; /// A MAC address or a bluetooth address, or some other uniquely identifying address @@ -16,8 +20,8 @@ impl Default for HardwareAddress { Self([0; 8]) } } -impl std::fmt::Debug for HardwareAddress { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for HardwareAddress { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("HardwareAddress") .field("addr", &self.addr()) .finish() @@ -45,7 +49,7 @@ impl<'b> flatbuffers::Push for HardwareAddress { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const HardwareAddress as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const HardwareAddress as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -56,7 +60,7 @@ impl<'b> flatbuffers::Push for &'b HardwareAddress { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const HardwareAddress as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const HardwareAddress as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs index 41098369..1b040f5e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_info_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 HardwareInfoOffset {} @@ -188,8 +192,8 @@ impl<'a: 'b, 'b> HardwareInfoBuilder<'a, 'b> { } } -impl std::fmt::Debug for HardwareInfo<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for HardwareInfo<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("HardwareInfo"); ds.field("mcu_id", &self.mcu_id()); ds.field("display_name", &self.display_name()); diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs index 1515f470..d2576173 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/hardware_status_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 HardwareStatusOffset {} @@ -185,8 +189,8 @@ impl<'a: 'b, 'b> HardwareStatusBuilder<'a, 'b> { } } -impl std::fmt::Debug for HardwareStatus<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for HardwareStatus<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("HardwareStatus"); ds.field("error_status", &self.error_status()); ds.field("tps", &self.tps()); diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs index 9b26d5c1..b0401965 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/imu_type_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -54,8 +58,8 @@ impl ImuType { } } } -impl std::fmt::Debug for ImuType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for ImuType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs index cf4c8280..a57d88dc 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hardware_info/mcu_type_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -50,8 +54,8 @@ impl McuType { } } } -impl std::fmt::Debug for McuType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for McuType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs index 75f8801c..07a77681 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/hz_f32_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; /// Frequency as 32 bit float @@ -14,8 +18,8 @@ impl Default for HzF32 { Self([0; 4]) } } -impl std::fmt::Debug for HzF32 { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for HzF32 { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("HzF32") .field("f", &self.f()) .finish() @@ -43,7 +47,7 @@ impl<'b> flatbuffers::Push for HzF32 { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const HzF32 as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const HzF32 as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -54,7 +58,7 @@ impl<'b> flatbuffers::Push for &'b HzF32 { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const HzF32 as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const HzF32 as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs index 3cb299e2..9fca7bc4 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/ipv_4address_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; /// The 4 bytes of an ip address are stored in 32 bits in big endian order. @@ -15,8 +19,8 @@ impl Default for Ipv4Address { Self([0; 4]) } } -impl std::fmt::Debug for Ipv4Address { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for Ipv4Address { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("Ipv4Address") .field("addr", &self.addr()) .finish() @@ -44,7 +48,7 @@ impl<'b> flatbuffers::Push for Ipv4Address { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const Ipv4Address as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const Ipv4Address as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -55,7 +59,7 @@ impl<'b> flatbuffers::Push for &'b Ipv4Address { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const Ipv4Address as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const Ipv4Address as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs index 5d6e46ef..ed7f4dff 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/log_data_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 LogDataOffset {} @@ -105,8 +109,8 @@ impl<'a: 'b, 'b> LogDataBuilder<'a, 'b> { } } -impl std::fmt::Debug for LogData<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for LogData<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("LogData"); ds.field("message", &self.message()); ds.field("data", &self.data()); diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs index 7f832de0..c9ac72ab 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/quat_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; // struct Quat, aligned to 4 @@ -13,8 +17,8 @@ impl Default for Quat { Self([0; 16]) } } -impl std::fmt::Debug for Quat { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for Quat { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("Quat") .field("x", &self.x()) .field("y", &self.y()) @@ -45,7 +49,7 @@ impl<'b> flatbuffers::Push for Quat { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const Quat as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const Quat as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -56,7 +60,7 @@ impl<'b> flatbuffers::Push for &'b Quat { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const Quat as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const Quat as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs index 3ca9f13f..ff369116 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/math/vec_3f_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; // struct Vec3f, aligned to 4 @@ -13,8 +17,8 @@ impl Default for Vec3f { Self([0; 12]) } } -impl std::fmt::Debug for Vec3f { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for Vec3f { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("Vec3f") .field("x", &self.x()) .field("y", &self.y()) @@ -44,7 +48,7 @@ impl<'b> flatbuffers::Push for Vec3f { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const Vec3f as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const Vec3f as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -55,7 +59,7 @@ impl<'b> flatbuffers::Push for &'b Vec3f { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const Vec3f as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const Vec3f as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs similarity index 61% rename from protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs rename to protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs index ebfe499b..56f83694 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/string_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/string_table_generated.rs @@ -1,37 +1,41 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 StringOffset {} +pub enum StringTableOffset {} #[derive(Copy, Clone, PartialEq)] -pub struct String<'a> { +pub struct StringTable<'a> { pub _tab: flatbuffers::Table<'a>, } -impl<'a> flatbuffers::Follow<'a> for String<'a> { - type Inner = String<'a>; +impl<'a> flatbuffers::Follow<'a> for StringTable<'a> { + type Inner = StringTable<'a>; #[inline] fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { _tab: flatbuffers::Table { buf, loc } } } } -impl<'a> String<'a> { +impl<'a> StringTable<'a> { pub const VT_S: flatbuffers::VOffsetT = 4; #[inline] pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - String { _tab: table } + StringTable { _tab: table } } #[allow(unused_mut)] pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args StringArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = StringBuilder::new(_fbb); + args: &'args StringTableArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = StringTableBuilder::new(_fbb); if let Some(x) = args.s { builder.add_s(x); } builder.finish() } @@ -39,11 +43,11 @@ impl<'a> String<'a> { #[inline] pub fn s(&self) -> Option<&'a str> { - self._tab.get::>(String::VT_S, None) + self._tab.get::>(StringTable::VT_S, None) } } -impl flatbuffers::Verifiable for String<'_> { +impl flatbuffers::Verifiable for StringTable<'_> { #[inline] fn run_verifier( v: &mut flatbuffers::Verifier, pos: usize @@ -55,45 +59,45 @@ impl flatbuffers::Verifiable for String<'_> { Ok(()) } } -pub struct StringArgs<'a> { +pub struct StringTableArgs<'a> { pub s: Option>, } -impl<'a> Default for StringArgs<'a> { +impl<'a> Default for StringTableArgs<'a> { #[inline] fn default() -> Self { - StringArgs { + StringTableArgs { s: None, } } } -pub struct StringBuilder<'a: 'b, 'b> { +pub struct StringTableBuilder<'a: 'b, 'b> { fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> StringBuilder<'a, 'b> { +impl<'a: 'b, 'b> StringTableBuilder<'a, 'b> { #[inline] pub fn add_s(&mut self, s: flatbuffers::WIPOffset<&'b str>) { - self.fbb_.push_slot_always::>(String::VT_S, s); + self.fbb_.push_slot_always::>(StringTable::VT_S, s); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StringBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> StringTableBuilder<'a, 'b> { let start = _fbb.start_table(); - StringBuilder { + StringTableBuilder { fbb_: _fbb, start_: start, } } #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); flatbuffers::WIPOffset::new(o.value()) } } -impl std::fmt::Debug for String<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let mut ds = f.debug_struct("String"); +impl core::fmt::Debug for StringTable<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + let mut ds = f.debug_struct("StringTable"); ds.field("s", &self.s()); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs index b6884285..8c12e7c7 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/temperature_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; /// Temperature in degrees celsius @@ -14,8 +18,8 @@ impl Default for Temperature { Self([0; 4]) } } -impl std::fmt::Debug for Temperature { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for Temperature { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("Temperature") .field("temp", &self.temp()) .finish() @@ -43,7 +47,7 @@ impl<'b> flatbuffers::Push for Temperature { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const Temperature as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const Temperature as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -54,7 +58,7 @@ impl<'b> flatbuffers::Push for &'b Temperature { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const Temperature as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const Temperature as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs index 35a3fb75..4026410f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_id_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TrackerIdOffset {} @@ -107,8 +111,8 @@ impl<'a: 'b, 'b> TrackerIdBuilder<'a, 'b> { } } -impl std::fmt::Debug for TrackerId<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TrackerId<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TrackerId"); ds.field("device_id", &self.device_id()); ds.field("tracker_num", &self.tracker_num()); diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs index c81b793a..2fbb01b0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_role_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -122,8 +126,8 @@ impl TrackerRole { } } } -impl std::fmt::Debug for TrackerRole { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for TrackerRole { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs index aa7f32e0..ac6bb03d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/tracker_status_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -54,8 +58,8 @@ impl TrackerStatus { } } } -impl std::fmt::Debug for TrackerStatus { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for TrackerStatus { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs index 3093e451..c2cdcb63 100644 --- a/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/datatypes/transaction_id_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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::*; // struct TransactionId, aligned to 4 @@ -13,8 +17,8 @@ impl Default for TransactionId { Self([0; 4]) } } -impl std::fmt::Debug for TransactionId { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for TransactionId { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { f.debug_struct("TransactionId") .field("id", &self.id()) .finish() @@ -42,7 +46,7 @@ impl<'b> flatbuffers::Push for TransactionId { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(self as *const TransactionId as *const u8, Self::size()) + ::core::slice::from_raw_parts(self as *const TransactionId as *const u8, Self::size()) }; dst.copy_from_slice(src); } @@ -53,7 +57,7 @@ impl<'b> flatbuffers::Push for &'b TransactionId { #[inline] fn push(&self, dst: &mut [u8], _rest: &[u8]) { let src = unsafe { - ::std::slice::from_raw_parts(*self as *const TransactionId as *const u8, Self::size()) + ::core::slice::from_raw_parts(*self as *const TransactionId as *const u8, Self::size()) }; dst.copy_from_slice(src); } diff --git a/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs b/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs index 809ecc77..7fc55e7a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/message_bundle_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 MessageBundleOffset {} @@ -119,8 +123,8 @@ impl<'a: 'b, 'b> MessageBundleBuilder<'a, 'b> { } } -impl std::fmt::Debug for MessageBundle<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for MessageBundle<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("MessageBundle"); ds.field("data_feed_msgs", &self.data_feed_msgs()); ds.field("rpc_msgs", &self.rpc_msgs()); diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs index 48bf41ca..da89f51b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/key_values_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 KeyValuesOffset {} @@ -104,8 +108,8 @@ impl<'a: 'b, 'b> KeyValuesBuilder<'a, 'b> { } } -impl std::fmt::Debug for KeyValues<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for KeyValues<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("KeyValues"); ds.field("keys", &self.keys()); ds.field("values", &self.values()); diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs index a06e761f..4407ec32 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/message_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 MessageOffset {} @@ -82,9 +86,9 @@ impl<'a> Message<'a> { #[inline] #[allow(non_snake_case)] - pub fn payload_as_solarxr_protocol_datatypes_string(&self) -> Option> { - if self.payload_type() == Payload::solarxr_protocol_datatypes_String { - self.payload().map(super::datatypes::String::init_from_table) + pub fn payload_as_solarxr_protocol_datatypes_string_table(&self) -> Option> { + if self.payload_type() == Payload::solarxr_protocol_datatypes_StringTable { + self.payload().map(super::datatypes::StringTable::init_from_table) } else { None } @@ -128,7 +132,7 @@ impl flatbuffers::Verifiable for Message<'_> { })? .visit_union::("payload_type", Self::VT_PAYLOAD_TYPE, "payload", Self::VT_PAYLOAD, false, |key, v, pos| { match key { - Payload::solarxr_protocol_datatypes_String => v.verify_union_variant::>("Payload::solarxr_protocol_datatypes_String", pos), + Payload::solarxr_protocol_datatypes_StringTable => v.verify_union_variant::>("Payload::solarxr_protocol_datatypes_StringTable", pos), Payload::solarxr_protocol_datatypes_Bytes => v.verify_union_variant::>("Payload::solarxr_protocol_datatypes_Bytes", pos), Payload::KeyValues => v.verify_union_variant::>("Payload::KeyValues", pos), _ => Ok(()), @@ -192,8 +196,8 @@ impl<'a: 'b, 'b> MessageBuilder<'a, 'b> { } } -impl std::fmt::Debug for Message<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for Message<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("Message"); ds.field("topic_type", &self.topic_type()); match self.topic_type() { @@ -218,8 +222,8 @@ impl std::fmt::Debug for Message<'_> { }; ds.field("payload_type", &self.payload_type()); match self.payload_type() { - Payload::solarxr_protocol_datatypes_String => { - if let Some(x) = self.payload_as_solarxr_protocol_datatypes_string() { + Payload::solarxr_protocol_datatypes_StringTable => { + if let Some(x) = self.payload_as_solarxr_protocol_datatypes_string_table() { ds.field("payload", &x) } else { ds.field("payload", &"InvalidFlatbuffer: Union discriminant does not match value.") diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs index accb02d4..81ea1768 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/payload_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -12,7 +16,7 @@ pub const ENUM_MAX_PAYLOAD: u8 = 3; #[allow(non_camel_case_types)] pub const ENUM_VALUES_PAYLOAD: [Payload; 4] = [ Payload::NONE, - Payload::solarxr_protocol_datatypes_String, + Payload::solarxr_protocol_datatypes_StringTable, Payload::solarxr_protocol_datatypes_Bytes, Payload::KeyValues, ]; @@ -23,7 +27,7 @@ pub struct Payload(pub u8); #[allow(non_upper_case_globals)] impl Payload { pub const NONE: Self = Self(0); - pub const solarxr_protocol_datatypes_String: Self = Self(1); + pub const solarxr_protocol_datatypes_StringTable: Self = Self(1); pub const solarxr_protocol_datatypes_Bytes: Self = Self(2); pub const KeyValues: Self = Self(3); @@ -31,7 +35,7 @@ impl Payload { pub const ENUM_MAX: u8 = 3; pub const ENUM_VALUES: &'static [Self] = &[ Self::NONE, - Self::solarxr_protocol_datatypes_String, + Self::solarxr_protocol_datatypes_StringTable, Self::solarxr_protocol_datatypes_Bytes, Self::KeyValues, ]; @@ -39,15 +43,15 @@ impl Payload { pub fn variant_name(self) -> Option<&'static str> { match self { Self::NONE => Some("NONE"), - Self::solarxr_protocol_datatypes_String => Some("solarxr_protocol_datatypes_String"), + Self::solarxr_protocol_datatypes_StringTable => Some("solarxr_protocol_datatypes_StringTable"), Self::solarxr_protocol_datatypes_Bytes => Some("solarxr_protocol_datatypes_Bytes"), Self::KeyValues => Some("KeyValues"), _ => None, } } } -impl std::fmt::Debug for Payload { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for Payload { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs index 7c100926..d9fad761 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 PubSubHeaderOffset {} @@ -151,8 +155,8 @@ impl<'a: 'b, 'b> PubSubHeaderBuilder<'a, 'b> { } } -impl std::fmt::Debug for PubSubHeader<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for PubSubHeader<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("PubSubHeader"); ds.field("u_type", &self.u_type()); match self.u_type() { diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs index ad95bfef..fac7311f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -50,8 +54,8 @@ impl PubSubUnion { } } } -impl std::fmt::Debug for PubSubUnion { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for PubSubUnion { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs index b17dd76d..a32a3ef0 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SubscriptionRequestOffset {} @@ -130,8 +134,8 @@ impl<'a: 'b, 'b> SubscriptionRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SubscriptionRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SubscriptionRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SubscriptionRequest"); ds.field("topic_type", &self.topic_type()); match self.topic_type() { diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs index 70a959ff..e924993f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -42,8 +46,8 @@ impl Topic { } } } -impl std::fmt::Debug for Topic { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for Topic { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs index 6a3f07d2..56d71621 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TopicHandleOffset {} @@ -93,8 +97,8 @@ impl<'a: 'b, 'b> TopicHandleBuilder<'a, 'b> { } } -impl std::fmt::Debug for TopicHandle<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TopicHandle<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TopicHandle"); ds.field("id", &self.id()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs index e5ab69d9..2ceebaed 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TopicHandleRequestOffset {} @@ -93,8 +97,8 @@ impl<'a: 'b, 'b> TopicHandleRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for TopicHandleRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TopicHandleRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TopicHandleRequest"); ds.field("id", &self.id()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs index 2dff0577..6520e698 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TopicHandleResponseOffset {} @@ -92,8 +96,8 @@ impl<'a: 'b, 'b> TopicHandleResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for TopicHandleResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TopicHandleResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TopicHandleResponse"); ds.field("handle", &self.handle()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs index 9d3d2071..3de44c4e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_id_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 TopicIdOffset {} @@ -128,8 +132,8 @@ impl<'a: 'b, 'b> TopicIdBuilder<'a, 'b> { } } -impl std::fmt::Debug for TopicId<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for TopicId<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("TopicId"); ds.field("organization", &self.organization()); ds.field("app_name", &self.app_name()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs index 73ab8fc0..5a4f9133 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/assign_tracker_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 AssignTrackerRequestOffset {} @@ -130,8 +134,8 @@ impl<'a: 'b, 'b> AssignTrackerRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for AssignTrackerRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for AssignTrackerRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("AssignTrackerRequest"); ds.field("tracker_id", &self.tracker_id()); ds.field("body_position", &self.body_position()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs index afeba904..0daa352d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_epoch_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 AutoBoneEpochResponseOffset {} @@ -130,8 +134,8 @@ impl<'a: 'b, 'b> AutoBoneEpochResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for AutoBoneEpochResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for AutoBoneEpochResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("AutoBoneEpochResponse"); ds.field("current_epoch", &self.current_epoch()); ds.field("total_epochs", &self.total_epochs()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs index 9603f992..5d3a786a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 AutoBoneProcessRequestOffset {} @@ -91,8 +95,8 @@ impl<'a: 'b, 'b> AutoBoneProcessRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for AutoBoneProcessRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for AutoBoneProcessRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("AutoBoneProcessRequest"); ds.field("process_type", &self.process_type()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs index f590d09f..cc86b81d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_status_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 AutoBoneProcessStatusResponseOffset {} @@ -156,8 +160,8 @@ impl<'a: 'b, 'b> AutoBoneProcessStatusResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for AutoBoneProcessStatusResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for AutoBoneProcessStatusResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("AutoBoneProcessStatusResponse"); ds.field("process_type", &self.process_type()); ds.field("message", &self.message()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs index e4e0270b..7a2e97f6 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/auto_bone_process_type_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -50,8 +54,8 @@ impl AutoBoneProcessType { } } } -impl std::fmt::Debug for AutoBoneProcessType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for AutoBoneProcessType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { 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 174212c5..2e542ac5 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 @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ChangeSettingsRequestOffset {} @@ -117,8 +121,8 @@ impl<'a: 'b, 'b> ChangeSettingsRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for ChangeSettingsRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ChangeSettingsRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ChangeSettingsRequest"); ds.field("steam_vr_trackers", &self.steam_vr_trackers()); ds.field("filtering", &self.filtering()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs index dc6ab8d8..b17bdb88 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/change_skeleton_config_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ChangeSkeletonConfigRequestOffset {} @@ -104,8 +108,8 @@ impl<'a: 'b, 'b> ChangeSkeletonConfigRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for ChangeSkeletonConfigRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ChangeSkeletonConfigRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ChangeSkeletonConfigRequest"); ds.field("bone", &self.bone()); ds.field("value", &self.value()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs index 399352b7..6a7f1549 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/close_serial_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 CloseSerialRequestOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> CloseSerialRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for CloseSerialRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for CloseSerialRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("CloseSerialRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs index c08dc362..2881153b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/filtering_settings_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 FilteringSettingsOffset {} @@ -105,8 +109,8 @@ impl<'a: 'b, 'b> FilteringSettingsBuilder<'a, 'b> { } } -impl std::fmt::Debug for FilteringSettings<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for FilteringSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("FilteringSettings"); ds.field("type_", &self.type_()); ds.field("amount", &self.amount()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs index 4532a219..0c19e373 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 HeartbeatRequestOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> HeartbeatRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for HeartbeatRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for HeartbeatRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("HeartbeatRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs index e7042d9a..ec32a6d8 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/heartbeat_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 HeartbeatResponseOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> HeartbeatResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for HeartbeatResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for HeartbeatResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("HeartbeatResponse"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs index 9387278a..2e08da1d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/open_serial_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 OpenSerialRequestOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> OpenSerialRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for OpenSerialRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for OpenSerialRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("OpenSerialRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs index f4d1d8a7..c6fceb9d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_change_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 OverlayDisplayModeChangeRequestOffset {} @@ -105,8 +109,8 @@ impl<'a: 'b, 'b> OverlayDisplayModeChangeRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for OverlayDisplayModeChangeRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for OverlayDisplayModeChangeRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("OverlayDisplayModeChangeRequest"); ds.field("is_visible", &self.is_visible()); ds.field("is_mirrored", &self.is_mirrored()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs index 50b55a93..a7fdec21 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 OverlayDisplayModeRequestOffset {} @@ -78,8 +82,8 @@ impl<'a: 'b, 'b> OverlayDisplayModeRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for OverlayDisplayModeRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for OverlayDisplayModeRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("OverlayDisplayModeRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs index 090e7cd1..a4514a2a 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/overlay_display_mode_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 OverlayDisplayModeResponseOffset {} @@ -105,8 +109,8 @@ impl<'a: 'b, 'b> OverlayDisplayModeResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for OverlayDisplayModeResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for OverlayDisplayModeResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("OverlayDisplayModeResponse"); ds.field("is_visible", &self.is_visible()); ds.field("is_mirrored", &self.is_mirrored()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs index 46a46eaf..1f6a7269 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhrequest_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 RecordBVHRequestOffset {} @@ -91,8 +95,8 @@ impl<'a: 'b, 'b> RecordBVHRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for RecordBVHRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for RecordBVHRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RecordBVHRequest"); ds.field("stop", &self.stop()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs index 7b9fe8bb..938c5f78 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/record_bvhstatus_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 RecordBVHStatusOffset {} @@ -91,8 +95,8 @@ impl<'a: 'b, 'b> RecordBVHStatusBuilder<'a, 'b> { } } -impl std::fmt::Debug for RecordBVHStatus<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for RecordBVHStatus<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RecordBVHStatus"); ds.field("recording", &self.recording()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs index 3c409e99..8ee08cf5 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ResetRequestOffset {} @@ -91,8 +95,8 @@ impl<'a: 'b, 'b> ResetRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for ResetRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ResetRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ResetRequest"); ds.field("reset_type", &self.reset_type()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs index c46a9327..e32dd7aa 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ResetResponseOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> ResetResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for ResetResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ResetResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ResetResponse"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs index 596193d4..44b6cdf7 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/reset_type_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -47,8 +51,8 @@ impl ResetType { } } } -impl std::fmt::Debug for ResetType { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for ResetType { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { 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 2a2d2ac7..62451257 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 @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -138,8 +142,8 @@ impl RpcMessage { } } } -impl std::fmt::Debug for RpcMessage { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for RpcMessage { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { 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 cbb4595b..79fe30f7 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 @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 RpcMessageHeaderOffset {} @@ -408,8 +412,8 @@ impl<'a: 'b, 'b> RpcMessageHeaderBuilder<'a, 'b> { } } -impl std::fmt::Debug for RpcMessageHeader<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for RpcMessageHeader<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("RpcMessageHeader"); ds.field("tx_id", &self.tx_id()); ds.field("message_type", &self.message_type()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs index 042def32..a88871db 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_factory_reset_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SerialTrackerFactoryResetRequestOffset {} @@ -78,8 +82,8 @@ impl<'a: 'b, 'b> SerialTrackerFactoryResetRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SerialTrackerFactoryResetRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SerialTrackerFactoryResetRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SerialTrackerFactoryResetRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs index 36b93ecb..8fff431b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_get_info_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SerialTrackerGetInfoRequestOffset {} @@ -78,8 +82,8 @@ impl<'a: 'b, 'b> SerialTrackerGetInfoRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SerialTrackerGetInfoRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SerialTrackerGetInfoRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SerialTrackerGetInfoRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs index 4653abb6..ed2e6ca9 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_tracker_reboot_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SerialTrackerRebootRequestOffset {} @@ -78,8 +82,8 @@ impl<'a: 'b, 'b> SerialTrackerRebootRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SerialTrackerRebootRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SerialTrackerRebootRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SerialTrackerRebootRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs index 0be616b6..8124ead1 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/serial_update_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SerialUpdateResponseOffset {} @@ -104,8 +108,8 @@ impl<'a: 'b, 'b> SerialUpdateResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for SerialUpdateResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SerialUpdateResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SerialUpdateResponse"); ds.field("log", &self.log()); ds.field("closed", &self.closed()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs index fd643360..bc8c1801 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/set_wifi_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SetWifiRequestOffset {} @@ -104,8 +108,8 @@ impl<'a: 'b, 'b> SetWifiRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SetWifiRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SetWifiRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SetWifiRequest"); ds.field("ssid", &self.ssid()); ds.field("password", &self.password()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs index e84d594d..a68e0c72 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_ratios_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ModelRatiosOffset {} @@ -160,8 +164,8 @@ impl<'a: 'b, 'b> ModelRatiosBuilder<'a, 'b> { } } -impl std::fmt::Debug for ModelRatios<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ModelRatios<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ModelRatios"); ds.field("impute_waist_from_chest_hip", &self.impute_waist_from_chest_hip()); ds.field("impute_waist_from_chest_legs", &self.impute_waist_from_chest_legs()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs index 6725e9d3..38564805 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_settings_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ModelSettingsOffset {} @@ -105,8 +109,8 @@ impl<'a: 'b, 'b> ModelSettingsBuilder<'a, 'b> { } } -impl std::fmt::Debug for ModelSettings<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ModelSettings<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ModelSettings"); ds.field("toggles", &self.toggles()); ds.field("ratios", &self.ratios()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs index 14e97a7e..f9d4803b 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings/model_toggles_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 ModelTogglesOffset {} @@ -157,8 +161,8 @@ impl<'a: 'b, 'b> ModelTogglesBuilder<'a, 'b> { } } -impl std::fmt::Debug for ModelToggles<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for ModelToggles<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("ModelToggles"); ds.field("extended_spine", &self.extended_spine()); ds.field("extended_pelvis", &self.extended_pelvis()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs index 29518d4b..be3ac70e 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/settings_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SettingsRequestOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> SettingsRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SettingsRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SettingsRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SettingsRequest"); 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 0ec71136..8b532de9 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 @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SettingsResponseOffset {} @@ -117,8 +121,8 @@ impl<'a: 'b, 'b> SettingsResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for SettingsResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SettingsResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SettingsResponse"); ds.field("steam_vr_trackers", &self.steam_vr_trackers()); ds.field("filtering", &self.filtering()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs index ba8b853e..e80d886c 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_bone_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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.")] @@ -110,8 +114,8 @@ impl SkeletonBone { } } } -impl std::fmt::Debug for SkeletonBone { - fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { +impl core::fmt::Debug for SkeletonBone { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { if let Some(name) = self.variant_name() { f.write_str(name) } else { diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs index 1b1051e9..3235cebc 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SkeletonConfigRequestOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> SkeletonConfigRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SkeletonConfigRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SkeletonConfigRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SkeletonConfigRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs index b07132c8..52985ddb 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_config_response_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SkeletonConfigResponseOffset {} @@ -91,8 +95,8 @@ impl<'a: 'b, 'b> SkeletonConfigResponseBuilder<'a, 'b> { } } -impl std::fmt::Debug for SkeletonConfigResponse<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SkeletonConfigResponse<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SkeletonConfigResponse"); ds.field("skeleton_parts", &self.skeleton_parts()); ds.finish() diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs index 45f39216..935de181 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_part_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SkeletonPartOffset {} @@ -104,8 +108,8 @@ impl<'a: 'b, 'b> SkeletonPartBuilder<'a, 'b> { } } -impl std::fmt::Debug for SkeletonPart<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SkeletonPart<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SkeletonPart"); ds.field("bone", &self.bone()); ds.field("value", &self.value()); diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs index ee07a68f..0656427d 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/skeleton_reset_all_request_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SkeletonResetAllRequestOffset {} @@ -77,8 +81,8 @@ impl<'a: 'b, 'b> SkeletonResetAllRequestBuilder<'a, 'b> { } } -impl std::fmt::Debug for SkeletonResetAllRequest<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SkeletonResetAllRequest<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SkeletonResetAllRequest"); ds.finish() } diff --git a/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs b/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs index 9324da49..9ce55e58 100644 --- a/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/rpc/steam_vrtrackers_setting_generated.rs @@ -1,7 +1,11 @@ // automatically generated by the FlatBuffers compiler, do not modify +extern crate alloc; extern crate flatbuffers; -use std::mem; -use std::cmp::Ordering; +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 SteamVRTrackersSettingOffset {} @@ -143,8 +147,8 @@ impl<'a: 'b, 'b> SteamVRTrackersSettingBuilder<'a, 'b> { } } -impl std::fmt::Debug for SteamVRTrackersSetting<'_> { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { +impl core::fmt::Debug for SteamVRTrackersSetting<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { let mut ds = f.debug_struct("SteamVRTrackersSetting"); ds.field("waist", &self.waist()); ds.field("chest", &self.chest()); diff --git a/protocol/typescript/src/all.ts b/protocol/typescript/src/all.ts index 26c2a49b..a396cc54 100644 --- a/protocol/typescript/src/all.ts +++ b/protocol/typescript/src/all.ts @@ -1,83 +1,83 @@ -export { MessageBundle, MessageBundleT } from './solarxr_protocol/message-bundle'; -export { Bone, BoneT } from './solarxr_protocol/data_feed/bone'; -export { DataFeedConfig, DataFeedConfigT } from './solarxr_protocol/data_feed/data-feed-config'; -export { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from './solarxr_protocol/data_feed/data-feed-message'; -export { DataFeedMessageHeader, DataFeedMessageHeaderT } from './solarxr_protocol/data_feed/data-feed-message-header'; -export { DataFeedUpdate, DataFeedUpdateT } from './solarxr_protocol/data_feed/data-feed-update'; -export { PollDataFeed, PollDataFeedT } from './solarxr_protocol/data_feed/poll-data-feed'; -export { StartDataFeed, StartDataFeedT } from './solarxr_protocol/data_feed/start-data-feed'; -export { DeviceData, DeviceDataT } from './solarxr_protocol/data_feed/device_data/device-data'; -export { DeviceDataMask, DeviceDataMaskT } from './solarxr_protocol/data_feed/device_data/device-data-mask'; -export { TrackerData, TrackerDataT } from './solarxr_protocol/data_feed/tracker/tracker-data'; -export { TrackerDataMask, TrackerDataMaskT } from './solarxr_protocol/data_feed/tracker/tracker-data-mask'; -export { TrackerInfo, TrackerInfoT } from './solarxr_protocol/data_feed/tracker/tracker-info'; -export { BodyPart } from './solarxr_protocol/datatypes/body-part'; -export { Bytes, BytesT } from './solarxr_protocol/datatypes/bytes'; -export { DeviceId, DeviceIdT } from './solarxr_protocol/datatypes/device-id'; -export { FilteringType } from './solarxr_protocol/datatypes/filtering-type'; -export { FirmwareErrorCode } from './solarxr_protocol/datatypes/firmware-error-code'; -export { HzF32, HzF32T } from './solarxr_protocol/datatypes/hz-f32'; -export { Ipv4Address, Ipv4AddressT } from './solarxr_protocol/datatypes/ipv4-address'; -export { LogData, LogDataT } from './solarxr_protocol/datatypes/log-data'; -export { String, StringT } from './solarxr_protocol/datatypes/string'; -export { Temperature, TemperatureT } from './solarxr_protocol/datatypes/temperature'; -export { TrackerId, TrackerIdT } from './solarxr_protocol/datatypes/tracker-id'; -export { TrackerStatus } from './solarxr_protocol/datatypes/tracker-status'; -export { TransactionId, TransactionIdT } from './solarxr_protocol/datatypes/transaction-id'; -export { FirmwareStatusMask, FirmwareStatusMaskT } from './solarxr_protocol/datatypes/hardware_info/firmware-status-mask'; -export { HardwareAddress, HardwareAddressT } from './solarxr_protocol/datatypes/hardware_info/hardware-address'; -export { HardwareInfo, HardwareInfoT } from './solarxr_protocol/datatypes/hardware_info/hardware-info'; -export { HardwareStatus, HardwareStatusT } from './solarxr_protocol/datatypes/hardware_info/hardware-status'; -export { ImuType } from './solarxr_protocol/datatypes/hardware_info/imu-type'; -export { McuType } from './solarxr_protocol/datatypes/hardware_info/mcu-type'; -export { Quat, QuatT } from './solarxr_protocol/datatypes/math/quat'; -export { Vec3f, Vec3fT } from './solarxr_protocol/datatypes/math/vec3f'; -export { KeyValues, KeyValuesT } from './solarxr_protocol/pub_sub/key-values'; -export { Message, MessageT } from './solarxr_protocol/pub_sub/message'; -export { Payload, unionToPayload, unionListToPayload } from './solarxr_protocol/pub_sub/payload'; -export { PubSubHeader, PubSubHeaderT } from './solarxr_protocol/pub_sub/pub-sub-header'; -export { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from './solarxr_protocol/pub_sub/pub-sub-union'; -export { SubscriptionRequest, SubscriptionRequestT } from './solarxr_protocol/pub_sub/subscription-request'; -export { Topic, unionToTopic, unionListToTopic } from './solarxr_protocol/pub_sub/topic'; -export { TopicHandle, TopicHandleT } from './solarxr_protocol/pub_sub/topic-handle'; -export { TopicHandleRequest, TopicHandleRequestT } from './solarxr_protocol/pub_sub/topic-handle-request'; -export { TopicHandleResponse, TopicHandleResponseT } from './solarxr_protocol/pub_sub/topic-handle-response'; -export { TopicId, TopicIdT } from './solarxr_protocol/pub_sub/topic-id'; -export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr_protocol/rpc/assign-tracker-request'; -export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr_protocol/rpc/auto-bone-epoch-response'; -export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr_protocol/rpc/auto-bone-process-request'; -export { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from './solarxr_protocol/rpc/auto-bone-process-status-response'; -export { AutoBoneProcessType } from './solarxr_protocol/rpc/auto-bone-process-type'; -export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr_protocol/rpc/change-settings-request'; -export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr_protocol/rpc/change-skeleton-config-request'; -export { CloseSerialRequest, CloseSerialRequestT } from './solarxr_protocol/rpc/close-serial-request'; -export { FilteringSettings, FilteringSettingsT } from './solarxr_protocol/rpc/filtering-settings'; -export { HeartbeatRequest, HeartbeatRequestT } from './solarxr_protocol/rpc/heartbeat-request'; -export { HeartbeatResponse, HeartbeatResponseT } from './solarxr_protocol/rpc/heartbeat-response'; -export { OpenSerialRequest, OpenSerialRequestT } from './solarxr_protocol/rpc/open-serial-request'; -export { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from './solarxr_protocol/rpc/overlay-display-mode-change-request'; -export { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from './solarxr_protocol/rpc/overlay-display-mode-request'; -export { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from './solarxr_protocol/rpc/overlay-display-mode-response'; -export { RecordBVHRequest, RecordBVHRequestT } from './solarxr_protocol/rpc/record-b-v-h-request'; -export { RecordBVHStatus, RecordBVHStatusT } from './solarxr_protocol/rpc/record-b-v-h-status'; -export { ResetRequest, ResetRequestT } from './solarxr_protocol/rpc/reset-request'; -export { ResetResponse, ResetResponseT } from './solarxr_protocol/rpc/reset-response'; -export { ResetType } from './solarxr_protocol/rpc/reset-type'; -export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr_protocol/rpc/rpc-message'; -export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr_protocol/rpc/rpc-message-header'; -export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr_protocol/rpc/serial-tracker-factory-reset-request'; -export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr_protocol/rpc/serial-tracker-get-info-request'; -export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr_protocol/rpc/serial-tracker-reboot-request'; -export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr_protocol/rpc/serial-update-response'; -export { SetWifiRequest, SetWifiRequestT } from './solarxr_protocol/rpc/set-wifi-request'; -export { SettingsRequest, SettingsRequestT } from './solarxr_protocol/rpc/settings-request'; -export { SettingsResponse, SettingsResponseT } from './solarxr_protocol/rpc/settings-response'; -export { SkeletonBone } from './solarxr_protocol/rpc/skeleton-bone'; -export { SkeletonConfigRequest, SkeletonConfigRequestT } from './solarxr_protocol/rpc/skeleton-config-request'; -export { SkeletonConfigResponse, SkeletonConfigResponseT } from './solarxr_protocol/rpc/skeleton-config-response'; -export { SkeletonPart, SkeletonPartT } from './solarxr_protocol/rpc/skeleton-part'; -export { SkeletonResetAllRequest, SkeletonResetAllRequestT } from './solarxr_protocol/rpc/skeleton-reset-all-request'; -export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr_protocol/rpc/steam-v-r-trackers-setting'; -export { ModelRatios, ModelRatiosT } from './solarxr_protocol/rpc/settings/model-ratios'; -export { ModelSettings, ModelSettingsT } from './solarxr_protocol/rpc/settings/model-settings'; -export { ModelToggles, ModelTogglesT } from './solarxr_protocol/rpc/settings/model-toggles'; +export { MessageBundle, MessageBundleT } from './solarxr-protocol/message-bundle'; +export { Bone, BoneT } from './solarxr-protocol/data-feed/bone'; +export { DataFeedConfig, DataFeedConfigT } from './solarxr-protocol/data-feed/data-feed-config'; +export { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from './solarxr-protocol/data-feed/data-feed-message'; +export { DataFeedMessageHeader, DataFeedMessageHeaderT } from './solarxr-protocol/data-feed/data-feed-message-header'; +export { DataFeedUpdate, DataFeedUpdateT } from './solarxr-protocol/data-feed/data-feed-update'; +export { PollDataFeed, PollDataFeedT } from './solarxr-protocol/data-feed/poll-data-feed'; +export { StartDataFeed, StartDataFeedT } from './solarxr-protocol/data-feed/start-data-feed'; +export { DeviceData, DeviceDataT } from './solarxr-protocol/data-feed/device-data/device-data'; +export { DeviceDataMask, DeviceDataMaskT } from './solarxr-protocol/data-feed/device-data/device-data-mask'; +export { TrackerData, TrackerDataT } from './solarxr-protocol/data-feed/tracker/tracker-data'; +export { TrackerDataMask, TrackerDataMaskT } from './solarxr-protocol/data-feed/tracker/tracker-data-mask'; +export { TrackerInfo, TrackerInfoT } from './solarxr-protocol/data-feed/tracker/tracker-info'; +export { BodyPart } from './solarxr-protocol/datatypes/body-part'; +export { Bytes, BytesT } from './solarxr-protocol/datatypes/bytes'; +export { DeviceId, DeviceIdT } from './solarxr-protocol/datatypes/device-id'; +export { FilteringType } from './solarxr-protocol/datatypes/filtering-type'; +export { FirmwareErrorCode } from './solarxr-protocol/datatypes/firmware-error-code'; +export { HzF32, HzF32T } from './solarxr-protocol/datatypes/hz-f32'; +export { Ipv4Address, Ipv4AddressT } from './solarxr-protocol/datatypes/ipv4address'; +export { LogData, LogDataT } from './solarxr-protocol/datatypes/log-data'; +export { StringTable, StringTableT } from './solarxr-protocol/datatypes/string-table'; +export { Temperature, TemperatureT } from './solarxr-protocol/datatypes/temperature'; +export { TrackerId, TrackerIdT } from './solarxr-protocol/datatypes/tracker-id'; +export { TrackerStatus } from './solarxr-protocol/datatypes/tracker-status'; +export { TransactionId, TransactionIdT } from './solarxr-protocol/datatypes/transaction-id'; +export { FirmwareStatusMask, FirmwareStatusMaskT } from './solarxr-protocol/datatypes/hardware-info/firmware-status-mask'; +export { HardwareAddress, HardwareAddressT } from './solarxr-protocol/datatypes/hardware-info/hardware-address'; +export { HardwareInfo, HardwareInfoT } from './solarxr-protocol/datatypes/hardware-info/hardware-info'; +export { HardwareStatus, HardwareStatusT } from './solarxr-protocol/datatypes/hardware-info/hardware-status'; +export { ImuType } from './solarxr-protocol/datatypes/hardware-info/imu-type'; +export { McuType } from './solarxr-protocol/datatypes/hardware-info/mcu-type'; +export { Quat, QuatT } from './solarxr-protocol/datatypes/math/quat'; +export { Vec3f, Vec3fT } from './solarxr-protocol/datatypes/math/vec3f'; +export { KeyValues, KeyValuesT } from './solarxr-protocol/pub-sub/key-values'; +export { Message, MessageT } from './solarxr-protocol/pub-sub/message'; +export { Payload, unionToPayload, unionListToPayload } from './solarxr-protocol/pub-sub/payload'; +export { PubSubHeader, PubSubHeaderT } from './solarxr-protocol/pub-sub/pub-sub-header'; +export { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from './solarxr-protocol/pub-sub/pub-sub-union'; +export { SubscriptionRequest, SubscriptionRequestT } from './solarxr-protocol/pub-sub/subscription-request'; +export { Topic, unionToTopic, unionListToTopic } from './solarxr-protocol/pub-sub/topic'; +export { TopicHandle, TopicHandleT } from './solarxr-protocol/pub-sub/topic-handle'; +export { TopicHandleRequest, TopicHandleRequestT } from './solarxr-protocol/pub-sub/topic-handle-request'; +export { TopicHandleResponse, TopicHandleResponseT } from './solarxr-protocol/pub-sub/topic-handle-response'; +export { TopicId, TopicIdT } from './solarxr-protocol/pub-sub/topic-id'; +export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr-protocol/rpc/assign-tracker-request'; +export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr-protocol/rpc/auto-bone-epoch-response'; +export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr-protocol/rpc/auto-bone-process-request'; +export { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from './solarxr-protocol/rpc/auto-bone-process-status-response'; +export { AutoBoneProcessType } from './solarxr-protocol/rpc/auto-bone-process-type'; +export { ChangeSettingsRequest, ChangeSettingsRequestT } from './solarxr-protocol/rpc/change-settings-request'; +export { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from './solarxr-protocol/rpc/change-skeleton-config-request'; +export { CloseSerialRequest, CloseSerialRequestT } from './solarxr-protocol/rpc/close-serial-request'; +export { FilteringSettings, FilteringSettingsT } from './solarxr-protocol/rpc/filtering-settings'; +export { HeartbeatRequest, HeartbeatRequestT } from './solarxr-protocol/rpc/heartbeat-request'; +export { HeartbeatResponse, HeartbeatResponseT } from './solarxr-protocol/rpc/heartbeat-response'; +export { OpenSerialRequest, OpenSerialRequestT } from './solarxr-protocol/rpc/open-serial-request'; +export { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-change-request'; +export { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from './solarxr-protocol/rpc/overlay-display-mode-request'; +export { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from './solarxr-protocol/rpc/overlay-display-mode-response'; +export { RecordBVHRequest, RecordBVHRequestT } from './solarxr-protocol/rpc/record-bvhrequest'; +export { RecordBVHStatus, RecordBVHStatusT } from './solarxr-protocol/rpc/record-bvhstatus'; +export { ResetRequest, ResetRequestT } from './solarxr-protocol/rpc/reset-request'; +export { ResetResponse, ResetResponseT } from './solarxr-protocol/rpc/reset-response'; +export { ResetType } from './solarxr-protocol/rpc/reset-type'; +export { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from './solarxr-protocol/rpc/rpc-message'; +export { RpcMessageHeader, RpcMessageHeaderT } from './solarxr-protocol/rpc/rpc-message-header'; +export { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from './solarxr-protocol/rpc/serial-tracker-factory-reset-request'; +export { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from './solarxr-protocol/rpc/serial-tracker-get-info-request'; +export { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from './solarxr-protocol/rpc/serial-tracker-reboot-request'; +export { SerialUpdateResponse, SerialUpdateResponseT } from './solarxr-protocol/rpc/serial-update-response'; +export { SetWifiRequest, SetWifiRequestT } from './solarxr-protocol/rpc/set-wifi-request'; +export { SettingsRequest, SettingsRequestT } from './solarxr-protocol/rpc/settings-request'; +export { SettingsResponse, SettingsResponseT } from './solarxr-protocol/rpc/settings-response'; +export { SkeletonBone } from './solarxr-protocol/rpc/skeleton-bone'; +export { SkeletonConfigRequest, SkeletonConfigRequestT } from './solarxr-protocol/rpc/skeleton-config-request'; +export { SkeletonConfigResponse, SkeletonConfigResponseT } from './solarxr-protocol/rpc/skeleton-config-response'; +export { SkeletonPart, SkeletonPartT } from './solarxr-protocol/rpc/skeleton-part'; +export { SkeletonResetAllRequest, SkeletonResetAllRequestT } from './solarxr-protocol/rpc/skeleton-reset-all-request'; +export { SteamVRTrackersSetting, SteamVRTrackersSettingT } from './solarxr-protocol/rpc/steam-vrtrackers-setting'; +export { ModelRatios, ModelRatiosT } from './solarxr-protocol/rpc/settings/model-ratios'; +export { ModelSettings, ModelSettingsT } from './solarxr-protocol/rpc/settings/model-settings'; +export { ModelToggles, ModelTogglesT } from './solarxr-protocol/rpc/settings/model-toggles'; diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/bone.ts b/protocol/typescript/src/solarxr-protocol/data-feed/bone.ts similarity index 94% rename from protocol/typescript/src/solarxr_protocol/data_feed/bone.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/bone.ts index 5ace3e0f..a7d5c705 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/bone.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/bone.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { BodyPart } from '../../solarxr_protocol/datatypes/body-part'; -import { Quat, QuatT } from '../../solarxr_protocol/datatypes/math/quat'; -import { Vec3f, Vec3fT } from '../../solarxr_protocol/datatypes/math/vec3f'; +import { BodyPart } from '../../solarxr-protocol/datatypes/body-part'; +import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat'; +import { Vec3f, Vec3fT } from '../../solarxr-protocol/datatypes/math/vec3f'; export class Bone { diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-config.ts b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/data_feed/data-feed-config.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts index eb00a869..6522ca2f 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-config.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-config.ts @@ -2,8 +2,8 @@ import * as flatbuffers from 'flatbuffers'; -import { DeviceDataMask, DeviceDataMaskT } from '../../solarxr_protocol/data_feed/device_data/device-data-mask'; -import { TrackerDataMask, TrackerDataMaskT } from '../../solarxr_protocol/data_feed/tracker/tracker-data-mask'; +import { DeviceDataMask, DeviceDataMaskT } from '../../solarxr-protocol/data-feed/device-data/device-data-mask'; +import { TrackerDataMask, TrackerDataMaskT } from '../../solarxr-protocol/data-feed/tracker/tracker-data-mask'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message-header.ts b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message-header.ts similarity index 87% rename from protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message-header.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message-header.ts index 6aa31808..eee15078 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message-header.ts @@ -2,11 +2,11 @@ import * as flatbuffers from 'flatbuffers'; -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; -import { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from '../../solarxr_protocol/data_feed/data-feed-message'; -import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr_protocol/data_feed/data-feed-update'; -import { PollDataFeed, PollDataFeedT } from '../../solarxr_protocol/data_feed/poll-data-feed'; -import { StartDataFeed, StartDataFeedT } from '../../solarxr_protocol/data_feed/start-data-feed'; +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; +import { DataFeedMessage, unionToDataFeedMessage, unionListToDataFeedMessage } from '../../solarxr-protocol/data-feed/data-feed-message'; +import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update'; +import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed'; +import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed'; export class DataFeedMessageHeader { diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message.ts b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message.ts similarity index 80% rename from protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message.ts index ef3e5d28..bb3b9fff 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-message.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-message.ts @@ -1,9 +1,9 @@ // automatically generated by the FlatBuffers compiler, do not modify -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; -import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr_protocol/data_feed/data-feed-update'; -import { PollDataFeed, PollDataFeedT } from '../../solarxr_protocol/data_feed/poll-data-feed'; -import { StartDataFeed, StartDataFeedT } from '../../solarxr_protocol/data_feed/start-data-feed'; +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; +import { DataFeedUpdate, DataFeedUpdateT } from '../../solarxr-protocol/data-feed/data-feed-update'; +import { PollDataFeed, PollDataFeedT } from '../../solarxr-protocol/data-feed/poll-data-feed'; +import { StartDataFeed, StartDataFeedT } from '../../solarxr-protocol/data-feed/start-data-feed'; export enum DataFeedMessage{ diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-update.ts b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts similarity index 95% rename from protocol/typescript/src/solarxr_protocol/data_feed/data-feed-update.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts index afff416f..9a500c66 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/data-feed-update.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/data-feed-update.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { Bone, BoneT } from '../../solarxr_protocol/data_feed/bone'; -import { DeviceData, DeviceDataT } from '../../solarxr_protocol/data_feed/device_data/device-data'; -import { TrackerData, TrackerDataT } from '../../solarxr_protocol/data_feed/tracker/tracker-data'; +import { Bone, BoneT } from '../../solarxr-protocol/data-feed/bone'; +import { DeviceData, DeviceDataT } from '../../solarxr-protocol/data-feed/device-data/device-data'; +import { TrackerData, TrackerDataT } from '../../solarxr-protocol/data-feed/tracker/tracker-data'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data-mask.ts b/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data-mask.ts similarity index 98% rename from protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data-mask.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data-mask.ts index d4e7cf85..6b5f52d8 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data-mask.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data-mask.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { TrackerDataMask, TrackerDataMaskT } from '../../../solarxr_protocol/data_feed/tracker/tracker-data-mask'; +import { TrackerDataMask, TrackerDataMaskT } from '../../../solarxr-protocol/data-feed/tracker/tracker-data-mask'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data.ts b/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data.ts similarity index 94% rename from protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data.ts index c58520df..37cf1800 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/device_data/device-data.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/device-data/device-data.ts @@ -2,10 +2,10 @@ import * as flatbuffers from 'flatbuffers'; -import { TrackerData, TrackerDataT } from '../../../solarxr_protocol/data_feed/tracker/tracker-data'; -import { DeviceId, DeviceIdT } from '../../../solarxr_protocol/datatypes/device-id'; -import { HardwareInfo, HardwareInfoT } from '../../../solarxr_protocol/datatypes/hardware_info/hardware-info'; -import { HardwareStatus, HardwareStatusT } from '../../../solarxr_protocol/datatypes/hardware_info/hardware-status'; +import { TrackerData, TrackerDataT } from '../../../solarxr-protocol/data-feed/tracker/tracker-data'; +import { DeviceId, DeviceIdT } from '../../../solarxr-protocol/datatypes/device-id'; +import { HardwareInfo, HardwareInfoT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-info'; +import { HardwareStatus, HardwareStatusT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-status'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/poll-data-feed.ts b/protocol/typescript/src/solarxr-protocol/data-feed/poll-data-feed.ts similarity index 95% rename from protocol/typescript/src/solarxr_protocol/data_feed/poll-data-feed.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/poll-data-feed.ts index a86d1d5a..d2c10336 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/poll-data-feed.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/poll-data-feed.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/start-data-feed.ts b/protocol/typescript/src/solarxr-protocol/data-feed/start-data-feed.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/data_feed/start-data-feed.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/start-data-feed.ts index 08299a90..5592ae3e 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/start-data-feed.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/start-data-feed.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { DataFeedConfig, DataFeedConfigT } from '../../solarxr_protocol/data_feed/data-feed-config'; +import { DataFeedConfig, DataFeedConfigT } from '../../solarxr-protocol/data-feed/data-feed-config'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data-mask.ts b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data-mask.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data-mask.ts diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data.ts b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts similarity index 93% rename from protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts index d2f2bf02..877a0aad 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-data.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-data.ts @@ -2,12 +2,12 @@ import * as flatbuffers from 'flatbuffers'; -import { TrackerInfo, TrackerInfoT } from '../../../solarxr_protocol/data_feed/tracker/tracker-info'; -import { Temperature, TemperatureT } from '../../../solarxr_protocol/datatypes/temperature'; -import { TrackerId, TrackerIdT } from '../../../solarxr_protocol/datatypes/tracker-id'; -import { TrackerStatus } from '../../../solarxr_protocol/datatypes/tracker-status'; -import { Quat, QuatT } from '../../../solarxr_protocol/datatypes/math/quat'; -import { Vec3f, Vec3fT } from '../../../solarxr_protocol/datatypes/math/vec3f'; +import { TrackerInfo, TrackerInfoT } from '../../../solarxr-protocol/data-feed/tracker/tracker-info'; +import { Temperature, TemperatureT } from '../../../solarxr-protocol/datatypes/temperature'; +import { TrackerId, TrackerIdT } from '../../../solarxr-protocol/datatypes/tracker-id'; +import { TrackerStatus } from '../../../solarxr-protocol/datatypes/tracker-status'; +import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat'; +import { Vec3f, Vec3fT } from '../../../solarxr-protocol/datatypes/math/vec3f'; /** diff --git a/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-info.ts b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-info.ts similarity index 95% rename from protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-info.ts rename to protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-info.ts index ceaf06fc..d265ffaa 100644 --- a/protocol/typescript/src/solarxr_protocol/data_feed/tracker/tracker-info.ts +++ b/protocol/typescript/src/solarxr-protocol/data-feed/tracker/tracker-info.ts @@ -2,10 +2,10 @@ import * as flatbuffers from 'flatbuffers'; -import { BodyPart } from '../../../solarxr_protocol/datatypes/body-part'; -import { HzF32, HzF32T } from '../../../solarxr_protocol/datatypes/hz-f32'; -import { ImuType } from '../../../solarxr_protocol/datatypes/hardware_info/imu-type'; -import { Quat, QuatT } from '../../../solarxr_protocol/datatypes/math/quat'; +import { BodyPart } from '../../../solarxr-protocol/datatypes/body-part'; +import { HzF32, HzF32T } from '../../../solarxr-protocol/datatypes/hz-f32'; +import { ImuType } from '../../../solarxr-protocol/datatypes/hardware-info/imu-type'; +import { Quat, QuatT } from '../../../solarxr-protocol/datatypes/math/quat'; /** diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/body-part.ts b/protocol/typescript/src/solarxr-protocol/datatypes/body-part.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/body-part.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/body-part.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/bytes.ts b/protocol/typescript/src/solarxr-protocol/datatypes/bytes.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/bytes.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/bytes.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/device-id.ts b/protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/device-id.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/device-id.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/filtering-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/filtering-type.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/filtering-type.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/firmware-error-code.ts b/protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/firmware-error-code.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/firmware-error-code.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/firmware-status-mask.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/firmware-status-mask.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/firmware-status-mask.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/firmware-status-mask.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-address.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-address.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-address.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-address.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-info.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-info.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts index 834ce4e0..40bd896c 100644 --- a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-info.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-info.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { Ipv4Address, Ipv4AddressT } from '../../../solarxr_protocol/datatypes/ipv4-address'; -import { HardwareAddress, HardwareAddressT } from '../../../solarxr_protocol/datatypes/hardware_info/hardware-address'; -import { McuType } from '../../../solarxr_protocol/datatypes/hardware_info/mcu-type'; +import { Ipv4Address, Ipv4AddressT } from '../../../solarxr-protocol/datatypes/ipv4address'; +import { HardwareAddress, HardwareAddressT } from '../../../solarxr-protocol/datatypes/hardware-info/hardware-address'; +import { McuType } from '../../../solarxr-protocol/datatypes/hardware-info/mcu-type'; /** diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-status.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-status.ts similarity index 86% rename from protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-status.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-status.ts index c4de7733..d9d397a9 100644 --- a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/hardware-status.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/hardware-status.ts @@ -2,8 +2,8 @@ import * as flatbuffers from 'flatbuffers'; -import { FirmwareErrorCode } from '../../../solarxr_protocol/datatypes/firmware-error-code'; -import { LogData, LogDataT } from '../../../solarxr_protocol/datatypes/log-data'; +import { FirmwareErrorCode } from '../../../solarxr-protocol/datatypes/firmware-error-code'; +import { LogData, LogDataT } from '../../../solarxr-protocol/datatypes/log-data'; /** @@ -158,13 +158,20 @@ pack(builder:flatbuffers.Builder): flatbuffers.Offset { const logData = (this.logData !== null ? this.logData!.pack(builder) : 0); HardwareStatus.startHardwareStatus(builder); - HardwareStatus.addErrorStatus(builder, this.errorStatus); - HardwareStatus.addTps(builder, this.tps); - HardwareStatus.addPing(builder, this.ping); - HardwareStatus.addRssi(builder, this.rssi); - HardwareStatus.addMcuTemp(builder, this.mcuTemp); - HardwareStatus.addBatteryVoltage(builder, this.batteryVoltage); - HardwareStatus.addBatteryPctEstimate(builder, this.batteryPctEstimate); + if (this.errorStatus !== null) + HardwareStatus.addErrorStatus(builder, this.errorStatus); + if (this.tps !== null) + HardwareStatus.addTps(builder, this.tps); + if (this.ping !== null) + HardwareStatus.addPing(builder, this.ping); + if (this.rssi !== null) + HardwareStatus.addRssi(builder, this.rssi); + if (this.mcuTemp !== null) + HardwareStatus.addMcuTemp(builder, this.mcuTemp); + if (this.batteryVoltage !== null) + HardwareStatus.addBatteryVoltage(builder, this.batteryVoltage); + if (this.batteryPctEstimate !== null) + HardwareStatus.addBatteryPctEstimate(builder, this.batteryPctEstimate); HardwareStatus.addLogData(builder, logData); return HardwareStatus.endHardwareStatus(builder); diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/imu-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/imu-type.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/imu-type.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/mcu-type.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/hardware_info/mcu-type.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hardware-info/mcu-type.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/hz-f32.ts b/protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/hz-f32.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/hz-f32.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/ipv4-address.ts b/protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/ipv4-address.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/ipv4address.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/log-data.ts b/protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/log-data.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/log-data.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/math/quat.ts b/protocol/typescript/src/solarxr-protocol/datatypes/math/quat.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/math/quat.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/math/quat.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/math/vec3f.ts b/protocol/typescript/src/solarxr-protocol/datatypes/math/vec3f.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/math/vec3f.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/math/vec3f.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/string.ts b/protocol/typescript/src/solarxr-protocol/datatypes/string-table.ts similarity index 51% rename from protocol/typescript/src/solarxr_protocol/datatypes/string.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/string-table.ts index ead40f8a..ae1ee0dd 100644 --- a/protocol/typescript/src/solarxr_protocol/datatypes/string.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/string-table.ts @@ -4,22 +4,22 @@ import * as flatbuffers from 'flatbuffers'; -export class String { +export class StringTable { bb: flatbuffers.ByteBuffer|null = null; bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):String { +__init(i:number, bb:flatbuffers.ByteBuffer):StringTable { this.bb_pos = i; this.bb = bb; return this; } -static getRootAsString(bb:flatbuffers.ByteBuffer, obj?:String):String { - return (obj || new String()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +static getRootAsStringTable(bb:flatbuffers.ByteBuffer, obj?:StringTable):StringTable { + return (obj || new StringTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } -static getSizePrefixedRootAsString(bb:flatbuffers.ByteBuffer, obj?:String):String { +static getSizePrefixedRootAsStringTable(bb:flatbuffers.ByteBuffer, obj?:StringTable):StringTable { bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new String()).__init(bb.readInt32(bb.position()) + bb.position(), bb); + return (obj || new StringTable()).__init(bb.readInt32(bb.position()) + bb.position(), bb); } s():string|null @@ -29,7 +29,7 @@ s(optionalEncoding?:any):string|Uint8Array|null { return offset ? this.bb!.__string(this.bb_pos + offset, optionalEncoding) : null; } -static startString(builder:flatbuffers.Builder) { +static startStringTable(builder:flatbuffers.Builder) { builder.startObject(1); } @@ -37,30 +37,30 @@ static addS(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset) { builder.addFieldOffset(0, sOffset, 0); } -static endString(builder:flatbuffers.Builder):flatbuffers.Offset { +static endStringTable(builder:flatbuffers.Builder):flatbuffers.Offset { const offset = builder.endObject(); return offset; } -static createString(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset):flatbuffers.Offset { - String.startString(builder); - String.addS(builder, sOffset); - return String.endString(builder); +static createStringTable(builder:flatbuffers.Builder, sOffset:flatbuffers.Offset):flatbuffers.Offset { + StringTable.startStringTable(builder); + StringTable.addS(builder, sOffset); + return StringTable.endStringTable(builder); } -unpack(): StringT { - return new StringT( +unpack(): StringTableT { + return new StringTableT( this.s() ); } -unpackTo(_o: StringT): void { +unpackTo(_o: StringTableT): void { _o.s = this.s(); } } -export class StringT { +export class StringTableT { constructor( public s: string|Uint8Array|null = null ){} @@ -69,7 +69,7 @@ constructor( pack(builder:flatbuffers.Builder): flatbuffers.Offset { const s = (this.s !== null ? builder.createString(this.s!) : 0); - return String.createString(builder, + return StringTable.createStringTable(builder, s ); } diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/temperature.ts b/protocol/typescript/src/solarxr-protocol/datatypes/temperature.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/temperature.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/temperature.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/tracker-id.ts b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-id.ts similarity index 97% rename from protocol/typescript/src/solarxr_protocol/datatypes/tracker-id.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/tracker-id.ts index 13dfa539..0a39ee00 100644 --- a/protocol/typescript/src/solarxr_protocol/datatypes/tracker-id.ts +++ b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-id.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { DeviceId, DeviceIdT } from '../../solarxr_protocol/datatypes/device-id'; +import { DeviceId, DeviceIdT } from '../../solarxr-protocol/datatypes/device-id'; export class TrackerId { diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/tracker-role.ts b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/tracker-role.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/tracker-role.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/tracker-status.ts b/protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/tracker-status.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/tracker-status.ts diff --git a/protocol/typescript/src/solarxr_protocol/datatypes/transaction-id.ts b/protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/datatypes/transaction-id.ts rename to protocol/typescript/src/solarxr-protocol/datatypes/transaction-id.ts diff --git a/protocol/typescript/src/solarxr_protocol/message-bundle.ts b/protocol/typescript/src/solarxr-protocol/message-bundle.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/message-bundle.ts rename to protocol/typescript/src/solarxr-protocol/message-bundle.ts index a8da4762..f8aec2bc 100644 --- a/protocol/typescript/src/solarxr_protocol/message-bundle.ts +++ b/protocol/typescript/src/solarxr-protocol/message-bundle.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { DataFeedMessageHeader, DataFeedMessageHeaderT } from '../solarxr_protocol/data_feed/data-feed-message-header'; -import { PubSubHeader, PubSubHeaderT } from '../solarxr_protocol/pub_sub/pub-sub-header'; -import { RpcMessageHeader, RpcMessageHeaderT } from '../solarxr_protocol/rpc/rpc-message-header'; +import { DataFeedMessageHeader, DataFeedMessageHeaderT } from '../solarxr-protocol/data-feed/data-feed-message-header'; +import { PubSubHeader, PubSubHeaderT } from '../solarxr-protocol/pub-sub/pub-sub-header'; +import { RpcMessageHeader, RpcMessageHeaderT } from '../solarxr-protocol/rpc/rpc-message-header'; /** diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/key-values.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/key-values.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/pub_sub/key-values.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/key-values.ts diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/message.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/message.ts similarity index 88% rename from protocol/typescript/src/solarxr_protocol/pub_sub/message.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/message.ts index 3f1139de..7a82e858 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/message.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/message.ts @@ -2,13 +2,13 @@ import * as flatbuffers from 'flatbuffers'; -import { Bytes, BytesT } from '../../solarxr_protocol/datatypes/bytes'; -import { String, StringT } from '../../solarxr_protocol/datatypes/string'; -import { KeyValues, KeyValuesT } from '../../solarxr_protocol/pub_sub/key-values'; -import { Payload, unionToPayload, unionListToPayload } from '../../solarxr_protocol/pub_sub/payload'; -import { Topic, unionToTopic, unionListToTopic } from '../../solarxr_protocol/pub_sub/topic'; -import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; -import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; +import { Bytes, BytesT } from '../../solarxr-protocol/datatypes/bytes'; +import { StringTable, StringTableT } from '../../solarxr-protocol/datatypes/string-table'; +import { KeyValues, KeyValuesT } from '../../solarxr-protocol/pub-sub/key-values'; +import { Payload, unionToPayload, unionListToPayload } from '../../solarxr-protocol/pub-sub/payload'; +import { Topic, unionToTopic, unionListToTopic } from '../../solarxr-protocol/pub-sub/topic'; +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id'; /** @@ -125,7 +125,7 @@ constructor( public topicType: Topic = Topic.NONE, public topic: TopicHandleT|TopicIdT|null = null, public payloadType: Payload = Payload.NONE, - public payload: BytesT|KeyValuesT|StringT|null = null + public payload: BytesT|KeyValuesT|StringTableT|null = null ){} diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/payload.ts similarity index 51% rename from protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/payload.ts index ad4d2d1a..d1d783d4 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/payload.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/payload.ts @@ -1,24 +1,24 @@ // automatically generated by the FlatBuffers compiler, do not modify -import { Bytes, BytesT } from '../../solarxr_protocol/datatypes/bytes'; -import { String, StringT } from '../../solarxr_protocol/datatypes/string'; -import { KeyValues, KeyValuesT } from '../../solarxr_protocol/pub_sub/key-values'; +import { Bytes, BytesT } from '../../solarxr-protocol/datatypes/bytes'; +import { StringTable, StringTableT } from '../../solarxr-protocol/datatypes/string-table'; +import { KeyValues, KeyValuesT } from '../../solarxr-protocol/pub-sub/key-values'; export enum Payload{ NONE = 0, - solarxr_protocol_datatypes_String = 1, + solarxr_protocol_datatypes_StringTable = 1, solarxr_protocol_datatypes_Bytes = 2, KeyValues = 3 } export function unionToPayload( type: Payload, - accessor: (obj:Bytes|KeyValues|String) => Bytes|KeyValues|String|null -): Bytes|KeyValues|String|null { + accessor: (obj:Bytes|KeyValues|StringTable) => Bytes|KeyValues|StringTable|null +): Bytes|KeyValues|StringTable|null { switch(Payload[type]) { case 'NONE': return null; - case 'solarxr_protocol_datatypes_String': return accessor(new String())! as String; + case 'solarxr_protocol_datatypes_StringTable': return accessor(new StringTable())! as StringTable; case 'solarxr_protocol_datatypes_Bytes': return accessor(new Bytes())! as Bytes; case 'KeyValues': return accessor(new KeyValues())! as KeyValues; default: return null; @@ -27,12 +27,12 @@ export function unionToPayload( export function unionListToPayload( type: Payload, - accessor: (index: number, obj:Bytes|KeyValues|String) => Bytes|KeyValues|String|null, + accessor: (index: number, obj:Bytes|KeyValues|StringTable) => Bytes|KeyValues|StringTable|null, index: number -): Bytes|KeyValues|String|null { +): Bytes|KeyValues|StringTable|null { switch(Payload[type]) { case 'NONE': return null; - case 'solarxr_protocol_datatypes_String': return accessor(index, new String())! as String; + case 'solarxr_protocol_datatypes_StringTable': return accessor(index, new StringTable())! as StringTable; case 'solarxr_protocol_datatypes_Bytes': return accessor(index, new Bytes())! as Bytes; case 'KeyValues': return accessor(index, new KeyValues())! as KeyValues; default: return null; diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts similarity index 91% rename from protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts index fa2a4e96..85ddf35c 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-header.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts @@ -2,11 +2,11 @@ import * as flatbuffers from 'flatbuffers'; -import { Message, MessageT } from '../../solarxr_protocol/pub_sub/message'; -import { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from '../../solarxr_protocol/pub_sub/pub-sub-union'; -import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr_protocol/pub_sub/subscription-request'; -import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr_protocol/pub_sub/topic-handle-request'; -import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr_protocol/pub_sub/topic-handle-response'; +import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message'; +import { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from '../../solarxr-protocol/pub-sub/pub-sub-union'; +import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request'; +import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request'; +import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr-protocol/pub-sub/topic-handle-response'; export class PubSubHeader { diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts similarity index 90% rename from protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts index b6ef5392..02f5e941 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/pub-sub-union.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts @@ -1,9 +1,9 @@ // automatically generated by the FlatBuffers compiler, do not modify -import { Message, MessageT } from '../../solarxr_protocol/pub_sub/message'; -import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr_protocol/pub_sub/subscription-request'; -import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr_protocol/pub_sub/topic-handle-request'; -import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr_protocol/pub_sub/topic-handle-response'; +import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message'; +import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request'; +import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request'; +import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr-protocol/pub-sub/topic-handle-response'; export enum PubSubUnion{ diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts similarity index 94% rename from protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts index 8899c08f..9d43dbc6 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/subscription-request.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { Topic, unionToTopic, unionListToTopic } from '../../solarxr_protocol/pub_sub/topic'; -import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; -import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; +import { Topic, unionToTopic, unionListToTopic } from '../../solarxr-protocol/pub-sub/topic'; +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id'; /** diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-request.ts similarity index 97% rename from protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-request.ts index f91f5e34..03738a56 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-request.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-request.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id'; /** diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts index 9c9297a5..b2fccb4c 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle-response.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle'; /** diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/pub_sub/topic-handle.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle.ts diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic-id.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-id.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/pub_sub/topic-id.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/topic-id.ts diff --git a/protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts similarity index 86% rename from protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts rename to protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts index 7866dfe3..06d72dd8 100644 --- a/protocol/typescript/src/solarxr_protocol/pub_sub/topic.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic.ts @@ -1,7 +1,7 @@ // automatically generated by the FlatBuffers compiler, do not modify -import { TopicHandle, TopicHandleT } from '../../solarxr_protocol/pub_sub/topic-handle'; -import { TopicId, TopicIdT } from '../../solarxr_protocol/pub_sub/topic-id'; +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id'; export enum Topic{ diff --git a/protocol/typescript/src/solarxr_protocol/rpc/assign-tracker-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts similarity index 95% rename from protocol/typescript/src/solarxr_protocol/rpc/assign-tracker-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts index 655a2a0d..ad66fc47 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/assign-tracker-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/assign-tracker-request.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { BodyPart } from '../../solarxr_protocol/datatypes/body-part'; -import { TrackerId, TrackerIdT } from '../../solarxr_protocol/datatypes/tracker-id'; -import { Quat, QuatT } from '../../solarxr_protocol/datatypes/math/quat'; +import { BodyPart } from '../../solarxr-protocol/datatypes/body-part'; +import { TrackerId, TrackerIdT } from '../../solarxr-protocol/datatypes/tracker-id'; +import { Quat, QuatT } from '../../solarxr-protocol/datatypes/math/quat'; export class AssignTrackerRequest { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-epoch-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-epoch-response.ts similarity index 98% rename from protocol/typescript/src/solarxr_protocol/rpc/auto-bone-epoch-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/auto-bone-epoch-response.ts index 748a9bc4..cf28991d 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-epoch-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-epoch-response.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { SkeletonPart, SkeletonPartT } from '../../solarxr_protocol/rpc/skeleton-part'; +import { SkeletonPart, SkeletonPartT } from '../../solarxr-protocol/rpc/skeleton-part'; export class AutoBoneEpochResponse { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-request.ts similarity index 97% rename from protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-request.ts index 4ac189cc..f926281c 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-request.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { AutoBoneProcessType } from '../../solarxr_protocol/rpc/auto-bone-process-type'; +import { AutoBoneProcessType } from '../../solarxr-protocol/rpc/auto-bone-process-type'; export class AutoBoneProcessRequest { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-status-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-status-response.ts similarity index 98% rename from protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-status-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-status-response.ts index 1cbbf4e5..b8237bd4 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-status-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-status-response.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { AutoBoneProcessType } from '../../solarxr_protocol/rpc/auto-bone-process-type'; +import { AutoBoneProcessType } from '../../solarxr-protocol/rpc/auto-bone-process-type'; export class AutoBoneProcessStatusResponse { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-type.ts b/protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-type.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/auto-bone-process-type.ts rename to protocol/typescript/src/solarxr-protocol/rpc/auto-bone-process-type.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/change-settings-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/rpc/change-settings-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts index 85948f84..9afc6b08 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/change-settings-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-settings-request.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { FilteringSettings, FilteringSettingsT } from '../../solarxr_protocol/rpc/filtering-settings'; -import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr_protocol/rpc/steam-v-r-trackers-setting'; -import { ModelSettings, ModelSettingsT } from '../../solarxr_protocol/rpc/settings/model-settings'; +import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings'; +import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting'; +import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings'; export class ChangeSettingsRequest { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/change-skeleton-config-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/change-skeleton-config-request.ts similarity index 97% rename from protocol/typescript/src/solarxr_protocol/rpc/change-skeleton-config-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/change-skeleton-config-request.ts index 7ecaeaa5..913e385d 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/change-skeleton-config-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/change-skeleton-config-request.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { SkeletonBone } from '../../solarxr_protocol/rpc/skeleton-bone'; +import { SkeletonBone } from '../../solarxr-protocol/rpc/skeleton-bone'; export class ChangeSkeletonConfigRequest { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/close-serial-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/close-serial-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/close-serial-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/filtering-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts similarity index 97% rename from protocol/typescript/src/solarxr_protocol/rpc/filtering-settings.ts rename to protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts index 46d3c513..385b4993 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/filtering-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/filtering-settings.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { FilteringType } from '../../solarxr_protocol/datatypes/filtering-type'; +import { FilteringType } from '../../solarxr-protocol/datatypes/filtering-type'; export class FilteringSettings { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/heartbeat-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/heartbeat-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/heartbeat-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/heartbeat-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/heartbeat-response.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/heartbeat-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/heartbeat-response.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/open-serial-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/open-serial-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/open-serial-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-change-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-change-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-change-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-change-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-response.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/overlay-display-mode-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/overlay-display-mode-response.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/record-bvhrequest.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-status.ts b/protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/record-b-v-h-status.ts rename to protocol/typescript/src/solarxr-protocol/rpc/record-bvhstatus.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/reset-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-request.ts similarity index 96% rename from protocol/typescript/src/solarxr_protocol/rpc/reset-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/reset-request.ts index cd36093a..35ad1882 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/reset-request.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/reset-request.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { ResetType } from '../../solarxr_protocol/rpc/reset-type'; +import { ResetType } from '../../solarxr-protocol/rpc/reset-type'; export class ResetRequest { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/reset-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/reset-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/reset-response.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/reset-type.ts b/protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/reset-type.ts rename to protocol/typescript/src/solarxr-protocol/rpc/reset-type.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/rpc-message-header.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts similarity index 80% rename from protocol/typescript/src/solarxr_protocol/rpc/rpc-message-header.ts rename to protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts index a569533f..84317dca 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/rpc-message-header.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message-header.ts @@ -2,34 +2,34 @@ import * as flatbuffers from 'flatbuffers'; -import { TransactionId, TransactionIdT } from '../../solarxr_protocol/datatypes/transaction-id'; -import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr_protocol/rpc/assign-tracker-request'; -import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr_protocol/rpc/auto-bone-epoch-response'; -import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr_protocol/rpc/auto-bone-process-request'; -import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr_protocol/rpc/auto-bone-process-status-response'; -import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr_protocol/rpc/change-settings-request'; -import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr_protocol/rpc/change-skeleton-config-request'; -import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr_protocol/rpc/close-serial-request'; -import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr_protocol/rpc/heartbeat-request'; -import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr_protocol/rpc/heartbeat-response'; -import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr_protocol/rpc/open-serial-request'; -import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-change-request'; -import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-request'; -import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr_protocol/rpc/overlay-display-mode-response'; -import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr_protocol/rpc/record-b-v-h-request'; -import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr_protocol/rpc/record-b-v-h-status'; -import { ResetRequest, ResetRequestT } from '../../solarxr_protocol/rpc/reset-request'; -import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr_protocol/rpc/rpc-message'; -import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr_protocol/rpc/serial-tracker-factory-reset-request'; -import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr_protocol/rpc/serial-tracker-get-info-request'; -import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr_protocol/rpc/serial-tracker-reboot-request'; -import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr_protocol/rpc/serial-update-response'; -import { SetWifiRequest, SetWifiRequestT } from '../../solarxr_protocol/rpc/set-wifi-request'; -import { SettingsRequest, SettingsRequestT } from '../../solarxr_protocol/rpc/settings-request'; -import { SettingsResponse, SettingsResponseT } from '../../solarxr_protocol/rpc/settings-response'; -import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr_protocol/rpc/skeleton-config-request'; -import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr_protocol/rpc/skeleton-config-response'; -import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr_protocol/rpc/skeleton-reset-all-request'; +import { TransactionId, TransactionIdT } from '../../solarxr-protocol/datatypes/transaction-id'; +import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request'; +import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response'; +import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request'; +import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response'; +import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request'; +import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request'; +import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request'; +import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request'; +import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response'; +import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request'; +import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request'; +import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request'; +import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response'; +import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest'; +import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus'; +import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request'; +import { RpcMessage, unionToRpcMessage, unionListToRpcMessage } from '../../solarxr-protocol/rpc/rpc-message'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request'; +import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response'; +import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request'; +import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request'; +import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response'; +import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request'; +import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response'; +import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request'; export class RpcMessageHeader { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/rpc-message.ts b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts similarity index 89% rename from protocol/typescript/src/solarxr_protocol/rpc/rpc-message.ts rename to protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts index a01c35da..6b27003d 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/rpc-message.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/rpc-message.ts @@ -1,31 +1,31 @@ // automatically generated by the FlatBuffers compiler, do not modify -import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr_protocol/rpc/assign-tracker-request'; -import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr_protocol/rpc/auto-bone-epoch-response'; -import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr_protocol/rpc/auto-bone-process-request'; -import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr_protocol/rpc/auto-bone-process-status-response'; -import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr_protocol/rpc/change-settings-request'; -import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr_protocol/rpc/change-skeleton-config-request'; -import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr_protocol/rpc/close-serial-request'; -import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr_protocol/rpc/heartbeat-request'; -import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr_protocol/rpc/heartbeat-response'; -import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr_protocol/rpc/open-serial-request'; -import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-change-request'; -import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr_protocol/rpc/overlay-display-mode-request'; -import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr_protocol/rpc/overlay-display-mode-response'; -import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr_protocol/rpc/record-b-v-h-request'; -import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr_protocol/rpc/record-b-v-h-status'; -import { ResetRequest, ResetRequestT } from '../../solarxr_protocol/rpc/reset-request'; -import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr_protocol/rpc/serial-tracker-factory-reset-request'; -import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr_protocol/rpc/serial-tracker-get-info-request'; -import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr_protocol/rpc/serial-tracker-reboot-request'; -import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr_protocol/rpc/serial-update-response'; -import { SetWifiRequest, SetWifiRequestT } from '../../solarxr_protocol/rpc/set-wifi-request'; -import { SettingsRequest, SettingsRequestT } from '../../solarxr_protocol/rpc/settings-request'; -import { SettingsResponse, SettingsResponseT } from '../../solarxr_protocol/rpc/settings-response'; -import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr_protocol/rpc/skeleton-config-request'; -import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr_protocol/rpc/skeleton-config-response'; -import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr_protocol/rpc/skeleton-reset-all-request'; +import { AssignTrackerRequest, AssignTrackerRequestT } from '../../solarxr-protocol/rpc/assign-tracker-request'; +import { AutoBoneEpochResponse, AutoBoneEpochResponseT } from '../../solarxr-protocol/rpc/auto-bone-epoch-response'; +import { AutoBoneProcessRequest, AutoBoneProcessRequestT } from '../../solarxr-protocol/rpc/auto-bone-process-request'; +import { AutoBoneProcessStatusResponse, AutoBoneProcessStatusResponseT } from '../../solarxr-protocol/rpc/auto-bone-process-status-response'; +import { ChangeSettingsRequest, ChangeSettingsRequestT } from '../../solarxr-protocol/rpc/change-settings-request'; +import { ChangeSkeletonConfigRequest, ChangeSkeletonConfigRequestT } from '../../solarxr-protocol/rpc/change-skeleton-config-request'; +import { CloseSerialRequest, CloseSerialRequestT } from '../../solarxr-protocol/rpc/close-serial-request'; +import { HeartbeatRequest, HeartbeatRequestT } from '../../solarxr-protocol/rpc/heartbeat-request'; +import { HeartbeatResponse, HeartbeatResponseT } from '../../solarxr-protocol/rpc/heartbeat-response'; +import { OpenSerialRequest, OpenSerialRequestT } from '../../solarxr-protocol/rpc/open-serial-request'; +import { OverlayDisplayModeChangeRequest, OverlayDisplayModeChangeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-change-request'; +import { OverlayDisplayModeRequest, OverlayDisplayModeRequestT } from '../../solarxr-protocol/rpc/overlay-display-mode-request'; +import { OverlayDisplayModeResponse, OverlayDisplayModeResponseT } from '../../solarxr-protocol/rpc/overlay-display-mode-response'; +import { RecordBVHRequest, RecordBVHRequestT } from '../../solarxr-protocol/rpc/record-bvhrequest'; +import { RecordBVHStatus, RecordBVHStatusT } from '../../solarxr-protocol/rpc/record-bvhstatus'; +import { ResetRequest, ResetRequestT } from '../../solarxr-protocol/rpc/reset-request'; +import { SerialTrackerFactoryResetRequest, SerialTrackerFactoryResetRequestT } from '../../solarxr-protocol/rpc/serial-tracker-factory-reset-request'; +import { SerialTrackerGetInfoRequest, SerialTrackerGetInfoRequestT } from '../../solarxr-protocol/rpc/serial-tracker-get-info-request'; +import { SerialTrackerRebootRequest, SerialTrackerRebootRequestT } from '../../solarxr-protocol/rpc/serial-tracker-reboot-request'; +import { SerialUpdateResponse, SerialUpdateResponseT } from '../../solarxr-protocol/rpc/serial-update-response'; +import { SetWifiRequest, SetWifiRequestT } from '../../solarxr-protocol/rpc/set-wifi-request'; +import { SettingsRequest, SettingsRequestT } from '../../solarxr-protocol/rpc/settings-request'; +import { SettingsResponse, SettingsResponseT } from '../../solarxr-protocol/rpc/settings-response'; +import { SkeletonConfigRequest, SkeletonConfigRequestT } from '../../solarxr-protocol/rpc/skeleton-config-request'; +import { SkeletonConfigResponse, SkeletonConfigResponseT } from '../../solarxr-protocol/rpc/skeleton-config-response'; +import { SkeletonResetAllRequest, SkeletonResetAllRequestT } from '../../solarxr-protocol/rpc/skeleton-reset-all-request'; export enum RpcMessage{ diff --git a/protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-factory-reset-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-factory-reset-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-factory-reset-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-get-info-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-get-info-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-get-info-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-reboot-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/serial-tracker-reboot-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/serial-tracker-reboot-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/serial-update-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/serial-update-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/serial-update-response.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/set-wifi-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/set-wifi-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/set-wifi-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/settings-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/settings-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/settings-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/settings-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts similarity index 95% rename from protocol/typescript/src/solarxr_protocol/rpc/settings-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts index bb5429a8..28ee5f27 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/settings-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings-response.ts @@ -2,9 +2,9 @@ import * as flatbuffers from 'flatbuffers'; -import { FilteringSettings, FilteringSettingsT } from '../../solarxr_protocol/rpc/filtering-settings'; -import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr_protocol/rpc/steam-v-r-trackers-setting'; -import { ModelSettings, ModelSettingsT } from '../../solarxr_protocol/rpc/settings/model-settings'; +import { FilteringSettings, FilteringSettingsT } from '../../solarxr-protocol/rpc/filtering-settings'; +import { SteamVRTrackersSetting, SteamVRTrackersSettingT } from '../../solarxr-protocol/rpc/steam-vrtrackers-setting'; +import { ModelSettings, ModelSettingsT } from '../../solarxr-protocol/rpc/settings/model-settings'; export class SettingsResponse { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/settings/model-ratios.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/settings/model-ratios.ts rename to protocol/typescript/src/solarxr-protocol/rpc/settings/model-ratios.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/settings/model-settings.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts similarity index 95% rename from protocol/typescript/src/solarxr_protocol/rpc/settings/model-settings.ts rename to protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts index fbbd761d..019d7e08 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/settings/model-settings.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-settings.ts @@ -2,8 +2,8 @@ import * as flatbuffers from 'flatbuffers'; -import { ModelRatios, ModelRatiosT } from '../../../solarxr_protocol/rpc/settings/model-ratios'; -import { ModelToggles, ModelTogglesT } from '../../../solarxr_protocol/rpc/settings/model-toggles'; +import { ModelRatios, ModelRatiosT } from '../../../solarxr-protocol/rpc/settings/model-ratios'; +import { ModelToggles, ModelTogglesT } from '../../../solarxr-protocol/rpc/settings/model-toggles'; /** diff --git a/protocol/typescript/src/solarxr_protocol/rpc/settings/model-toggles.ts b/protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/settings/model-toggles.ts rename to protocol/typescript/src/solarxr-protocol/rpc/settings/model-toggles.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-bone.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/skeleton-bone.ts rename to protocol/typescript/src/solarxr-protocol/rpc/skeleton-bone.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-response.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-response.ts similarity index 98% rename from protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-response.ts rename to protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-response.ts index 38db57d1..5924b005 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-config-response.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-config-response.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { SkeletonPart, SkeletonPartT } from '../../solarxr_protocol/rpc/skeleton-part'; +import { SkeletonPart, SkeletonPartT } from '../../solarxr-protocol/rpc/skeleton-part'; export class SkeletonConfigResponse { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-part.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-part.ts similarity index 97% rename from protocol/typescript/src/solarxr_protocol/rpc/skeleton-part.ts rename to protocol/typescript/src/solarxr-protocol/rpc/skeleton-part.ts index 59d3a184..1fdd735d 100644 --- a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-part.ts +++ b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-part.ts @@ -2,7 +2,7 @@ import * as flatbuffers from 'flatbuffers'; -import { SkeletonBone } from '../../solarxr_protocol/rpc/skeleton-bone'; +import { SkeletonBone } from '../../solarxr-protocol/rpc/skeleton-bone'; export class SkeletonPart { diff --git a/protocol/typescript/src/solarxr_protocol/rpc/skeleton-reset-all-request.ts b/protocol/typescript/src/solarxr-protocol/rpc/skeleton-reset-all-request.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/skeleton-reset-all-request.ts rename to protocol/typescript/src/solarxr-protocol/rpc/skeleton-reset-all-request.ts diff --git a/protocol/typescript/src/solarxr_protocol/rpc/steam-v-r-trackers-setting.ts b/protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts similarity index 100% rename from protocol/typescript/src/solarxr_protocol/rpc/steam-v-r-trackers-setting.ts rename to protocol/typescript/src/solarxr-protocol/rpc/steam-vrtrackers-setting.ts diff --git a/schema/datatypes/datatypes.fbs b/schema/datatypes/datatypes.fbs index ba839dc1..f510e2e9 100644 --- a/schema/datatypes/datatypes.fbs +++ b/schema/datatypes/datatypes.fbs @@ -141,6 +141,6 @@ table Bytes { b: [uint8]; } -table String { +table StringTable { s: string; } diff --git a/schema/pub_sub/pub_sub.fbs b/schema/pub_sub/pub_sub.fbs index d8c46d31..695da186 100644 --- a/schema/pub_sub/pub_sub.fbs +++ b/schema/pub_sub/pub_sub.fbs @@ -36,7 +36,7 @@ table PubSubHeader { } union Payload { - solarxr_protocol.datatypes.String, + solarxr_protocol.datatypes.StringTable, solarxr_protocol.datatypes.Bytes, KeyValues, } From 86eb9aa6b5126d363570250831663a7ba9920c23 Mon Sep 17 00:00:00 2001 From: lucas lelievre Date: Mon, 7 Nov 2022 00:36:42 +0100 Subject: [PATCH 9/9] Add a response to the Topic Subscription Request And Make the Handle Request send the Topic id with the handle (#49) * Add a response to the Topic Subscription Request + Make the Handle Request send the Topic id with the handle * Apply suggestions from code review Co-authored-by: Ryan Butler * Regenerate code Co-authored-by: Ryan Butler --- package-lock.json | 2 +- .../generated/all_generated.h | 221 +++++++++--------- .../pub_sub/PubSubHeader.java | 6 +- .../solarxr_protocol/pub_sub/PubSubUnion.java | 4 +- .../pub_sub/PubSubUnionUnion.java | 4 +- .../pub_sub/SubscriptionRequest.java | 2 +- .../pub_sub/TopicHandleResponse.java | 61 ----- .../pub_sub/TopicMapping.java | 70 ++++++ ...andleResponseT.java => TopicMappingT.java} | 10 +- protocol/rust/src/generated/mod.rs | 8 +- .../pub_sub/pub_sub_header_generated.rs | 12 +- .../pub_sub/pub_sub_union_generated.rs | 8 +- .../pub_sub/subscription_request_generated.rs | 2 +- ...enerated.rs => topic_mapping_generated.rs} | 62 +++-- protocol/typescript/src/all.ts | 2 +- .../pub-sub/pub-sub-header.ts | 4 +- .../solarxr-protocol/pub-sub/pub-sub-union.ts | 16 +- .../pub-sub/subscription-request.ts | 2 +- .../pub-sub/topic-handle-response.ts | 78 ------- .../solarxr-protocol/pub-sub/topic-mapping.ts | 89 +++++++ schema/pub_sub/pub_sub.fbs | 8 +- schema/pub_sub/topic.fbs | 12 +- 22 files changed, 367 insertions(+), 316 deletions(-) delete mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java create mode 100644 protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java rename protocol/java/src/solarxr_protocol/pub_sub/{TopicHandleResponseT.java => TopicMappingT.java} (63%) rename protocol/rust/src/generated/solarxr_protocol/pub_sub/{topic_handle_response_generated.rs => topic_mapping_generated.rs} (56%) delete mode 100644 protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts create mode 100644 protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts diff --git a/package-lock.json b/package-lock.json index d6815707..a1aadc64 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "name": "solarxr-protocol", "version": "1.0.0", - "license": "ISC", + "license": "(MIT OR Apache-2.0)", "dependencies": { "flatbuffers": "^2.0.6" }, diff --git a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h index 75dd5fff..ed038d88 100644 --- a/protocol/cpp/include/solarxr_protocol/generated/all_generated.h +++ b/protocol/cpp/include/solarxr_protocol/generated/all_generated.h @@ -223,11 +223,14 @@ struct TopicIdBuilder; struct TopicHandle; struct TopicHandleBuilder; +struct TopicMapping; +struct TopicMappingBuilder; + struct TopicHandleRequest; struct TopicHandleRequestBuilder; -struct TopicHandleResponse; -struct TopicHandleResponseBuilder; +struct SubscriptionRequest; +struct SubscriptionRequestBuilder; struct PubSubHeader; struct PubSubHeaderBuilder; @@ -235,9 +238,6 @@ struct PubSubHeaderBuilder; struct Message; struct MessageBuilder; -struct SubscriptionRequest; -struct SubscriptionRequestBuilder; - struct KeyValues; struct KeyValuesBuilder; @@ -1134,9 +1134,9 @@ enum class PubSubUnion : uint8_t { Message = 1, SubscriptionRequest = 2, TopicHandleRequest = 3, - TopicHandleResponse = 4, + TopicMapping = 4, MIN = NONE, - MAX = TopicHandleResponse + MAX = TopicMapping }; inline const PubSubUnion (&EnumValuesPubSubUnion())[5] { @@ -1145,7 +1145,7 @@ inline const PubSubUnion (&EnumValuesPubSubUnion())[5] { PubSubUnion::Message, PubSubUnion::SubscriptionRequest, PubSubUnion::TopicHandleRequest, - PubSubUnion::TopicHandleResponse + PubSubUnion::TopicMapping }; return values; } @@ -1156,14 +1156,14 @@ inline const char * const *EnumNamesPubSubUnion() { "Message", "SubscriptionRequest", "TopicHandleRequest", - "TopicHandleResponse", + "TopicMapping", nullptr }; return names; } inline const char *EnumNamePubSubUnion(PubSubUnion e) { - if (flatbuffers::IsOutRange(e, PubSubUnion::NONE, PubSubUnion::TopicHandleResponse)) return ""; + if (flatbuffers::IsOutRange(e, PubSubUnion::NONE, PubSubUnion::TopicMapping)) return ""; const size_t index = static_cast(e); return EnumNamesPubSubUnion()[index]; } @@ -1184,8 +1184,8 @@ template<> struct PubSubUnionTraits struct PubSubUnionTraits { - static const PubSubUnion enum_value = PubSubUnion::TopicHandleResponse; +template<> struct PubSubUnionTraits { + static const PubSubUnion enum_value = PubSubUnion::TopicMapping; }; bool VerifyPubSubUnion(flatbuffers::Verifier &verifier, const void *obj, PubSubUnion type); @@ -5088,6 +5088,60 @@ inline flatbuffers::Offset CreateTopicHandle( return builder_.Finish(); } +/// Response for `TopicHandleRequest` or `SubscriptionRequest`. +struct TopicMapping FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopicMappingBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ID = 4, + VT_HANDLE = 6 + }; + const solarxr_protocol::pub_sub::TopicId *id() const { + return GetPointer(VT_ID); + } + const solarxr_protocol::pub_sub::TopicHandle *handle() const { + return GetPointer(VT_HANDLE); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_ID) && + verifier.VerifyTable(id()) && + VerifyOffset(verifier, VT_HANDLE) && + verifier.VerifyTable(handle()) && + verifier.EndTable(); + } +}; + +struct TopicMappingBuilder { + typedef TopicMapping Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_id(flatbuffers::Offset id) { + fbb_.AddOffset(TopicMapping::VT_ID, id); + } + void add_handle(flatbuffers::Offset handle) { + fbb_.AddOffset(TopicMapping::VT_HANDLE, handle); + } + explicit TopicMappingBuilder(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 CreateTopicMapping( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset id = 0, + flatbuffers::Offset handle = 0) { + TopicMappingBuilder builder_(_fbb); + builder_.add_handle(handle); + builder_.add_id(id); + return builder_.Finish(); +} + /// Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing /// bandwidth, since `FeatureId` can be large. struct TopicHandleRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { @@ -5132,46 +5186,71 @@ inline flatbuffers::Offset CreateTopicHandleRequest( return builder_.Finish(); } -/// Response for `TopicHandleRequest` -struct TopicHandleResponse FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef TopicHandleResponseBuilder Builder; +/// Requests a subscription to `topic`. Replies with a `TopicMapping`. +struct SubscriptionRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubscriptionRequestBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_HANDLE = 4 + VT_TOPIC_TYPE = 4, + VT_TOPIC = 6 }; - const solarxr_protocol::pub_sub::TopicHandle *handle() const { - return GetPointer(VT_HANDLE); + solarxr_protocol::pub_sub::Topic topic_type() const { + return static_cast(GetField(VT_TOPIC_TYPE, 0)); + } + const void *topic() const { + return GetPointer(VT_TOPIC); + } + template const T *topic_as() const; + const solarxr_protocol::pub_sub::TopicHandle *topic_as_TopicHandle() const { + return topic_type() == solarxr_protocol::pub_sub::Topic::TopicHandle ? static_cast(topic()) : nullptr; + } + const solarxr_protocol::pub_sub::TopicId *topic_as_TopicId() const { + return topic_type() == solarxr_protocol::pub_sub::Topic::TopicId ? static_cast(topic()) : nullptr; } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && - VerifyOffset(verifier, VT_HANDLE) && - verifier.VerifyTable(handle()) && + VerifyField(verifier, VT_TOPIC_TYPE, 1) && + VerifyOffset(verifier, VT_TOPIC) && + VerifyTopic(verifier, topic(), topic_type()) && verifier.EndTable(); } }; -struct TopicHandleResponseBuilder { - typedef TopicHandleResponse Table; +template<> inline const solarxr_protocol::pub_sub::TopicHandle *SubscriptionRequest::topic_as() const { + return topic_as_TopicHandle(); +} + +template<> inline const solarxr_protocol::pub_sub::TopicId *SubscriptionRequest::topic_as() const { + return topic_as_TopicId(); +} + +struct SubscriptionRequestBuilder { + typedef SubscriptionRequest Table; flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; - void add_handle(flatbuffers::Offset handle) { - fbb_.AddOffset(TopicHandleResponse::VT_HANDLE, handle); + void add_topic_type(solarxr_protocol::pub_sub::Topic topic_type) { + fbb_.AddElement(SubscriptionRequest::VT_TOPIC_TYPE, static_cast(topic_type), 0); } - explicit TopicHandleResponseBuilder(flatbuffers::FlatBufferBuilder &_fbb) + void add_topic(flatbuffers::Offset topic) { + fbb_.AddOffset(SubscriptionRequest::VT_TOPIC, topic); + } + explicit SubscriptionRequestBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { start_ = fbb_.StartTable(); } - flatbuffers::Offset Finish() { + flatbuffers::Offset Finish() { const auto end = fbb_.EndTable(start_); - auto o = flatbuffers::Offset(end); + auto o = flatbuffers::Offset(end); return o; } }; -inline flatbuffers::Offset CreateTopicHandleResponse( +inline flatbuffers::Offset CreateSubscriptionRequest( flatbuffers::FlatBufferBuilder &_fbb, - flatbuffers::Offset handle = 0) { - TopicHandleResponseBuilder builder_(_fbb); - builder_.add_handle(handle); + solarxr_protocol::pub_sub::Topic topic_type = solarxr_protocol::pub_sub::Topic::NONE, + flatbuffers::Offset topic = 0) { + SubscriptionRequestBuilder builder_(_fbb); + builder_.add_topic(topic); + builder_.add_topic_type(topic_type); return builder_.Finish(); } @@ -5197,8 +5276,8 @@ struct PubSubHeader FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const solarxr_protocol::pub_sub::TopicHandleRequest *u_as_TopicHandleRequest() const { return u_type() == solarxr_protocol::pub_sub::PubSubUnion::TopicHandleRequest ? static_cast(u()) : nullptr; } - const solarxr_protocol::pub_sub::TopicHandleResponse *u_as_TopicHandleResponse() const { - return u_type() == solarxr_protocol::pub_sub::PubSubUnion::TopicHandleResponse ? static_cast(u()) : nullptr; + const solarxr_protocol::pub_sub::TopicMapping *u_as_TopicMapping() const { + return u_type() == solarxr_protocol::pub_sub::PubSubUnion::TopicMapping ? static_cast(u()) : nullptr; } bool Verify(flatbuffers::Verifier &verifier) const { return VerifyTableStart(verifier) && @@ -5221,8 +5300,8 @@ template<> inline const solarxr_protocol::pub_sub::TopicHandleRequest *PubSubHea return u_as_TopicHandleRequest(); } -template<> inline const solarxr_protocol::pub_sub::TopicHandleResponse *PubSubHeader::u_as() const { - return u_as_TopicHandleResponse(); +template<> inline const solarxr_protocol::pub_sub::TopicMapping *PubSubHeader::u_as() const { + return u_as_TopicMapping(); } struct PubSubHeaderBuilder { @@ -5367,74 +5446,6 @@ inline flatbuffers::Offset CreateMessage( return builder_.Finish(); } -/// Requests a subscription to `topic` -struct SubscriptionRequest FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { - typedef SubscriptionRequestBuilder Builder; - enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { - VT_TOPIC_TYPE = 4, - VT_TOPIC = 6 - }; - solarxr_protocol::pub_sub::Topic topic_type() const { - return static_cast(GetField(VT_TOPIC_TYPE, 0)); - } - const void *topic() const { - return GetPointer(VT_TOPIC); - } - template const T *topic_as() const; - const solarxr_protocol::pub_sub::TopicHandle *topic_as_TopicHandle() const { - return topic_type() == solarxr_protocol::pub_sub::Topic::TopicHandle ? static_cast(topic()) : nullptr; - } - const solarxr_protocol::pub_sub::TopicId *topic_as_TopicId() const { - return topic_type() == solarxr_protocol::pub_sub::Topic::TopicId ? static_cast(topic()) : nullptr; - } - bool Verify(flatbuffers::Verifier &verifier) const { - return VerifyTableStart(verifier) && - VerifyField(verifier, VT_TOPIC_TYPE, 1) && - VerifyOffset(verifier, VT_TOPIC) && - VerifyTopic(verifier, topic(), topic_type()) && - verifier.EndTable(); - } -}; - -template<> inline const solarxr_protocol::pub_sub::TopicHandle *SubscriptionRequest::topic_as() const { - return topic_as_TopicHandle(); -} - -template<> inline const solarxr_protocol::pub_sub::TopicId *SubscriptionRequest::topic_as() const { - return topic_as_TopicId(); -} - -struct SubscriptionRequestBuilder { - typedef SubscriptionRequest Table; - flatbuffers::FlatBufferBuilder &fbb_; - flatbuffers::uoffset_t start_; - void add_topic_type(solarxr_protocol::pub_sub::Topic topic_type) { - fbb_.AddElement(SubscriptionRequest::VT_TOPIC_TYPE, static_cast(topic_type), 0); - } - void add_topic(flatbuffers::Offset topic) { - fbb_.AddOffset(SubscriptionRequest::VT_TOPIC, topic); - } - explicit SubscriptionRequestBuilder(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 CreateSubscriptionRequest( - flatbuffers::FlatBufferBuilder &_fbb, - solarxr_protocol::pub_sub::Topic topic_type = solarxr_protocol::pub_sub::Topic::NONE, - flatbuffers::Offset topic = 0) { - SubscriptionRequestBuilder builder_(_fbb); - builder_.add_topic(topic); - builder_.add_topic_type(topic_type); - return builder_.Finish(); -} - struct KeyValues FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { typedef KeyValuesBuilder Builder; enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { @@ -5835,8 +5846,8 @@ inline bool VerifyPubSubUnion(flatbuffers::Verifier &verifier, const void *obj, auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } - case PubSubUnion::TopicHandleResponse: { - auto ptr = reinterpret_cast(obj); + case PubSubUnion::TopicMapping: { + auto ptr = reinterpret_cast(obj); return verifier.VerifyTable(ptr); } default: return true; diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java index ea21f8b5..47823718 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubHeader.java @@ -64,9 +64,9 @@ public void unpackTo(PubSubHeaderT _o) { _oUValue = u(new solarxr_protocol.pub_sub.TopicHandleRequest()); _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicHandleRequest) _oUValue).unpack() : null); break; - case solarxr_protocol.pub_sub.PubSubUnion.TopicHandleResponse: - _oUValue = u(new solarxr_protocol.pub_sub.TopicHandleResponse()); - _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicHandleResponse) _oUValue).unpack() : null); + case solarxr_protocol.pub_sub.PubSubUnion.TopicMapping: + _oUValue = u(new solarxr_protocol.pub_sub.TopicMapping()); + _oU.setValue(_oUValue != null ? ((solarxr_protocol.pub_sub.TopicMapping) _oUValue).unpack() : null); break; default: break; } diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java index 048517cd..698b203a 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnion.java @@ -9,9 +9,9 @@ private PubSubUnion() { } public static final byte Message = 1; public static final byte SubscriptionRequest = 2; public static final byte TopicHandleRequest = 3; - public static final byte TopicHandleResponse = 4; + public static final byte TopicMapping = 4; - public static final String[] names = { "NONE", "Message", "SubscriptionRequest", "TopicHandleRequest", "TopicHandleResponse", }; + public static final String[] names = { "NONE", "Message", "SubscriptionRequest", "TopicHandleRequest", "TopicMapping", }; public static String name(int e) { return names[e]; } } diff --git a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java index 5d7a8c5d..f413196f 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/PubSubUnionUnion.java @@ -24,14 +24,14 @@ public PubSubUnionUnion() { public solarxr_protocol.pub_sub.MessageT asMessage() { return (solarxr_protocol.pub_sub.MessageT) value; } public solarxr_protocol.pub_sub.SubscriptionRequestT asSubscriptionRequest() { return (solarxr_protocol.pub_sub.SubscriptionRequestT) value; } public solarxr_protocol.pub_sub.TopicHandleRequestT asTopicHandleRequest() { return (solarxr_protocol.pub_sub.TopicHandleRequestT) value; } - public solarxr_protocol.pub_sub.TopicHandleResponseT asTopicHandleResponse() { return (solarxr_protocol.pub_sub.TopicHandleResponseT) value; } + public solarxr_protocol.pub_sub.TopicMappingT asTopicMapping() { return (solarxr_protocol.pub_sub.TopicMappingT) value; } public static int pack(FlatBufferBuilder builder, PubSubUnionUnion _o) { switch (_o.type) { case PubSubUnion.Message: return solarxr_protocol.pub_sub.Message.pack(builder, _o.asMessage()); case PubSubUnion.SubscriptionRequest: return solarxr_protocol.pub_sub.SubscriptionRequest.pack(builder, _o.asSubscriptionRequest()); case PubSubUnion.TopicHandleRequest: return solarxr_protocol.pub_sub.TopicHandleRequest.pack(builder, _o.asTopicHandleRequest()); - case PubSubUnion.TopicHandleResponse: return solarxr_protocol.pub_sub.TopicHandleResponse.pack(builder, _o.asTopicHandleResponse()); + case PubSubUnion.TopicMapping: return solarxr_protocol.pub_sub.TopicMapping.pack(builder, _o.asTopicMapping()); default: return 0; } } diff --git a/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java index 84727547..8cb24858 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/SubscriptionRequest.java @@ -8,7 +8,7 @@ import com.google.flatbuffers.*; /** - * Requests a subscription to `topic` + * Requests a subscription to `topic`. Replies with a `TopicMapping`. */ @SuppressWarnings("unused") public final class SubscriptionRequest extends Table { diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java deleted file mode 100644 index a483b174..00000000 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponse.java +++ /dev/null @@ -1,61 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -package solarxr_protocol.pub_sub; - -import java.nio.*; -import java.lang.*; -import java.util.*; -import com.google.flatbuffers.*; - -/** - * Response for `TopicHandleRequest` - */ -@SuppressWarnings("unused") -public final class TopicHandleResponse extends Table { - public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } - public static TopicHandleResponse getRootAsTopicHandleResponse(ByteBuffer _bb) { return getRootAsTopicHandleResponse(_bb, new TopicHandleResponse()); } - public static TopicHandleResponse getRootAsTopicHandleResponse(ByteBuffer _bb, TopicHandleResponse 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 TopicHandleResponse __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } - - public solarxr_protocol.pub_sub.TopicHandle handle() { return handle(new solarxr_protocol.pub_sub.TopicHandle()); } - public solarxr_protocol.pub_sub.TopicHandle handle(solarxr_protocol.pub_sub.TopicHandle obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } - - public static int createTopicHandleResponse(FlatBufferBuilder builder, - int handleOffset) { - builder.startTable(1); - TopicHandleResponse.addHandle(builder, handleOffset); - return TopicHandleResponse.endTopicHandleResponse(builder); - } - - public static void startTopicHandleResponse(FlatBufferBuilder builder) { builder.startTable(1); } - public static void addHandle(FlatBufferBuilder builder, int handleOffset) { builder.addOffset(0, handleOffset, 0); } - public static int endTopicHandleResponse(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 TopicHandleResponse get(int j) { return get(new TopicHandleResponse(), j); } - public TopicHandleResponse get(TopicHandleResponse obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } - } - public TopicHandleResponseT unpack() { - TopicHandleResponseT _o = new TopicHandleResponseT(); - unpackTo(_o); - return _o; - } - public void unpackTo(TopicHandleResponseT _o) { - if (handle() != null) _o.setHandle(handle().unpack()); - else _o.setHandle(null); - } - public static int pack(FlatBufferBuilder builder, TopicHandleResponseT _o) { - if (_o == null) return 0; - int _handle = _o.getHandle() == null ? 0 : solarxr_protocol.pub_sub.TopicHandle.pack(builder, _o.getHandle()); - return createTopicHandleResponse( - builder, - _handle); - } -} - diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java new file mode 100644 index 00000000..d6b24e43 --- /dev/null +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicMapping.java @@ -0,0 +1,70 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package solarxr_protocol.pub_sub; + +import java.nio.*; +import java.lang.*; +import java.util.*; +import com.google.flatbuffers.*; + +/** + * Response for `TopicHandleRequest` or `SubscriptionRequest`. + */ +@SuppressWarnings("unused") +public final class TopicMapping extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_2_0_0(); } + public static TopicMapping getRootAsTopicMapping(ByteBuffer _bb) { return getRootAsTopicMapping(_bb, new TopicMapping()); } + public static TopicMapping getRootAsTopicMapping(ByteBuffer _bb, TopicMapping 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 TopicMapping __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public solarxr_protocol.pub_sub.TopicId id() { return id(new solarxr_protocol.pub_sub.TopicId()); } + public solarxr_protocol.pub_sub.TopicId id(solarxr_protocol.pub_sub.TopicId obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public solarxr_protocol.pub_sub.TopicHandle handle() { return handle(new solarxr_protocol.pub_sub.TopicHandle()); } + public solarxr_protocol.pub_sub.TopicHandle handle(solarxr_protocol.pub_sub.TopicHandle obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createTopicMapping(FlatBufferBuilder builder, + int idOffset, + int handleOffset) { + builder.startTable(2); + TopicMapping.addHandle(builder, handleOffset); + TopicMapping.addId(builder, idOffset); + return TopicMapping.endTopicMapping(builder); + } + + public static void startTopicMapping(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addId(FlatBufferBuilder builder, int idOffset) { builder.addOffset(0, idOffset, 0); } + public static void addHandle(FlatBufferBuilder builder, int handleOffset) { builder.addOffset(1, handleOffset, 0); } + public static int endTopicMapping(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 TopicMapping get(int j) { return get(new TopicMapping(), j); } + public TopicMapping get(TopicMapping obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public TopicMappingT unpack() { + TopicMappingT _o = new TopicMappingT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TopicMappingT _o) { + if (id() != null) _o.setId(id().unpack()); + else _o.setId(null); + if (handle() != null) _o.setHandle(handle().unpack()); + else _o.setHandle(null); + } + public static int pack(FlatBufferBuilder builder, TopicMappingT _o) { + if (_o == null) return 0; + int _id = _o.getId() == null ? 0 : solarxr_protocol.pub_sub.TopicId.pack(builder, _o.getId()); + int _handle = _o.getHandle() == null ? 0 : solarxr_protocol.pub_sub.TopicHandle.pack(builder, _o.getHandle()); + return createTopicMapping( + builder, + _id, + _handle); + } +} + diff --git a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java b/protocol/java/src/solarxr_protocol/pub_sub/TopicMappingT.java similarity index 63% rename from protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java rename to protocol/java/src/solarxr_protocol/pub_sub/TopicMappingT.java index f4af208d..8429afa4 100644 --- a/protocol/java/src/solarxr_protocol/pub_sub/TopicHandleResponseT.java +++ b/protocol/java/src/solarxr_protocol/pub_sub/TopicMappingT.java @@ -7,15 +7,21 @@ import java.util.*; import com.google.flatbuffers.*; -public class TopicHandleResponseT { +public class TopicMappingT { + private solarxr_protocol.pub_sub.TopicIdT id; private solarxr_protocol.pub_sub.TopicHandleT handle; + public solarxr_protocol.pub_sub.TopicIdT getId() { return id; } + + public void setId(solarxr_protocol.pub_sub.TopicIdT id) { this.id = id; } + public solarxr_protocol.pub_sub.TopicHandleT getHandle() { return handle; } public void setHandle(solarxr_protocol.pub_sub.TopicHandleT handle) { this.handle = handle; } - public TopicHandleResponseT() { + public TopicMappingT() { + this.id = null; this.handle = null; } } diff --git a/protocol/rust/src/generated/mod.rs b/protocol/rust/src/generated/mod.rs index 89183b9c..09f83565 100644 --- a/protocol/rust/src/generated/mod.rs +++ b/protocol/rust/src/generated/mod.rs @@ -99,16 +99,16 @@ pub mod solarxr_protocol { pub use self::topic_id_generated::*; mod topic_handle_generated; pub use self::topic_handle_generated::*; + mod topic_mapping_generated; + pub use self::topic_mapping_generated::*; mod topic_handle_request_generated; pub use self::topic_handle_request_generated::*; - mod topic_handle_response_generated; - pub use self::topic_handle_response_generated::*; + mod subscription_request_generated; + pub use self::subscription_request_generated::*; mod pub_sub_header_generated; pub use self::pub_sub_header_generated::*; mod message_generated; pub use self::message_generated::*; - mod subscription_request_generated; - pub use self::subscription_request_generated::*; mod key_values_generated; pub use self::key_values_generated::*; } // pub_sub diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs index d9fad761..3c3c88ec 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_header_generated.rs @@ -83,9 +83,9 @@ impl<'a> PubSubHeader<'a> { #[inline] #[allow(non_snake_case)] - pub fn u_as_topic_handle_response(&self) -> Option> { - if self.u_type() == PubSubUnion::TopicHandleResponse { - self.u().map(TopicHandleResponse::init_from_table) + pub fn u_as_topic_mapping(&self) -> Option> { + if self.u_type() == PubSubUnion::TopicMapping { + self.u().map(TopicMapping::init_from_table) } else { None } @@ -105,7 +105,7 @@ impl flatbuffers::Verifiable for PubSubHeader<'_> { PubSubUnion::Message => v.verify_union_variant::>("PubSubUnion::Message", pos), PubSubUnion::SubscriptionRequest => v.verify_union_variant::>("PubSubUnion::SubscriptionRequest", pos), PubSubUnion::TopicHandleRequest => v.verify_union_variant::>("PubSubUnion::TopicHandleRequest", pos), - PubSubUnion::TopicHandleResponse => v.verify_union_variant::>("PubSubUnion::TopicHandleResponse", pos), + PubSubUnion::TopicMapping => v.verify_union_variant::>("PubSubUnion::TopicMapping", pos), _ => Ok(()), } })? @@ -181,8 +181,8 @@ impl core::fmt::Debug for PubSubHeader<'_> { ds.field("u", &"InvalidFlatbuffer: Union discriminant does not match value.") } }, - PubSubUnion::TopicHandleResponse => { - if let Some(x) = self.u_as_topic_handle_response() { + PubSubUnion::TopicMapping => { + if let Some(x) = self.u_as_topic_mapping() { ds.field("u", &x) } else { ds.field("u", &"InvalidFlatbuffer: Union discriminant does not match value.") diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs index fac7311f..b24a9bbd 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/pub_sub_union_generated.rs @@ -19,7 +19,7 @@ pub const ENUM_VALUES_PUB_SUB_UNION: [PubSubUnion; 5] = [ PubSubUnion::Message, PubSubUnion::SubscriptionRequest, PubSubUnion::TopicHandleRequest, - PubSubUnion::TopicHandleResponse, + PubSubUnion::TopicMapping, ]; #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Default)] @@ -31,7 +31,7 @@ impl PubSubUnion { pub const Message: Self = Self(1); pub const SubscriptionRequest: Self = Self(2); pub const TopicHandleRequest: Self = Self(3); - pub const TopicHandleResponse: Self = Self(4); + pub const TopicMapping: Self = Self(4); pub const ENUM_MIN: u8 = 0; pub const ENUM_MAX: u8 = 4; @@ -40,7 +40,7 @@ impl PubSubUnion { Self::Message, Self::SubscriptionRequest, Self::TopicHandleRequest, - Self::TopicHandleResponse, + Self::TopicMapping, ]; /// Returns the variant's name or "" if unknown. pub fn variant_name(self) -> Option<&'static str> { @@ -49,7 +49,7 @@ impl PubSubUnion { Self::Message => Some("Message"), Self::SubscriptionRequest => Some("SubscriptionRequest"), Self::TopicHandleRequest => Some("TopicHandleRequest"), - Self::TopicHandleResponse => Some("TopicHandleResponse"), + Self::TopicMapping => Some("TopicMapping"), _ => None, } } diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs index a32a3ef0..09dd6399 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/subscription_request_generated.rs @@ -11,7 +11,7 @@ use super::*; pub enum SubscriptionRequestOffset {} #[derive(Copy, Clone, PartialEq)] -/// Requests a subscription to `topic` +/// Requests a subscription to `topic`. Replies with a `TopicMapping`. pub struct SubscriptionRequest<'a> { pub _tab: flatbuffers::Table<'a>, } diff --git a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs similarity index 56% rename from protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs rename to protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs index 6520e698..b8565b2f 100644 --- a/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_handle_response_generated.rs +++ b/protocol/rust/src/generated/solarxr_protocol/pub_sub/topic_mapping_generated.rs @@ -8,97 +8,111 @@ use core::mem; use core::cmp::Ordering; use self::flatbuffers::{EndianScalar, Follow}; use super::*; -pub enum TopicHandleResponseOffset {} +pub enum TopicMappingOffset {} #[derive(Copy, Clone, PartialEq)] -/// Response for `TopicHandleRequest` -pub struct TopicHandleResponse<'a> { +/// Response for `TopicHandleRequest` or `SubscriptionRequest`. +pub struct TopicMapping<'a> { pub _tab: flatbuffers::Table<'a>, } -impl<'a> flatbuffers::Follow<'a> for TopicHandleResponse<'a> { - type Inner = TopicHandleResponse<'a>; +impl<'a> flatbuffers::Follow<'a> for TopicMapping<'a> { + type Inner = TopicMapping<'a>; #[inline] fn follow(buf: &'a [u8], loc: usize) -> Self::Inner { Self { _tab: flatbuffers::Table { buf, loc } } } } -impl<'a> TopicHandleResponse<'a> { - pub const VT_HANDLE: flatbuffers::VOffsetT = 4; +impl<'a> TopicMapping<'a> { + pub const VT_ID: flatbuffers::VOffsetT = 4; + pub const VT_HANDLE: flatbuffers::VOffsetT = 6; #[inline] pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self { - TopicHandleResponse { _tab: table } + TopicMapping { _tab: table } } #[allow(unused_mut)] pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>( _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>, - args: &'args TopicHandleResponseArgs<'args> - ) -> flatbuffers::WIPOffset> { - let mut builder = TopicHandleResponseBuilder::new(_fbb); + args: &'args TopicMappingArgs<'args> + ) -> flatbuffers::WIPOffset> { + let mut builder = TopicMappingBuilder::new(_fbb); if let Some(x) = args.handle { builder.add_handle(x); } + if let Some(x) = args.id { builder.add_id(x); } builder.finish() } + #[inline] + pub fn id(&self) -> Option> { + self._tab.get::>(TopicMapping::VT_ID, None) + } #[inline] pub fn handle(&self) -> Option> { - self._tab.get::>(TopicHandleResponse::VT_HANDLE, None) + self._tab.get::>(TopicMapping::VT_HANDLE, None) } } -impl flatbuffers::Verifiable for TopicHandleResponse<'_> { +impl flatbuffers::Verifiable for TopicMapping<'_> { #[inline] fn run_verifier( v: &mut flatbuffers::Verifier, pos: usize ) -> Result<(), flatbuffers::InvalidFlatbuffer> { use self::flatbuffers::Verifiable; v.visit_table(pos)? + .visit_field::>("id", Self::VT_ID, false)? .visit_field::>("handle", Self::VT_HANDLE, false)? .finish(); Ok(()) } } -pub struct TopicHandleResponseArgs<'a> { +pub struct TopicMappingArgs<'a> { + pub id: Option>>, pub handle: Option>>, } -impl<'a> Default for TopicHandleResponseArgs<'a> { +impl<'a> Default for TopicMappingArgs<'a> { #[inline] fn default() -> Self { - TopicHandleResponseArgs { + TopicMappingArgs { + id: None, handle: None, } } } -pub struct TopicHandleResponseBuilder<'a: 'b, 'b> { +pub struct TopicMappingBuilder<'a: 'b, 'b> { fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>, start_: flatbuffers::WIPOffset, } -impl<'a: 'b, 'b> TopicHandleResponseBuilder<'a, 'b> { +impl<'a: 'b, 'b> TopicMappingBuilder<'a, 'b> { + #[inline] + pub fn add_id(&mut self, id: flatbuffers::WIPOffset>) { + self.fbb_.push_slot_always::>(TopicMapping::VT_ID, id); + } #[inline] pub fn add_handle(&mut self, handle: flatbuffers::WIPOffset>) { - self.fbb_.push_slot_always::>(TopicHandleResponse::VT_HANDLE, handle); + self.fbb_.push_slot_always::>(TopicMapping::VT_HANDLE, handle); } #[inline] - pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicHandleResponseBuilder<'a, 'b> { + pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> TopicMappingBuilder<'a, 'b> { let start = _fbb.start_table(); - TopicHandleResponseBuilder { + TopicMappingBuilder { fbb_: _fbb, start_: start, } } #[inline] - pub fn finish(self) -> flatbuffers::WIPOffset> { + pub fn finish(self) -> flatbuffers::WIPOffset> { let o = self.fbb_.end_table(self.start_); flatbuffers::WIPOffset::new(o.value()) } } -impl core::fmt::Debug for TopicHandleResponse<'_> { +impl core::fmt::Debug for TopicMapping<'_> { fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { - let mut ds = f.debug_struct("TopicHandleResponse"); + let mut ds = f.debug_struct("TopicMapping"); + ds.field("id", &self.id()); ds.field("handle", &self.handle()); ds.finish() } diff --git a/protocol/typescript/src/all.ts b/protocol/typescript/src/all.ts index a396cc54..7dc639e8 100644 --- a/protocol/typescript/src/all.ts +++ b/protocol/typescript/src/all.ts @@ -41,8 +41,8 @@ export { SubscriptionRequest, SubscriptionRequestT } from './solarxr-protocol/pu export { Topic, unionToTopic, unionListToTopic } from './solarxr-protocol/pub-sub/topic'; export { TopicHandle, TopicHandleT } from './solarxr-protocol/pub-sub/topic-handle'; export { TopicHandleRequest, TopicHandleRequestT } from './solarxr-protocol/pub-sub/topic-handle-request'; -export { TopicHandleResponse, TopicHandleResponseT } from './solarxr-protocol/pub-sub/topic-handle-response'; export { TopicId, TopicIdT } from './solarxr-protocol/pub-sub/topic-id'; +export { TopicMapping, TopicMappingT } from './solarxr-protocol/pub-sub/topic-mapping'; export { AssignTrackerRequest, AssignTrackerRequestT } from './solarxr-protocol/rpc/assign-tracker-request'; export { AutoBoneEpochResponse, AutoBoneEpochResponseT } from './solarxr-protocol/rpc/auto-bone-epoch-response'; export { AutoBoneProcessRequest, AutoBoneProcessRequestT } from './solarxr-protocol/rpc/auto-bone-process-request'; diff --git a/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts index 85ddf35c..21e50c10 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-header.ts @@ -6,7 +6,7 @@ import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message'; import { PubSubUnion, unionToPubSubUnion, unionListToPubSubUnion } from '../../solarxr-protocol/pub-sub/pub-sub-union'; import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request'; import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request'; -import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr-protocol/pub-sub/topic-handle-response'; +import { TopicMapping, TopicMappingT } from '../../solarxr-protocol/pub-sub/topic-mapping'; export class PubSubHeader { @@ -86,7 +86,7 @@ unpackTo(_o: PubSubHeaderT): void { export class PubSubHeaderT { constructor( public uType: PubSubUnion = PubSubUnion.NONE, - public u: MessageT|SubscriptionRequestT|TopicHandleRequestT|TopicHandleResponseT|null = null + public u: MessageT|SubscriptionRequestT|TopicHandleRequestT|TopicMappingT|null = null ){} diff --git a/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts index 02f5e941..af01407c 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/pub-sub-union.ts @@ -3,7 +3,7 @@ import { Message, MessageT } from '../../solarxr-protocol/pub-sub/message'; import { SubscriptionRequest, SubscriptionRequestT } from '../../solarxr-protocol/pub-sub/subscription-request'; import { TopicHandleRequest, TopicHandleRequestT } from '../../solarxr-protocol/pub-sub/topic-handle-request'; -import { TopicHandleResponse, TopicHandleResponseT } from '../../solarxr-protocol/pub-sub/topic-handle-response'; +import { TopicMapping, TopicMappingT } from '../../solarxr-protocol/pub-sub/topic-mapping'; export enum PubSubUnion{ @@ -11,34 +11,34 @@ export enum PubSubUnion{ Message = 1, SubscriptionRequest = 2, TopicHandleRequest = 3, - TopicHandleResponse = 4 + TopicMapping = 4 } export function unionToPubSubUnion( type: PubSubUnion, - accessor: (obj:Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse) => Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null -): Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null { + accessor: (obj:Message|SubscriptionRequest|TopicHandleRequest|TopicMapping) => Message|SubscriptionRequest|TopicHandleRequest|TopicMapping|null +): Message|SubscriptionRequest|TopicHandleRequest|TopicMapping|null { switch(PubSubUnion[type]) { case 'NONE': return null; case 'Message': return accessor(new Message())! as Message; case 'SubscriptionRequest': return accessor(new SubscriptionRequest())! as SubscriptionRequest; case 'TopicHandleRequest': return accessor(new TopicHandleRequest())! as TopicHandleRequest; - case 'TopicHandleResponse': return accessor(new TopicHandleResponse())! as TopicHandleResponse; + case 'TopicMapping': return accessor(new TopicMapping())! as TopicMapping; default: return null; } } export function unionListToPubSubUnion( type: PubSubUnion, - accessor: (index: number, obj:Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse) => Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null, + accessor: (index: number, obj:Message|SubscriptionRequest|TopicHandleRequest|TopicMapping) => Message|SubscriptionRequest|TopicHandleRequest|TopicMapping|null, index: number -): Message|SubscriptionRequest|TopicHandleRequest|TopicHandleResponse|null { +): Message|SubscriptionRequest|TopicHandleRequest|TopicMapping|null { switch(PubSubUnion[type]) { case 'NONE': return null; case 'Message': return accessor(index, new Message())! as Message; case 'SubscriptionRequest': return accessor(index, new SubscriptionRequest())! as SubscriptionRequest; case 'TopicHandleRequest': return accessor(index, new TopicHandleRequest())! as TopicHandleRequest; - case 'TopicHandleResponse': return accessor(index, new TopicHandleResponse())! as TopicHandleResponse; + case 'TopicMapping': return accessor(index, new TopicMapping())! as TopicMapping; default: return null; } } diff --git a/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts index 9d43dbc6..1256557e 100644 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/subscription-request.ts @@ -8,7 +8,7 @@ import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id'; /** - * Requests a subscription to `topic` + * Requests a subscription to `topic`. Replies with a `TopicMapping`. */ export class SubscriptionRequest { bb: flatbuffers.ByteBuffer|null = null; diff --git a/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts deleted file mode 100644 index b2fccb4c..00000000 --- a/protocol/typescript/src/solarxr-protocol/pub-sub/topic-handle-response.ts +++ /dev/null @@ -1,78 +0,0 @@ -// automatically generated by the FlatBuffers compiler, do not modify - -import * as flatbuffers from 'flatbuffers'; - -import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle'; - - -/** - * Response for `TopicHandleRequest` - */ -export class TopicHandleResponse { - bb: flatbuffers.ByteBuffer|null = null; - bb_pos = 0; -__init(i:number, bb:flatbuffers.ByteBuffer):TopicHandleResponse { - this.bb_pos = i; - this.bb = bb; - return this; -} - -static getRootAsTopicHandleResponse(bb:flatbuffers.ByteBuffer, obj?:TopicHandleResponse):TopicHandleResponse { - return (obj || new TopicHandleResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -static getSizePrefixedRootAsTopicHandleResponse(bb:flatbuffers.ByteBuffer, obj?:TopicHandleResponse):TopicHandleResponse { - bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); - return (obj || new TopicHandleResponse()).__init(bb.readInt32(bb.position()) + bb.position(), bb); -} - -handle(obj?:TopicHandle):TopicHandle|null { - const offset = this.bb!.__offset(this.bb_pos, 4); - return offset ? (obj || new TopicHandle()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; -} - -static startTopicHandleResponse(builder:flatbuffers.Builder) { - builder.startObject(1); -} - -static addHandle(builder:flatbuffers.Builder, handleOffset:flatbuffers.Offset) { - builder.addFieldOffset(0, handleOffset, 0); -} - -static endTopicHandleResponse(builder:flatbuffers.Builder):flatbuffers.Offset { - const offset = builder.endObject(); - return offset; -} - -static createTopicHandleResponse(builder:flatbuffers.Builder, handleOffset:flatbuffers.Offset):flatbuffers.Offset { - TopicHandleResponse.startTopicHandleResponse(builder); - TopicHandleResponse.addHandle(builder, handleOffset); - return TopicHandleResponse.endTopicHandleResponse(builder); -} - -unpack(): TopicHandleResponseT { - return new TopicHandleResponseT( - (this.handle() !== null ? this.handle()!.unpack() : null) - ); -} - - -unpackTo(_o: TopicHandleResponseT): void { - _o.handle = (this.handle() !== null ? this.handle()!.unpack() : null); -} -} - -export class TopicHandleResponseT { -constructor( - public handle: TopicHandleT|null = null -){} - - -pack(builder:flatbuffers.Builder): flatbuffers.Offset { - const handle = (this.handle !== null ? this.handle!.pack(builder) : 0); - - return TopicHandleResponse.createTopicHandleResponse(builder, - handle - ); -} -} diff --git a/protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts new file mode 100644 index 00000000..504eec79 --- /dev/null +++ b/protocol/typescript/src/solarxr-protocol/pub-sub/topic-mapping.ts @@ -0,0 +1,89 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +import * as flatbuffers from 'flatbuffers'; + +import { TopicHandle, TopicHandleT } from '../../solarxr-protocol/pub-sub/topic-handle'; +import { TopicId, TopicIdT } from '../../solarxr-protocol/pub-sub/topic-id'; + + +/** + * Response for `TopicHandleRequest` or `SubscriptionRequest`. + */ +export class TopicMapping { + bb: flatbuffers.ByteBuffer|null = null; + bb_pos = 0; +__init(i:number, bb:flatbuffers.ByteBuffer):TopicMapping { + this.bb_pos = i; + this.bb = bb; + return this; +} + +static getRootAsTopicMapping(bb:flatbuffers.ByteBuffer, obj?:TopicMapping):TopicMapping { + return (obj || new TopicMapping()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +static getSizePrefixedRootAsTopicMapping(bb:flatbuffers.ByteBuffer, obj?:TopicMapping):TopicMapping { + bb.setPosition(bb.position() + flatbuffers.SIZE_PREFIX_LENGTH); + return (obj || new TopicMapping()).__init(bb.readInt32(bb.position()) + bb.position(), bb); +} + +id(obj?:TopicId):TopicId|null { + const offset = this.bb!.__offset(this.bb_pos, 4); + return offset ? (obj || new TopicId()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +handle(obj?:TopicHandle):TopicHandle|null { + const offset = this.bb!.__offset(this.bb_pos, 6); + return offset ? (obj || new TopicHandle()).__init(this.bb!.__indirect(this.bb_pos + offset), this.bb!) : null; +} + +static startTopicMapping(builder:flatbuffers.Builder) { + builder.startObject(2); +} + +static addId(builder:flatbuffers.Builder, idOffset:flatbuffers.Offset) { + builder.addFieldOffset(0, idOffset, 0); +} + +static addHandle(builder:flatbuffers.Builder, handleOffset:flatbuffers.Offset) { + builder.addFieldOffset(1, handleOffset, 0); +} + +static endTopicMapping(builder:flatbuffers.Builder):flatbuffers.Offset { + const offset = builder.endObject(); + return offset; +} + + +unpack(): TopicMappingT { + return new TopicMappingT( + (this.id() !== null ? this.id()!.unpack() : null), + (this.handle() !== null ? this.handle()!.unpack() : null) + ); +} + + +unpackTo(_o: TopicMappingT): void { + _o.id = (this.id() !== null ? this.id()!.unpack() : null); + _o.handle = (this.handle() !== null ? this.handle()!.unpack() : null); +} +} + +export class TopicMappingT { +constructor( + public id: TopicIdT|null = null, + public handle: TopicHandleT|null = null +){} + + +pack(builder:flatbuffers.Builder): flatbuffers.Offset { + const id = (this.id !== null ? this.id!.pack(builder) : 0); + const handle = (this.handle !== null ? this.handle!.pack(builder) : 0); + + TopicMapping.startTopicMapping(builder); + TopicMapping.addId(builder, id); + TopicMapping.addHandle(builder, handle); + + return TopicMapping.endTopicMapping(builder); +} +} diff --git a/schema/pub_sub/pub_sub.fbs b/schema/pub_sub/pub_sub.fbs index 695da186..7edd8433 100644 --- a/schema/pub_sub/pub_sub.fbs +++ b/schema/pub_sub/pub_sub.fbs @@ -28,7 +28,7 @@ union PubSubUnion { Message, SubscriptionRequest, TopicHandleRequest, - TopicHandleResponse, + TopicMapping, } table PubSubHeader { @@ -47,12 +47,6 @@ table Message { payload: Payload; } - -/// Requests a subscription to `topic` -table SubscriptionRequest { - topic: Topic; -} - table KeyValues { keys: [string]; values: [string]; diff --git a/schema/pub_sub/topic.fbs b/schema/pub_sub/topic.fbs index ec904c7c..998575fc 100644 --- a/schema/pub_sub/topic.fbs +++ b/schema/pub_sub/topic.fbs @@ -28,13 +28,19 @@ union Topic { TopicId, } +/// Response for `TopicHandleRequest` or `SubscriptionRequest`. +table TopicMapping { + id: TopicId; + handle: TopicHandle; +} + /// Request to get the `FeatureHandle` from a `FeatureId`. This is useful for reducing /// bandwidth, since `FeatureId` can be large. table TopicHandleRequest { id: TopicId; } -/// Response for `TopicHandleRequest` -table TopicHandleResponse { - handle: TopicHandle; +/// Requests a subscription to `topic`. Replies with a `TopicMapping`. +table SubscriptionRequest { + topic: Topic; }